Error when loading game

bogo1234

  • Posts: 4
Hi i have gotten an error when loading a game.

Unexpected problem on thread AWT-EventQueue-0: java.lang.ArrayIndexOutOfBoundsException: 16
java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 16
   at stencyl.sw.app.tasks.StencylWorker.done(StencylWorker.java:74)
   at stencyl.sw.app.tasks.StencylWorker.done(StencylWorker.java:54)
   at stencyl.sw.app.tasks.OpenGameTask.done(OpenGameTask.java:125)
   at javax.swing.SwingWorker$5.run(SwingWorker.java:737)
   at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832)
   at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
   at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842)
   at javax.swing.Timer.fireActionPerformed(Timer.java:313)
   at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
   at java.awt.EventQueue.access$500(EventQueue.java:97)
   at java.awt.EventQueue$3.run(EventQueue.java:709)
   at java.awt.EventQueue$3.run(EventQueue.java:703)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 16
   at stencyl.sw.data.TileAnimation.<init>(TileAnimation.java:65)
   at stencyl.sw.data.EditableTile.<init>(EditableTile.java:119)
   at stencyl.sw.io.read.TilesetReader$TilesetApply.apply(TilesetReader.java:115)
   at stencyl.core.lib.io.AbstractReader.applyToChildren(AbstractReader.java:104)
   at stencyl.sw.io.read.TilesetReader.load(TilesetReader.java:73)
   at stencyl.sw.data.EditableTileset.<init>(EditableTileset.java:105)
   at stencyl.sw.io.read.TilesetReader.read(TilesetReader.java:68)
   at stencyl.core.lib.io.IOHelper.read(IOHelper.java:112)
   at stencyl.core.lib.io.IOHelper.read(IOHelper.java:103)
   at stencyl.core.lib.ResourceList.init(ResourceList.java:80)
   at stencyl.core.lib.ResourceList.<init>(ResourceList.java:56)
   at stencyl.core.lib.ResourceList.createList(ResourceList.java:46)
   at stencyl.core.lib.Game.load(Game.java:1669)
   at stencyl.sw.app.tasks.OpenGameTask.startOpeningGame(OpenGameTask.java:155)
   at stencyl.sw.app.tasks.OpenGameTask.doInBackground(OpenGameTask.java:117)
   at stencyl.sw.app.tasks.OpenGameTask.doInBackground(OpenGameTask.java:34)
   at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   at javax.swing.SwingWorker.run(SwingWorker.java:334)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at java.lang.Thread.run(Thread.java:745)

squeeb

  • Posts: 1546
ArrayIndexOutOfBoundsException.. this is the problem.. you may using something that isn't there...Or you started at 1 when programming counting starts at 0.. like Frame 1 when there is no Frame 1 for an animation but you are calling it and it doesn't exist

But I think it has to do with this part

stencyl.sw.data.TileAnimation.<init>(TileAnimation.java:65)
   at stencyl.sw.data.EditableTile.<init>(EditableTile.java:119)

bogo1234

  • Posts: 4
Thank you so much :) But how can i fix this? (sorry im new to all this)

squeeb

  • Posts: 1546
You'd need to save to image your code... right click and you'll see it there.. or upload screen shots of the code so we can see the problem

captaincomic

  • *
  • Posts: 6109
A Java exception indicates a bug in Stencyl vs. a bug in user behaviors (which would throw a Flash error instead).

bogo1234, would you mind to share that game?