GDevelop icon indicating copy to clipboard operation
GDevelop copied to clipboard

Editor crash - moving resources into folders and selecting instances afterwards

Open Novel-Game-Studios opened this issue 1 year ago • 6 comments

Describe what you were doing when the crash happened

I'd moved some assets into a new folder, so I was updating the objects to have the correct file location. The objects in question were buttons. It let me update their images but when I went to select the instance of one of them I got the crash error

GDevelop version

5.3.181-ec1ebcbf5b57a4623f3ac4eb39a06a26398dc4bd

Platform info

System Version: 10.0.22621, Arch: x64, User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) GDevelop5/5.3.181 Chrome/100.0.4896.143 Electron/18.2.2 Safari/537.36, Platform: win32

Additional error context

uniqueErrorId: 0eed3ecc-cc2c-4d96-a982-8e2e74ebf202

TypeError: e.removeChild is not a function at n.value (file:///C:/Users/eliza/AppData/Local/Programs/GDevelop/resources/app.asar/www/static/js/9821.f092a247.chunk.js:2:2079928) at n.value (file:///C:/Users/eliza/AppData/Local/Programs/GDevelop/resources/app.asar/www/static/js/9821.f092a247.chunk.js:2:2080718) at n.value (file:///C:/Users/eliza/AppData/Local/Programs/GDevelop/resources/app.asar/www/static/js/9821.f092a247.chunk.js:2:2089815) at e.value (file:///C:/Users/eliza/AppData/Local/Programs/GDevelop/resources/app.asar/www/static/js/250.bfadc12b.chunk.js:1:1340485) at...

Additional component context

in n
in t
in Unknown
in div
in div
in Unknown
in Measure
in zk
in ow
in div
in div
in t
in div
in t
in n
in ForwardRef
in div
in l
in n
in n
in t
in Unknown
in dM
in div
in n
in Ga
in div
in jO
in Unknown
in Ke
in f
in u
in v
in m
in j
in h
in h
in Z
in d
in X
in n
in t
in ge
in n
in We
in et
in t
in Unknown
in Unknown
in v
in pt
in t
in r
in n
in u
in l
in n
in Dr...

Novel-Game-Studios avatar Dec 12 '23 00:12 Novel-Game-Studios

By any chance, are you using Google Translate or an automatic translation extension?

4ian avatar Dec 12 '23 08:12 4ian

This is a duplicate of #5954 The error happens when a layer gets deleted. https://github.com/4ian/GDevelop/blob/master/newIDE/app/src/InstancesEditor/InstancesRenderer/LayerRenderer.js#L775

First, I don't know which side effect is causing a destruction of a layer when selecting an instance. Second, is it possible that the pixiContainer is using an instance that doesn't exist or is invalid? I'll try to reproduce.

@Novel-Game-Studios Any chance you're able to reproduce this consistently? That would be extremely helpful

ClementPasteau avatar Dec 12 '23 14:12 ClementPasteau

This is a duplicate of #5954 The error happens when a layer gets deleted. https://github.com/4ian/GDevelop/blob/master/newIDE/app/src/InstancesEditor/InstancesRenderer/LayerRenderer.js#L775

First, I don't know which side effect is causing a destruction of a layer when selecting an instance. Second, is it possible that the pixiContainer is using an instance that doesn't exist or is invalid? I'll try to reproduce.

@Novel-Game-Studios Any chance you're able to reproduce this consistently? That would be extremely helpful

I was able to reproduce it partially!

  • So for the button the images were in the main assets folder and i wanted them in a subfolder.
  • I moved the images to the subfolder, i knew that would disrupt the locations in the object
  • So i went back to gdevelop and updated the image locations for the button
  • It let me save that just fine but then didn't update the actual instance in the scene
  • instead of a red x that appears when you have a sprite set to no animation or something, there was visually nothing there.
  • i select the object from the objects list and then right click and it shows the instance is still there, it's not until i go to 'select instance in the scene' that the engine froze

On this reproduction it didn't populate the bug report thing like it did the first time but the whole engine did completely freeze. I didn't notice the deletion of the layer it was on, and it said there was still an instance in the scene (if the layer was deleted wouldn't the instance be gone as well?)

Ultimately I wound up just copy/pasting the images I wanted to use into the desired subfolder and updating the buttons that way. Because there was no middle stage of them having no source images, nothing froze or disappeared. And once I have all the buttons updated I can delete them from the main assets folder.

I hope that's helpful!

Novel-Game-Studios avatar Dec 12 '23 22:12 Novel-Game-Studios

By any chance, are you using Google Translate or an automatic translation extension?

I think i have automatic translation in my browser but I'm using the app, not the browser version. Everything in the issue i reported was autopopulated when the crash happened (except for my description at the top).

Novel-Game-Studios avatar Dec 12 '23 22:12 Novel-Game-Studios

Thanks that's helpful. Unfortunately, I can't reproduce the crash, following the same steps...

ClementPasteau avatar Dec 13 '23 10:12 ClementPasteau

Thanks that's helpful. Unfortunately, I can't reproduce the crash, following the same steps...

I think it could have something to do with this being a project that existed before the last major update. A lot of objects broke when that happened.

For example, I had a sprite that worked fine until I added a new animation to it, then the engine would only read the new animation and none of the others. If I deleted the new animation it suddenly could read the old ones again. (And I tried changing the file type and resaving and all sorts of things, it wasn't the file for the animation.) I wound up having to recreate the entire object and then it would work.

So these buttons that I updated existed prior to the last major update, but newer buttons may not reproduce the issue? I'm not sure anyway, but that's my thought!

Novel-Game-Studios avatar Dec 13 '23 22:12 Novel-Game-Studios