Recent

Author Topic: Application exit on start  (Read 3706 times)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8266
  • Programming + Glam Metal + Tae Kwon Do = Me
Application exit on start
« on: November 15, 2012, 05:42:38 pm »
I've finally managed to build my Javanese Chess game for Android. However, upon starting, it dies without any error (i.e. seems like normal exit). The trace that ADB shows is:
Quote
I/ActivityManager(   61): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.pascal.lcltest/.LCLActivity } from pid 133
I/ActivityManager(   61): Start proc com.pascal.lcltest for activity com.pascal.lcltest/.LCLActivity: pid=323 uid=10034 gids={3003}
I/ARMAssembler(   61): generated scanline__00000177:03515104_00001002_00000000 [ 87 ipp] (110 ins) at [0x4446d6f0:0x4446d8a8] in 423532 ns
I/javanesechess(  323): Trying to load libjavanesechess.so
D/dalvikvm(  323): Trying to load lib /data/data/com.pascal.lcltest/lib/libjavanesechess.so 0x40514110
D/Zygote  (   33): Process 323 exited cleanly (216)
I/ActivityManager(   61): Process com.pascal.lcltest (pid 323) has died.
The project is located here, but if you don't have Mercurial installed please take the attached zip.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8266
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Application exit on start
« Reply #1 on: November 23, 2012, 06:58:40 pm »
My bad, my ppcrossarm symlink still points to 2.7.1. I've got a better stack trace with 2.5.1v3:
Quote
I/ActivityManager(   61): Start proc com.pascal.lcltest for activity com.pascal.lcltest/.LCLActivity: pid=331 uid=10034 gids={3003}
I/ARMAssembler(   61): generated scanline__00000177:03515104_00001002_00000000 [ 87 ipp] (110 ins) at [0x4446d6f0:0x4446d8a8] in 391041 ns
I/javanesechess(  331): Trying to load libjavanesechess.so
D/dalvikvm(  331): Trying to load lib /data/data/com.pascal.lcltest/lib/libjavanesechess.so 0x40514570
D/dalvikvm(  331): Added shared lib /data/data/com.pascal.lcltest/lib/libjavanesechess.so 0x40514570
I/lclapp  (  331): JNI_OnLoad called
I/lclapp  (  331): Reading our Activity Class
I/lclapp  (  331): JNI_OnLoad finished
I/lclapp  (  331): LCLOnCreate called by LCLActivity.onCreate
I/lclapp  (  331): [FORMS.PP] ExceptionOccurred
I/lclapp  (  331):   Sender=Exception
I/lclapp  (  331):   Exception=Unknown Run-Time error : 202
I/lclapp  (  331):   Stack trace:
I/lclapp  (  331):   $808E1124
I/lclapp  (  331): TApplication.HandleException Unknown Run-Time error : 202
I/lclapp  (  331):   Stack trace:
I/lclapp  (  331):   $808E1124
D/Zygote  (   33): Process 331 exited cleanly (217)
I/ActivityManager(   61): Process com.pascal.lcltest (pid 331) has died.

User137

  • Hero Member
  • *****
  • Posts: 1791
    • Nxpascal home
Re: Application exit on start
« Reply #2 on: November 24, 2012, 02:11:40 am »
The game played fine when i changed it to win32. Heaptrc showed 0 unfreed.
Lazarus and fpc SVN versions.

And error 202 is Stack overflow, caused by reserving too much memory somewhere. Android has less in its disposal?
« Last Edit: November 24, 2012, 02:14:34 am by User137 »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8266
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Application exit on start
« Reply #3 on: November 24, 2012, 09:06:07 am »
Quote
The game played fine when i changed it to win32. Heaptrc showed 0 unfreed.
Lazarus and fpc SVN versions.
Yes, which is why I'm confused.
Lazarus 1.1 r38762 FPC 2.5.1v3 - arm-linux (special android patch)
Quote
And error 202 is Stack overflow, caused by reserving too much memory somewhere. Android has less in its disposal?
I have no idea about it. There was a bug like this in LCL a couple of months ago, but fixed already. So I don't know why it doesn't work on android.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8266
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Application exit on start
« Reply #4 on: November 28, 2012, 04:36:16 pm »
OK, finally found it out tonight. The debug build mode doesn't work, I don't know which option causes it. I switch to release mode and everything works! Now I just need to adjust my form size to the screen correctly, I'll put in another topic. Thank you...

 

TinyPortal © 2005-2018