Error: Unexpected Problem, please help!

Narwhal18

  • Posts: 4
Hi! Upon trying to create a new game, I received an "Unexpected Problem" pop-up. It told me to copy the report and post it to the forum, so here it is:

Unexpected problem on thread AWT-EventQueue-0: java.lang.NullPointerException
java.lang.RuntimeException: java.lang.NullPointerException
   at stencyl.sw.app.tasks.StencylWorker.done(StencylWorker.java:72)
   at stencyl.sw.app.tasks.SaveGameTask.done(SaveGameTask.java:66)
   at javax.swing.SwingWorker$5.run(SwingWorker.java:717)
   at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:814)
   at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:95)
   at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:824)
   at javax.swing.Timer.fireActionPerformed(Timer.java:291)
   at javax.swing.Timer$DoPostEvent.run(Timer.java:221)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
   at java.awt.EventQueue.access$400(EventQueue.java:82)
   at java.awt.EventQueue$2.run(EventQueue.java:676)
   at java.awt.EventQueue$2.run(EventQueue.java:674)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.NullPointerException
   at stencyl.core.lib.Game.getAllAtlasResources(Game.java:1947)
   at stencyl.core.lib.Game.getResourcesForAtlas(Game.java:2763)
   at stencyl.sw.io.write.GameFileWriter.write(GameFileWriter.java:808)
   at stencyl.sw.io.write.MasterWriter.saveGame(MasterWriter.java:80)
   at stencyl.sw.app.tasks.SaveGameTask.doInBackground(SaveGameTask.java:48)
   at stencyl.sw.app.tasks.SaveGameTask.doInBackground(SaveGameTask.java:16)
   at javax.swing.SwingWorker$1.call(SwingWorker.java:277)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)
   at javax.swing.SwingWorker.run(SwingWorker.java:316)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
   at java.lang.Thread.run(Thread.java:695)

Please help me fix what is wrong so that I can make a game!

captaincomic

  • *
  • Posts: 6108
This could be caused by a missing resource file. If you send me your game, I'd take a look.

Narwhal18

  • Posts: 4
Hi, Captain comic.

I'm not sure how to send a copy of my game over the forum. I attempted to attach it below tho, so see if that works.

My game is mostly based on a kit that I downloaded from the stencyl site. So far I've mostly been configuring the sprites.
If this helps, The crash course tells me that a "Crash Course Kit" should have come with my game, but it did not. Also I am using the Mac version.

Anyway, thanks for the help!

here is the file:

captaincomic

  • *
  • Posts: 6108
Hm, I'm not getting any errors with your attached game (using Stencyl 3.2). No idea what the problem could be. In which situation do you get the error pop-up?

The link to the Crash Course Kit is in the Introduction:
http://www.stencyl.com/help/viewArticle/143
It's a zip file that you need to unzip into your games folder (use Debug -> View -> View Games Folder to find it).

Narwhal18

  • Posts: 4
Hello again,

I don't really know what the problem is relating to the pop-ups. I haven't seen any of the error pop-ups lately, but usually they appear when I click test scene.

Probably unrelated to the pop-ups is that whenever I drag my actor onto the scene, then resize it, the actor glitches up once I test the level. The character floats above the ground and vibrate up and down by a pixel or two. Its jumping and falling actions seem to work correctly, but when its walking or idle it will float above the terrain. That should have happened in the game file I sent you before. Just in case, I exported the game a second time and attached the file below.

A separate problem is that when I attempt to test my game with "iOS Device", it says 'compiling' for hours, and I'm never actually able to test it on iOS.

I realize this is a lot of stuff, but if you could help me fix any or all of these problems, that would be much appreciated.


captaincomic

  • *
  • Posts: 6108
One thing I noticed is that your Pikachu actor sprites are really huge. My Java VM ran out of memory just trying to open it. It would be better if you'd imported smaller images, then you also don't need to resize it in the scene editor. Reduce the size in your image editor to the size you want in your game.

Narwhal18

  • Posts: 4
Hey thanks, I think that will work! I'll add to this thread later if that doesn't work when I get around to doing that. But thank you, Captain Comic, for helping me out!

5sofia5

  • Posts: 1
A mi me paso lo mismo pero en vez de hacer un juego hice el juego y no paso nada pero puse para crear escena y paso lo mismo.