GLBasic forum

Main forum => GLBasic - en => Topic started by: msx on 2016-Aug-26

Title: [SOLVED] Crashing on Android 6
Post by: msx on 2016-Aug-26
A user complains that the application crash in Galaxy S7 on Android 6. Has anyone tried GLB is this version of Android ?.
Title: Re: Crashing on Android 6
Post by: spacefractal on 2016-Aug-26
I'm do still not got android 6. But it's so might crash on some devices when DOCUMENTS is used, if you try to write to it folder. Something I'm can't do very much right now.

Another reason could been the low user memory issue.

Personally I'm haven't checked out Andeoid 6.

But use APPDATA to save your stuff.

I'm guess I'm will change it in next version of ae when Android 6 is detected. I'm do not have idea it's that issue, due I'm so not have a logcat.
Title: Re: Crashing on Android 6
Post by: Qedo on 2016-Aug-26
my application (animationfont) works perfectly on Android 6.0 (LG G3)
Title: Re: Crashing on Android 6
Post by: Slydog on 2016-Aug-26
I have an S7 (Edge), Android 6.0.1.

I no longer program in GLBasic, but give me an APK file and I can test it if you want.
At least you'll know if it's his phone only, or maybe all S7 Android 6s.
Title: Re: Crashing on Android 6
Post by: spacefractal on 2016-Aug-26
And I'd it's does then I'm want the logcat.

It's was a issue with OUYA, which mins me in the DOCUMENTS issue. I'm have no idea it's this crash.
Title: Re: Crashing on Android 6
Post by: MrPlow on 2016-Aug-26
One of my apps has 12k of Android 6.0 users to date and no reports of bad crashes :)
Title: Re: Crashing on Android 6
Post by: Kitty Hello on 2016-Aug-26
Im on 6 and it works...
Title: Re: Crashing on Android 6
Post by: msx on 2016-Aug-27
I leave the APK in the Bonus section if anyone can prove it.
Title: Re: Crashing on Android 6
Post by: msx on 2016-Aug-27
Quote from: Slydog on 2016-Aug-26
I have an S7 (Edge), Android 6.0.1.

I no longer program in GLBasic, but give me an APK file and I can test it if you want.
At least you'll know if it's his phone only, or maybe all S7 Android 6s.

You have a PM.

Thank you.
Title: Re: Crashing on Android 6
Post by: msx on 2016-Aug-27
Quote from: spacefractal on 2016-Aug-26
I'm do still not got android 6. But it's so might crash on some devices when DOCUMENTS is used, if you try to write to it folder. Something I'm can't do very much right now.

Another reason could been the low user memory issue.

Personally I'm haven't checked out Andeoid 6.

But use APPDATA to save your stuff.

I'm guess I'm will change it in next version of ae when Android 6 is detected. I'm do not have idea it's that issue, due I'm so not have a logcat.


I am informed that only a black screen appears and disappears while the application remains running in the background, but if you try to enter again, crash again.

I'm not using DOCUMENTS.

There any way to make a log?
Title: Re: Crashing on Android 6
Post by: spacefractal on 2016-Aug-27
im need the logcat from the sdk, before im can investate what happens. Its can been anything.

Im do also heard, if you use ads, its >might< crash on some devices (which im have seen on Sony Z3 example). Hence im removed all ads for my games and use inapp purchase instead.

Another issues for crash can been in too low memory (the internal memory is full, which can cause a crash). Something nothing im can do.

Its can also been a bug as well, not resume correctly using the SUB functions?

Also you should use ALLOWESCAPE FALSE and AUTOPAUSE FALSE, which should been default for Android, where ALLOWESCAPE TRUE does not give any means at all..... Gernot wont allow me to change that to default, even its quite important (while ALLOWESCAPE TRUE works perfectly on dekstop, its not the case on mobile).

But in the end, im do need the logcat from the user. Otherwise im can do nothing.

PS. Are your androidmanifest set to use 22 as target sdk and 11 as minimum sdk. glbasic does no longer supports android 2.x
Title: Re: Crashing on Android 6
Post by: msx on 2016-Aug-27
im need the logcat from the sdk, before im can investate what happens. Its can been anything.

I need you to tell me how I get the logcat from the APK because I can not try it on Android 6.

Im do also heard, if you use ads, its >might< crash on some devices (which im have seen on Sony Z3 example). Hence im removed all ads for my games and use inapp purchase instead.

Finally I dismissed use ADS.

Another issues for crash can been in too low memory (the internal memory is full, which can cause a crash). Something nothing im can do.

The same two devices with Android 6

Its can also been a bug as well, not resume correctly using the SUB functions?

I use functions SUB, it could be that.

Also you should use ALLOWESCAPE FALSE and AUTOPAUSE FALSE, which should been default for Android, where ALLOWESCAPE TRUE does not give any means at all..... Gernot wont allow me to change that to default, even its quite important (while ALLOWESCAPE TRUE works perfectly on dekstop, its not the case on mobile).

I will try to add this code.

But in the end, im do need the logcat from the user. Otherwise im can do nothing.

