Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using ignoreDestroy on gameobjects causes game to freeze when leaving a scene #6972

Open
Stever1388 opened this issue Dec 2, 2024 · 1 comment

Comments

@Stever1388
Copy link

Stever1388 commented Dec 2, 2024

Version

  • Phaser Version: 3.86.0
  • Operating system: Windows
  • Browser: Chrome/Edge/Firefox

Description

If you set ignoreDestroy on a gameobject, when you leave the scene, the game will freeze. You will have to force quit the tab/window at that point. Setting this value to true should allow you to leave the scene without that object getting destroyed (so you can carry it over to another scene).

Example Test Code

The following scene will demonstrate the issue:

import Phaser from 'phaser';

export default class IgnoreDestroyTest extends Phaser.Scene
{
    create()
    {
        this.testimage = this.add.image(this.scale.width/2, this.scale.height/2, "mytexture", "myframe");
        this.testimage.ignoreDestroy = true; // comment out this line and the code works

        this.time.delayedCall(1000, ()=> this.scene.stop())
    }
}

When the scene is attempted to be stopped, it will freeze - the image will remain visible and the tab will become unresponsive. If you comment out the offending line, the stop works correctly - the image will go away and the tab remains responsive.

Additional Information

This logic did use to work in 3.55.2.

@samme
Copy link
Contributor

samme commented Dec 3, 2024

Infinite loop in DisplayList#shutdown().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants