Instances from deleted Layer remains in the scene

Tested this in build 120 but I assume it applies to previous builds as well.

  1. Create a new project
  2. Add a new object and set its layer (I have added NewObject2 - Lighting Layer)
  3. Select the newly created object in the scene view (optional, not selecting it doesn’t make any difference)
  4. Now delete the layer that the object is in (choose ‘Remove objects’ as well).

The object disappears in the scene view but the box that allows you to scale the object does not go away (you cannot scale or rotate the now-deleted object of course but its there), the ‘instance view’ window still shows the deleted instance.

I think this is expected behavior. For me, as soon as I click another object, or click off the current object, the “placeholder” box disappears and the instance list updates.

I’d want a contributor to chime in to be sure, but I believe the goal is to not forcibly make you lose your current selected instance positioning/details if you want to create another.

I was trying to understand your comment and tested it again, I deleted the layer and then double clicked the deleted instance in the instance list and this time gdevelop crashed, however clicking Report on Github button didn’t open any page/window

EDIT 1: I think this is a bug because the behaviour doesnt seem to be consistent, I was trying to cause that crash again and this time the list updated (removed the deleted instance entry from the instance list as well).

EDIT 2: Trying to rotate the rotate/scale box also caused crash this time, I know rotating a deleted instance doesnt make sense but I was trying to recreate a crash, and it feels more and more like a bug to me.

Not a contributor, but my 2 cents worth :

It seems illogical to have the current selected item handles still available if the current object has been deleted. What object are the handles for? The object they belong to no longer exists. To me, they should disappear when the object is removed.

1 Like

Just to clarify, I mean you click off the object in the scene editor. Basically click any empty space.

2 Likes

Hmm so it really did remove the instances from the scene but the IDE didn’t update for some reason? In 2 or 3 out of the 10 or so times i tested it, both the scene view and the instances list updated instantaneously and didn’t do so in other tries. So apparently all I had to do was click on empty space for it to update!

I apologize if I come off as rude/ungrateful here but while clicking elsewhere isn’t an issue but it gives (gave) buggy impression when that box doesn’t go away (hence the post)…

EDIT: if you fiddle around in with this issue, you can cause new bugs to surface as well, for eg. you can cause new objects to have NaN in positions or ‘Infinity’ as X/Y positions as shown in this video. The coordinates jumped to negative by themselves, I didn’t do that.

EDIT 2: I really am ashamed that I am still posting about it, since all of it can be avoided just by clicking in an empty part of the scene after deleting the layer, but still I felt that i needed to bring it to attention…

That does look like a bug to me, the ide should never display or let you access deleted memory/an object in an invalid state. Consider porting this to GitHub for the team to look into it.

2 Likes