mred icon indicating copy to clipboard operation
mred copied to clipboard

Lots of odd crashes today

Open blairmacintyre opened this issue 6 years ago • 4 comments

Couldn't really see much of a pattern or cause. Things I noticed.

The errors are pretty much always about null / undefined dereferencing. Scenes, assets, objects.

When something is deleted or removed, and there are still references to it, we seem to get crashes at various times (e.g., popping up a menu), that I suspect it is while iterating through a list of things that includes something that's been deleted.

It's "kind of urgent", but the kids are getting good at saving often, so it can be put off perhaps.

blairmacintyre avatar May 24 '19 16:05 blairmacintyre

Hmm. Technically all objects are there forever because it's a CRDT which preserves all history, but the abstractions should hide that. I confirmed that printing the children of a scene does not include any deleted children.

Can you give me some more details? Is it something like you created an object named foo, deleted it, then created another object named foo and it's finding the deleted foo?

joshmarinacci avatar May 24 '19 17:05 joshmarinacci

no, I think it's more like "I had a scene named foo, and linked to it in a behavior in another scene and then deleted foo". The "foo" is still showing as the scene property (including, for example, if it was marked as the first scene in the project). Same thing happens for any reference to assets. So, it references it, but when it tries to use it ... boom

We really need to remove any reference to things up in scripts, etc., if they are deleted ... or, perhaps, just notice when we run and catch it.

blairmacintyre avatar May 24 '19 18:05 blairmacintyre

yeah. we should definitely print a notice if anything in the system facade returns a null

joshmarinacci avatar May 24 '19 21:05 joshmarinacci

This should be fixed now.

joshmarinacci avatar Jul 15 '19 21:07 joshmarinacci