Broken game


  • Posts: 9
Hello, i was compiling a game from android today, and it was taking ages on compiling. After about 45 minutes i looked in the log viewer and it showed nothing from the last half an hour, so i clicked exit stencyl and then saved. I then opened up stencyl and tried again. This time it worked, but the app on my tablet would open, and then say "unfortunately My Game has stopped".  i then tried running on flash player and got the error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
   at com.stencyl.models::GameModel()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/com/stencyl/models/GameModel.hx:136]
   at com.stencyl.models::GameModel$/get()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/com/stencyl/models/GameModel.hx:46]
   at com.stencyl.models::Resource/isAtlasActive()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/com/stencyl/models/Resource.hx:30]
   at com.stencyl.models.background::ImageBackground()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/com/stencyl/models/background/ImageBackground.hx:49]
   at[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/com/stencyl/io/BackgroundReader.hx:99]
   at com.stencyl::Data/readResource()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/com/stencyl/Data.hx:265]
   at com.stencyl::Data/readResourceXML()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/com/stencyl/Data.hx:251]
   at com.stencyl::Data/loadResources()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/com/stencyl/Data.hx:206]
   at com.stencyl::Data/loadAll()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/com/stencyl/Data.hx:140]
   at com.stencyl::Data$/get()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/com/stencyl/Data.hx:47]
   at com.stencyl::Engine/begin()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/com/stencyl/Engine.hx:652]
   at com.stencyl::Engine()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/com/stencyl/Engine.hx:511]
   at Universal/init()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/Universal.hx:57]
   at Universal/onAdded()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/Universal.hx:36]
   at flash.display::DisplayObjectContainer/addChild()
   at Universal$/main()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/Universal.hx:694]
   at Function/
   at Function/<anonymous>()
   at Reflect$/callMethod()[C:\Program Files (x86)\Stencyl\plaf\haxe/std/flash/_std/Reflect.hx:56]
   at ApplicationMain$/begin()[Export/flash/haxe/ApplicationMain.hx:56]
   at ApplicationMain$/preloader_onComplete()[Export/flash/haxe/ApplicationMain.hx:83]
   at scripts::StencylPreloader/onLoaded()[Source/scripts/StencylPreloader.hx:316]
   at ApplicationMain$/onEnter()[Export/flash/haxe/ApplicationMain.hx:75]

i also got the error could not load collision groups -2 and 3 in the log viewer

Then i tried to test game in windows (debug and non-debug mode) and it got stuck on compiling.

Then i tried android debug mode and it got stuck on compiling.

I then came to the conclusion that my game is probably broken, so i looked it up and i found that i should attach the game folder
as well, which is now attached


  • Posts: 9
P.S    Make sure you use a file viewer like 7-zip to see the files that cant be viewed in the standard windows file viewer

Callan S

  • Posts: 147
Might have not put a value in - I've found stencyl can be bad at informing you where those are. It makes a line red way after the absent value.

First step : Check your new code and see if you've not filled in a value somewhere.


  • Posts: 9
No, everything is filled in with values


  • Posts: 9
i fixed it!!!!!
I will be posting a video on youtube in a few days showing everyone how to fix broken stencyl games!!!!!!!!