Author Topic: Android crash  (Read 687 times)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10661
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Android crash
« on: 2018-May-18 »
This time it's me :(

I have one app that runs perfectly, and one that does not even start:

05-18 16:35:16.670 12570 12570 E AndroidRuntime: FATAL EXCEPTION: main
05-18 16:35:16.670 12570 12570 E AndroidRuntime: Process: com.glbasic.bobbleheads, PID: 12570
05-18 16:35:16.670 12570 12570 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: library "libcutils.so" not found
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at java.lang.Runtime.loadLibrary0(Runtime.java:989)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at java.lang.System.loadLibrary(System.java:1562)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at org.libsdl.app.SDLActivity.<clinit>(SDLActivity.java:259)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at java.lang.Class.newInstance(Native Method)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at android.app.Instrumentation.newActivity(Instrumentation.java:1079)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2591)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2766)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at android.app.ActivityThread.-wrap12(ActivityThread.java)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1507)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:102)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:154)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6236)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)


What could that be?

Edit: removing -lcutils in platforminfo.txt fixed the problem. But... why did it work in the first project?
« Last Edit: 2018-May-18 by Kitty Hello »

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3473
    • View Profile
    • Space Fractal
Re: Android crash
« Reply #1 on: 2018-May-18 »
im havent toiched android quite a much, but its property not used at all. Also…. We need to move the project to Android Studio in the future, or we will not been possible to release it to Google Play from Aug. The reason is SDK Manager is depracted and require Android Studio to get the newest API.

But howover im do thinks its more or less move the tempproj to Android Studio and compile the last bits here. Its same sort as with xCode. But we can NOT use the standalone compiler anymore.

Btw something could have changed with the sdk we using now. But nice to let know. we can remove its safeliy if not required.

ALso which Android version was it with?
« Last Edit: 2018-May-19 by spacefractal »
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1314
    • View Profile
Re: Android crash
« Reply #2 on: 2018-Jun-01 »
IF GLB can be sorted and ready for new api requirement - it could gain / win-over a lot of new users...other frameworks are trying to sort this issue too.

Once your app manifest is set above the 23+ api level you cannot revert it back...I did that with two of my apps - so I am stuck with the issue.

A fix for clean build with API-26+ going forward would be fab!
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1314
    • View Profile
Re: Android crash
« Reply #3 on: 2018-Jun-01 »
Literally - in 1 day after updating my api-22 app to api-26
I went from

2 crashes on average
to
258 crashes!! with user base of 1400 users

I downgraded back as far as playstore would allow (api-23) and hope that reduces the bulk of those crashes (all the same crash report!  'main' library load issue


  at java.lang.Runtime.loadLibrary0 (Runtime.java:977)
  at java.lang.System.loadLibrary (System.java:1530)
  at org.libsdl.app.SDLActivity.<clinit> (SDLActivity.java:235)
  at java.lang.Class.newInstance (Native Method)
  at android.app.Instrumentation.newActivity (Instrumentation.java:1079)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2616)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2785)
  at android.app.ActivityThread.-wrap12 (ActivityThread.java)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1532)
  at android.os.Handler.dispatchMessage (Handler.java:102)
  at android.os.Looper.loop (Looper.java:163)
  at android.app.ActivityThread.main (ActivityThread.java:6342)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:880)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:770)


Offending line in SDLacitivty seems to be....

        System.loadLibrary("main");

Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3473
    • View Profile
    • Space Fractal
Re: Android crash
« Reply #4 on: 2018-Jun-02 »
try to remove that -lcutils platforminfo.txt, can been the same issue as Gernot had and something we should add to the sticky. Im have currectly no plans to update the Android etc.

But we do need to move the whole project to Android Studio, so we only have the tempproject left, which can been open and compile it from Android Studio with its final code.

Also Admob will property NOT work with newer Api, due its not supporting the old SDK anymore. that part is also require Android Studio completly.

To been even worse, SDK Manager.exe is depreacted :-(. so the newer SDK can no longer to been downloaded. This is simply just.... Crap!


PS. A Steam version should only include the Windows version really by now and not include other platforms me thinks. There is also issues with MacOS as well Linux as well (last time im did not get the games to work under SteamOS, dispite its have all required libs installed by default.

PPS. Im do previous have wrote im will leave the Android and iOS market and im still hold me far away. Im dont like mobile market at all anymore generally.
« Last Edit: 2018-Jun-02 by spacefractal »
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1314
    • View Profile
Re: Android crash
« Reply #5 on: 2018-Jun-02 »
Hi,

Where do I find that file?
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1314
    • View Profile
Re: Android crash
« Reply #6 on: 2018-Jun-02 »
Okay so is it the platform.ini file not platforminfo.txt?

Also, is the cutils important for any specific features or can all run as normal without it?!
« Last Edit: 2018-Jun-02 by MrPlow »
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3473
    • View Profile
    • Space Fractal
Re: Android crash
« Reply #7 on: 2018-Jun-03 »
property not as gernot wrote. but im have not tested it. im also even not have clean what its really does.


property cutils changes from version to version and device and device (and is not even a part of the NDK at all), so glbasic should not rely on that anyway, as im have read on. So its best if its can been removed. But howover its might not run on older device? But im dont now here, since im cannot test at all.
« Last Edit: 2018-Jun-03 by spacefractal »
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.