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

InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable #1827

Closed
mburakerman opened this issue Feb 27, 2017 · 3 comments

Comments

@mburakerman
Copy link

I created a game with p5 but it gives me error in Mozilla (51.0.1) and can't start game.
This my project.
You can check it on Mozilla.
I get this errors.

[44]</d.Renderer2D.prototype.image 
[56]</e.prototype.image 
bound  self-hosted
Unicorn/this.show 
draw 
[47]</d.prototype.redraw 
[37]</e/this._draw< 
bound  self-hosted
[37]</e/this._runIfPreloadsAreDone 
[37]</e/this._decrementPreload 
bound  self-hosted
[56]</e.prototype.loadImage/d.onload 

Why i get this errors?

@lmccart
Copy link
Member

lmccart commented Feb 27, 2017

I looked through the game a bit but it's hard to track down the error because the files are all minified and there's quite a bit of code involved. Because the error mentions loadImage, I might start by confirming that all image files you're loading exist, have the proper read permissions, are correctly named (capitalization too) and are in the right place.

If this doesn't solve anything, I'd suggest commenting out pieces of your code until it runs again in order to identify the problematic line. If you're able to isolate this line, please post it here and we can better figure out where the bug is.

@mburakerman
Copy link
Author

mburakerman commented Feb 27, 2017

Ah, i figured out now.
I use p5.js gif library and it gives the issuse tho.
I should open this issue there.
Thanks!

@lmccart
Copy link
Member

lmccart commented Feb 27, 2017

Ah ok, glad you tracked it down. Yes, that library is pretty old and I've heard of several issues with it. Hope you can get it fixed over there!

@lmccart lmccart closed this as completed Feb 27, 2017
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