PS. Are your androidmanifest set to use 22 as target sdk and 11 as minimum sdk. glbasic does no longer supports android 2.x

The AndroidManifest has the values 9 and 19 for minimum skd and target, perhaps it could be that too, although Android 4 works well.
Title: Re: Crashing on Android 6
Post by: spacefractal on 2016-Aug-27
Also Android can been hell to work on anything..... Logcat is from adb connected. It's it's Java issue, it's will tell where it's crashed.

But it's only what I'm experimented.

Also ads don't work with Android TV at all, If you support that.

Sadly I'm can't get the same device, so currently nothing I'm can due right now.

Title: Re: Crashing on Android 6
Post by: msx on 2016-Aug-28
I have installed Android 6.0 on Virtualbox and have sent me an error report. It could be just a bug in virtualization, anyway I put here the error report ...

Quote

java.lang.UnsatisfiedLinkError

en java.lang.Runtime.loadLibrary



java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.crislosangames.aradar-1/lib/arm/libSDL2.so" has unexpected e_machine: 40
   at java.lang.Runtime.loadLibrary(Runtime.java:372)
   at java.lang.System.loadLibrary(System.java:1076)
   at org.libsdl.app.SDLActivity.<clinit>(SDLActivity.java:244)
   at java.lang.Class.newInstance(Native Method)
   at android.app.Instrumentation.newActivity(Instrumentation.java:1067)
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2317)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
   at android.app.ActivityThread.-wrap11(ActivityThread.java)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
   at android.os.Handler.dispatchMessage(Handler.java:102)
   at android.os.Looper.loop(Looper.java:148)
   at android.app.ActivityThread.main(ActivityThread.java:5415)
   at java.lang.reflect.Method.invoke(Native Method)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:744)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
Title: Re: Crashing on Android 6
Post by: spacefractal on 2016-Aug-28
Virtual is not supported very well or not at all. OpenGL is required and is not supported there.
Title: Re: Crashing on Android 6
Post by: msx on 2016-Aug-28
SUB functions removed. Added ALLOWSCAPE FALSE and AUTOPAUSE FALSE.

Ian Price says that the app crash inmediately on Android 6. :(
Title: Re: Crashing on Android 6
Post by: spacefractal on 2016-Aug-28
Sub functions sould actually been used for best, etc for saving example (SUB GLB_ON_RESUME and GLB_ON_PAUSE). GLB_ON_QUIT is sometimes called, but not allways. They are best to been used when ALLOWESCAPE is set to FALSE.

Im do still need the crash log, if its a Java or a permission issue.

Virtual machines is not supported, due OpenGl is missing, bt emulators like BlueStacks is supported.

Currectly im do only have Android 5.x.

Ian Price, can you send me the crash logcat from ADB. Im need that to checkout.

PS. Make sure to use the newest Android Extras. Im dont thinks you due, since im have fixed the gps issue some time ago. Its should NOT ask for gps location on newer Android, even when the permission was not set. A strange Android bug really.
Title: Re: Crashing on Android 6
Post by: msx on 2016-Aug-28
Is it necessary GLB_ON_PAUSE and GLB_ON_RESUME in my code?


Enviado desde mi iPhone utilizando Tapatalk
Title: Re: Crashing on Android 6
Post by: spacefractal on 2016-Aug-28
only if you save and load game progress. otherwise not.
Title: Re: Crashing on Android 6
Post by: MrPlow on 2016-Aug-29
You need GLB ON PAUSE / RESUME for showing Ads and probably Inapp purchases too :)
Title: Re: Crashing on Android 6
Post by: msx on 2016-Aug-29
I have not yet managed to run correctly InApp, so I have not implemented.


Enviado desde mi iPhone utilizando Tapatalk
Title: Re: Crashing on Android 6
Post by: msx on 2016-Sep-01
Fixed up. I had to make a DoesFileExist for each Sprite, Font, File or INI file that I loaded. Now it works fine.
Title: Re: [SOLVED] Crashing on Android 6
Post by: spacefractal on 2016-Sep-01
I'm only did that for data files, not media. But you can make sure.

But I'm will check why OPENFILE fails to call it automatic. Can been a bug :-)
Title: Re: [SOLVED] Crashing on Android 6 (OPENFILE fails, confirmed)
Post by: spacefractal on 2016-Sep-01
im confirm there is a bug in OPENFILE, its does not call glb_prepare_reading_file(s) correctly. Its only call it on one case. Gernot, you should move it top of the command to make sure its called.
Title: Re: [SOLVED] Crashing on Android 6
Post by: msx on 2016-Sep-01
Loadmusic, Loadsprite,... not find the files without using DOESFILEEXIST
Title: Re: [SOLVED] Crashing on Android 6
Post by: spacefractal on 2016-Sep-01
can been a newer bug in glb_prepare_reading_file(s). Im checks out. Greedy Mouse do still use glbasic 12 throught. So the path fix might have breaked it?

Howover you could also do a CREATEDIR "Media", which im thinks can been the main isssue (folder not exists). But im will still count a bug.

Please report it in the bug section (even its fixed, its not 100% the right way, since glbasic should have do that automatic, but can been buggy for Android 6).