Skip to content


Firefox IndexSizeError for flambe.platform.html.CanvasDrawingContext.DrawSubImage #55

GMaker0507 opened this Issue · 4 comments

3 participants


In firefox., but not in Chrome:

I am getting an IndexSizeError in the drawSubImage function in the flambe.platform.html.CanvasDrawingContext prototype declaration

Here is what the console is showing:

IndexSizeError: Index or size is negative or greater than the allowed amount
Line 4865

Which links to this snippet of code:

,drawSubImage: function(texture,destX,destY,sourceX,sourceY,sourceW,sourceH) {
var htmlTexture = texture;


Please post a full stack trace if available.


Any more info on this? It sounds like Firefox is complaining about a negative width/height to drawImage. If this traces back to somewhere in Flambe, I definitely want to see this fixed. :)


Yeah, it was a negative issue. When i limited the values for above zero only it worked. It was the SourceX and SourceY that were negative, everything else was positive i believe.


If you're using flash to create Starling spritesheets and using them in Flambe, Flash will put negative values in for your sourceX and sourceY when it encounters empty frames of animation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.