Error Code. What does it mean?


  • Posts: 6
TypeError: Error #1009: Cannot access a property or method of a null object reference.
   at Function/<anonymous>()[C:\Users\Joseph\AppData\Roaming\Stencyl\stencylworks\preview\scripts\]
   at stencyl.api.engine::TimedTask/update()[/home/stencyl/]
   at stencyl.api.engine::GameState/innerUpdate()[/home/stencyl/]
   at stencyl.api.engine::GameState/postUpdate()[/home/stencyl/]
   at stencyl.api.engine::GameState/update()[/home/stencyl/]
   at org.flixel::FlxGame/update()[/home/stencyl/]

Hello, are you on a mac?  Testing on simulator often gives more readable messages.

In my understanding, your game is looking for something that's not there any more. Sometimes this can be fixed, sometimes a game can become corrupt. Do you have a recent backup just in case?

Are you able to create a blank scene, set it as starting scene and does the game work?


  • Posts: 165
I've run into a similar error after disrupting the "preparation" process Stencyl goes through before opening Xcode. I accidentally forced it to quit, and then tried to test it in Xcode again; after doing so I constantly received an error talking about a null object reference having to do with one of my games atlases. However, I was able to run my game on my device despite the error.

Unfortunately, the only way I could get the error to go away was to revert to a backup of my game, costing me about an hour of work. I tried messing around with my games atlases and even removing graphics and reuploading them but nothing I did to the corrupt version of my game got rid of the error.

So to anyone reading, make sure you don't disrupt the preparation and compiling process when sending a game from Stencyl to Xcode!


  • *
  • Posts: 2607
This is an Actionscript error, not iOS.

It means you're trying to kill an actor that is already dead inside a timed task ("do every", "do after" blocks). Before you try to kill it, check if it is alive using an "if" block and "actor is alive" block.

ipe 369

  • Posts: 1001
If you google
'as3 error #1009'
or any other error, it'll come up with some blog documenting all of them i think. remember, 1009 is when an attribute (or actor) is no longer anything (null) - or dead. 1069 (in case you come to it) is when you use an array and say you get number [2] from the array and [2] isn't set to anything, i think that pops up. You also get array out of bounds exception, when you loop through an array too many times. We should really document the most popular ones on stencyl as it comes up a lot.