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

race condition on ImageSprite load #586

Closed
wants to merge 1 commit into from
Closed

Conversation

jfirebaugh
Copy link
Contributor

If the image takes a long time to load, drawSymbol will produce errors due to trying to use the uninitialized sprite.img.

To reproduce, wrap the ajax.getImage callback in a 5 second setTimeout.

Uncaught TypeError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': No function was found that matched the signature provided. imagesprite.js:75

If you bypass that error by checking sprite.loaded():

Uncaught TypeError: Cannot read property 'width' of undefined drawsymbol.js:60

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

Successfully merging this pull request may close these issues.

1 participant