Android App Crashes On Interaction [Solved]

RosalinaGalaxer

  • Posts: 239
Hey,

So I compiled a game to Android today, and everything was fine until I actually decided to play the game. When I tap on the controls or anywhere else on the screen, the game freezes and then crashes. I looked into the log and did some research of my own but found nothing. Here's the error it sends:

[haxelib.exe] F/libc    (10701): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 10749 (Thread-2939)

If somebody knows what that means, could they let me know, or give me some pointers on fixing it?

Thanks!

« Last Edit: February 04, 2019, 01:46:44 pm by RosalinaGalaxer »
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

merrak

  • *
  • Posts: 2738
SIGSEGV is a segmentation fault, but without the log there's little else to say. Does the game work if you compile it as a desktop game? If it doesn't then you should be looking for an uninitialized list, actor attribute without a value, or any of the other kinds of errors that would show up as "error 1009" in Flash or a crash on a desktop build.

RosalinaGalaxer

  • Posts: 239
Yep, it runs fine on Flash and HTML5. I test everything on either one of those first: it saves an incredible amount of time to work out gameplay-related bugs. How much of the log would you need? I looked through it a bit for anything obvious and it's just massive...
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

merrak

  • *
  • Posts: 2738
How much of the log would you need? I looked through it a bit for anything obvious and it's just massive...

Just do the "generate logs" and attach the .zip file. I don't do much Android development so I'm not the best person to review it... but I'll take a quick look and see if I do spot anything.

RosalinaGalaxer

  • Posts: 239
Okay, I'll do that tomorrow because it's almost 10:00 here and I'm about turn in for the night.
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

RosalinaGalaxer

  • Posts: 239
Here are the logs. There was no change, the same old thing happened, so I guess you could say that all went to plan, though it would have been nice had it suddenly started working...
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

RosalinaGalaxer

  • Posts: 239
Here's a more recent log. I worked on gameplay itself a bit more and hoped that I would accidently fix the bug; no such luck. I did see something about a "process or app" being "null" in the log. Not sure if that helps in any way, though.
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

squeeb

  • Posts: 1617
i have found that flash has been nicer about null pointer errors than android!  (ive had flash compile and the sane project crash in android... is there anything referenced that may not be there.. or there yet... ie actors, or  attributes that arent set  when the crash occurs ?   

game is running fine on android at first??? then you touch and it crashes?

RosalinaGalaxer

  • Posts: 239
I'm pretty sure that everything is there. I don't see why something would be null on Android and not on Flash, but this is game programming, so I'm not gonna throw anything out the window.

Yep, the game will boot and all the idle animations will play just fine. I can't sit there for hours and enjoy observing the game I've made, but god forbid I touch anywhere on-screen. It's the weirdest thing. I've compiled to multiple different devices as well, with the same results.
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

squeeb

  • Posts: 1617
Ok.   I meant that flash wont crash sometimes if theres a null pointer... but android will. 
Maybe we need to see the code for touch events?

RosalinaGalaxer

  • Posts: 239
I don't think that the touch/click events are the problem: whether I tap on a button, or on complete empty space, the game crashes.
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

RosalinaGalaxer

  • Posts: 239
So after figuring stuff out with 4.0, I finally got the game to compile to Android again. However, the crash persists on 4.0 b10240. I don't know where to go from here.
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

Justin

  • *
  • Posts: 4716
Try testing in debug mode. Run > Run App in Debug Mode > Android.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

RosalinaGalaxer

  • Posts: 239
Thanks Justin. Didn't know that existed.

So now I know that it's a null object reference, in the On-Screen Button behavior. Not that that helps much, 'cause I'm not sure what it's attempting to reference that is null. I don't understand...

I've attached the logs, because they might actually be worth something this time.
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

Luyren

  • *
  • Posts: 2812
Code: [Select]
2019-02-01 16:23:28,502 INFO  [Thread-21] stencyl.sw.util.StreamGobbler: [adb.exe] 02-01 16:23:30.639 29904 29959 I trace   : Called from scripts.Design_7_7_OnScreenButton.init (scripts/Design_7_7_OnScreenButton.hx line 197)
2019-02-01 16:23:28,502 INFO  [Thread-21] stencyl.sw.util.StreamGobbler: [adb.exe] 02-01 16:23:30.639 29904 29959 I trace   : Engine.hx:4220: Null Object Reference

It says the problem is in line 197. Open the On Screen Button behavior, hit the Preview Code tab, go to line 197, and then look for its equivalent in the blocks. You can then surround the offending code with print blocks to see what has no value for the null object reference.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.