glegris / pulpcore

Automatically exported from code.google.com/p/pulpcore
0 stars 1 forks source link

Images using INTERPOLATION_NEAREST_NEIGHBOR throws a bunch of ArrayIndexOutOfBoundsException when overlapping #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Create two sprites that use INTERPOLATION_NEAREST_NEIGHBOR and have them
overlap each other in playback

What is the expected output? What do you see instead?
Some sprites show some do not.  Several hundred exceptions are thrown as
soon as the overlapping sprite come onto the screen.

What version of the product are you using? On what operating system?
This bug was tested in 0.10 and I built a version of 0.11 from svn that did
it too.

I notice if I turned off INTERPOLATION_NEAREST_NEIGHBOR everything works.

Please provide any additional information below.

Here is one of the traces:
[pulpcore-player] pulpcore.platform.graphics.error:
java.lang.ArrayIndexOutOfBoundsException: -448
[pulpcore-player]   at
pulpcore.image.CompositeSrcOver.blend(CompositeSrcOver.java:291)
[pulpcore-player]   at
pulpcore.image.CoreGraphics.internalDrawScaledImage(CoreGraphics.java:1104)
[pulpcore-player]   at
pulpcore.image.CoreGraphics.internalDrawScaledImage(CoreGraphics.java:1057)
[pulpcore-player]   at
pulpcore.image.CoreGraphics.drawImage(CoreGraphics.java:777)
[pulpcore-player]   at
pulpcore.image.CoreGraphics.drawImage(CoreGraphics.java:748)
[pulpcore-player]   at
pulpcore.sprite.ImageSprite.drawSprite(ImageSprite.java:188)
[pulpcore-player]   at pulpcore.sprite.Sprite.draw(Sprite.java:654)
[pulpcore-player]   at pulpcore.sprite.Group.drawSprite(Group.java:469)
[pulpcore-player]   at pulpcore.sprite.Sprite.draw(Sprite.java:654)
[pulpcore-player]   at pulpcore.sprite.Group.drawSprite(Group.java:469)
[pulpcore-player]   at pulpcore.sprite.Sprite.draw(Sprite.java:654)
[pulpcore-player]   at pulpcore.sprite.Group.drawSprite(Group.java:469)
[pulpcore-player]   at pulpcore.sprite.Sprite.draw(Sprite.java:654)
[pulpcore-player]   at pulpcore.scene.Scene2D.drawScene(Scene2D.java:829)
[pulpcore-player]   at core.FAScene.drawScene(FAScene.java:10)
[pulpcore-player]   at pulpcore.Stage.animationLoop(Stage.java:656)
[pulpcore-player]   at pulpcore.Stage.run(Stage.java:511)
[pulpcore-player]   at java.lang.Thread.run(Unknown Source)

Original issue reported on code.google.com by washburns@gmail.com on 17 Feb 2008 at 3:19

GoogleCodeExporter commented 9 years ago
Fixed in 0.11.
For 0.10, the workaround is to call g.setFractionalMetrics(false)

Original comment by brack...@gmail.com on 18 Feb 2008 at 12:02