Scene data corruption/discrepancy on deleting/moving entities in hierarchy renders scene file unusable


So the other day we had a heartattack when we couldn’t delete entities in our scene anymore. We were in the middle of relocating and deleting big hierarchies within the editor scene hierarchy, when the editor called out that we should reload it as an error occured. On reloading we found that the scene file got corrupt in that it still thought 7 entities were still there even though they were not. Now on loading that scene we get:

The problem was, we couldn’t get the scene back to a correct state, as we couldn’t delete anything anymore as the delete method errors:

We ended up migrating to a new scene file where we copy-pasted everything, carefully avoiding the entity hierarchy were the 7 ghost entities were located. All is fixed now, but we wanted to let the devs know that it might be worth looking into ways of recovering from discrepant states in the scene hierarchy

1 Like

Indeed this seems to be a DB/editor sync issue. @vaios @will may know something more about this.

I got similar errors when I was developing editor extensions and sometimes I wasn’t able to recover the scene. Though most likely that was me messing with stuff I shouldn’t :slight_smile: