Crash in android with dev build

121 views
Skip to first unread message

J-L MG

unread,
Oct 14, 2015, 5:46:23 PM10/14/15
to haxef...@googlegroups.com
Hello I tried making an android build for a very simple game but it crashes, here is what I can find in debug log:

10-14 23:38:53.465: I/trace(19332): Lib.hx:360: Null Object Reference
10-14 23:38:53.465: I/trace(19332): Called from openfl._legacy.display.Stage.__render (openfl/_legacy/display/Stage.hx line 1103)
10-14 23:38:53.465: I/trace(19332): Called from openfl._legacy.display.DisplayObjectContainer.__broadcast (openfl/_legacy/display/DisplayObjectContainer.hx line 286)
10-14 23:38:53.465: I/trace(19332): Called from openfl._legacy.display.DisplayObject.__broadcast (openfl/_legacy/display/DisplayObject.hx line 161)
10-14 23:38:53.465: I/trace(19332): Called from openfl._legacy.display.DisplayObject.__dispatchEvent (openfl/_legacy/display/DisplayObject.hx line 182)
10-14 23:38:53.465: I/trace(19332): Called from openfl._legacy.events.EventDispatcher.dispatchEvent (openfl/_legacy/events/EventDispatcher.hx line 98)
10-14 23:38:53.465: I/trace(19332): Called from flixel.FlxGame.onEnterFrame (flixel/FlxGame.hx line 523)
10-14 23:38:53.465: I/trace(19332): Called from flixel.FlxGame.step (flixel/FlxGame.hx line 681)
10-14 23:38:53.465: I/trace(19332): Called from flixel.FlxGame.update (flixel/FlxGame.hx line 738)
10-14 23:38:53.465: I/trace(19332): Called from flixel.tweens.FlxTweenManager.update (flixel/tweens/FlxTween.hx line 715)
10-14 23:38:53.465: I/trace(19332): Called from flixel.tweens.misc.VarTween.update (flixel/tweens/misc/VarTween.hx line 86)
10-14 23:38:53.465: I/trace(19332): Called from Reflect.setProperty (C:\HaxeToolkit\haxe\st

I'm using:
- flixel-dev 
- lime 2.6.8
- openfl 3.3.8
Command used is default flashdevelop : "haxelib run lime run "Project.xml" android -debug"

Is this a mistake from my code? Since we have "Null Object Reference" but I don't know where to look..
Thanks in advance for your help

Edit: Doesn't crash with flash.

SruloArt

unread,
Oct 14, 2015, 6:03:48 PM10/14/15
to HaxeFlixel
* It's your code.
* Where? probably in your tweens. Something isn't initialized to begin with or being destroyed prematurely.
* Since it's a simple game, you can always try commenting out some blocks.
* You can try HxScout.
* You can try building your game with the standalone debug Flash player for more info.

J-L MG

unread,
Oct 14, 2015, 6:55:23 PM10/14/15
to HaxeFlixel
The flash debug version didn't have any crash, that's my problem. But after checking the tweens I didn't destroy one properly which I think made the game crash on android I'm not 100% sure since the crash were inconsistent but we'll see, thanks for the quick answer!
Also if there is any way to have better debugging for android I'd be happy to learn about it because for large projects it must be quite painful!

SruloArt

unread,
Oct 15, 2015, 5:33:06 AM10/15/15
to HaxeFlixel

J-L MG

unread,
Oct 15, 2015, 8:30:23 AM10/15/15
to HaxeFlixel
SruloArt thanks for that link it seems very useful and would avoid a lot of stupid questions from me but I have troubles getting it to work:

using the test haxeflixel project from the repo: https://github.com/jcward/hxtelemetry/tree/master/test/HelloFlixel

I get this error "source/Main.hx:24: characters 4-10 : Unknown identifier : openfl"
for this line: "openfl.Telemetry.config.app_name = "HaxeFlixel";"

I read from the userguide that openfl versions 3.1.1 or newer have telemetry and I'm using the 3.3.8 version of openfl, I also updated hxcpp and followed that userguide so I'm really confused.
What am I doing wrong? Command used is "run lime build "Project.xml" windows -debug -Dfdb -Dtelemetry"

Thanks a lot for the help! (should I make a new question regarding hxscout so it's easier for other people to find the answers?)

Jeff Ward

unread,
Oct 15, 2015, 10:39:48 AM10/15/15
to haxef...@googlegroups.com
Hi -

Sorry, the HelloFlixel example was out of date. I fixed it. It looks like you have the proper libarries installed - all you should need to do to profile any HaxeFlixel project is add -Dtelemetry to your openfl command, which it looks like you've done that as well.

Let me know if this doesn't work.

However, I might add that hxScout may not help you debug a crash... It's a profiler, more for debugging lag, where code spends the most time, etc.

Best,
-Jeff

J-L MG

unread,
Oct 15, 2015, 12:08:34 PM10/15/15
to HaxeFlixel
I confirm the issue is fixed for me both on test project and my own project, thanks a lot Jeff Ward you made a very good tool I am new to open-source but I hope to become a good developer like you to contribute like this, big thanks. Sorry for my stupid questions and bothering.

Jeff Ward

unread,
Oct 15, 2015, 5:16:49 PM10/15/15
to HaxeFlixel
Thank you, glad you got it working!
Reply all
Reply to author
Forward
0 new messages