Jump to content

BUG - Preloader "IndexSizeError" in Firefox, works in Chrome


Wavertron
 Share

Recommended Posts

Hey dudes

Made a game for Ludum Dare 42. But during the mad 48 hour crunch, something went wrong with the Preloader in Canvas mode.

On Firefox, I get the error "IndexSizeError: Index or size is negative or greater than the allowed amount" and the game crashes on the Preloader loading screen

Without changing the code, it works fine Chrome everytime.

I've found two workarounds:

1) In the Preloader class, if I comment out line 33 (below), the game loads fine in Firefox.

this.load.on('progress', this.onProgress, this );

2) If I load the game in WebGL mode, it works fine too.  But I need to use Canvas mode as that was the only way I could get screeshots to work in my game (its a little photography game). In canvas mode, Firefox breaks.

 

So the bug seems to related to the Preloader (image cropping?) and Canvas mode in Firefox.

Searching the forums, Phaser 2 has had similar issues related to cropping images during the preloader.

My game code can be found here: http://www.wavertron.com/ld42/

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...