-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Uncaught TypeError: Cannot read property 'getIndex' of null at Text.getIndexList #5489
Comments
Does this example work for you? http://labs.phaser.io/view.html?src=src/animation/aseprite%20animation.js As it uses Text objects down the left, all of which are interactive. I've been looking at this for a while this morning, but I can't replicate it with something as simple as your example test code. So it has to be something else. Maybe Scene restart related? But if you try your test code in isolation, I'm confident it'll work fine. There's something outside of it triggering this. |
Digging more into this today, created this test: http://labs.phaser.io/view.html?src=src/bugs/5489%20container%20input.js Still can't trigger it. There must be something else being overlooked. A Scene restart maybe? Layer? |
Hi! I've encountered the same problem. Still digging it, but I think this might have something to do with objects being interactive and overlapping. EDIT: |
https://jsfiddle.net/gkyor893/ Interactive object inside container which is below another object outside of this container is causing it. |
Yeah, I narrowed it down to objects inside Containers AND having another outside of it (not of the same type), because the internal one has a null |
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the |
I happen to have this exact problem. I updated Phaser to 3.52.0. Problem went away right away. |
Version
Phaser Version:3.51.0
Operating system:Mac Pro
Browser:Version 87.0.4280.88 (Official Build) (x86_64)
Description
It only happens in my project when call text.setInteractive, but I can’t reproduce it in https://labs.phaser.io/edit.html
Example Test Code
var text = this.add.text(100, 100, 'Phaser');
text.setInteractive().on('pointerdown', () => {
console.log('hello world');
});
Additional Information
The text was updated successfully, but these errors were encountered: