Skip to content

_notification(PREDELETE) crashes when nodes are freed before RollbackSynchronizer #595

@domsl

Description

@domsl

🐛 Description

When closing the game by forcing it closed (I think NOTIFICATION_WM_CLOSE_REQUEST) I get following errors:

Image
E 0:00:04:422   property-pool.gd:53 @ get_subjects(): Attempted to assign an invalid (previously freed?) object instance into a 'TypedArray'.
  <C++ Error>   Method/function failed. Returning: false
  <C++ Source>  core/variant/container_type_validate.h:96 @ _internal_validate_object()
  <Stack Trace> property-pool.gd:53 @ get_subjects()
                rollback-synchronizer.gd:334 @ _notification()

Steps to reproduce

  1. I am not sure how to reprodcue this in forrestbrawler, but in my game it is dependet on the position of RollbackSynchronizer in the tree (RBS last position in tree does not trigger bug, in the middle of player scene it does)
  2. Run Game
  3. Quit Game

Where the errors happens

Image Image

Probably related to the reverse order

Image

Ideas to fix?

Maybe filtering it with is_instance_valid() before iterating would be enoug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions