Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 7.6.3 trace(lime.system.System.applicationDirectory) crashes #1358

Open
turdparty opened this issue Oct 17, 2019 · 1 comment
Open

Comments

@turdparty
Copy link

I created the DisplayingABitmap openfl sample and added trace(lime.system.System.applicationDirectory);

This causes a crash when running on Android 5.0.2.

10-17 11:27:04.462 19355-19381/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 19381 (SDLThread)
10-17 11:27:04.522 268-268/? I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
10-17 11:27:06.202 927-927/? D/CrashAnrDetector: Build: samsung/matisseltexx/matisselte:5.0.2/LRX22G/T535XXU1BQC1:user/release-keys
Hardware: MSM8226
Revision: 3
Bootloader: T535XXU1BQC1
Radio: unknown
Kernel: Linux version 3.4.0-10236903 (dpi@SWDD5005) (gcc version 4.8 (GCC) ) #1 SMP PREEMPT Wed Mar 8 19:11:59 KST 2017

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/matisseltexx/matisselte:5.0.2/LRX22G/T535XXU1BQC1:user/release-keys'
Revision: '3'
ABI: 'arm'
pid: 19355, tid: 19381, name: SDLThread  >>> org.openfl.samples.displayingabitmap <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
    r0 00000000  r1 00000000  r2 00fa3c78  r3 00000000
    r4 9e6b2198  r5 00000000  r6 00000000  r7 ffffffff
    r8 00000000  r9 afbf9b08  sl 12d7a080  fp afbf9adc
    ip a21b1a10  sp afbf8860  lr a1acac08  pc b6f29518  cpsr 600f0030
    d0  a04121a0afbf8870  d1  a17030c000000033
    d2  a04121a0afbf88a1  d3  a16b88d4afbf88a1
    d4  a1acab9ca16b88cc  d5  afbf887ca1a13370
    d6  a033ea6ca1ad976c  d7  a1ad9780a04121a0
    d8  000000004441c000  d9  0000000042700000
    d10 0000000000000000  d11 0000000000000000
    d12 0000000000000000  d13 0000000000000000
    d14 0000000000000000  d15 0000000000000000
    d16 0000000000000000  d17 4000000000000000
    d18 0a549b3c00000094  d19 ffffffffffffffff
    d20 76f1f0c7b45a9092  d21 0076f1f0c7b45a90
    d22 7687013773eeca02  d23 b43809bb9f765010
    d24 2abf0af313651a12  d25 0000557e15e626ca
    d26 2abf5f8d06833cd8  d27 683419e6c0000000
    d28 c28b45a646833cd8  d29 c28b45a646833cd7
    d30 0000000185168b4c  d31 0000000000000000
    scr 80000012

backtrace:
    #00 pc 00011518  /system/lib/libc.so (strlen+83)
    #01 pc 0007ec04  /data/app/org.openfl.samples.displayingabitmap-1/lib/arm/liblime.so
    #02 pc 0008d77c  /data/app/org.openfl.samples.displayingabitmap-1/lib/arm/liblime.so
    #03 pc 004bccec  /data/app/org.openfl.samples.displayingabitmap-1/lib/arm/libApplicationMain.so (_ZN4lime10_hx_system10System_obj18_hx___getDirectoryEi+1096)
    #04 pc 004bff30  /data/app/org.openfl.samples.displayingabitmap-1/lib/arm/libApplicationMain.so (_ZN4lime10_hx_system10System_obj24get_applicationDirectoryEv+92)
    #05 pc 00305d60  /data/app/org.openfl.samples.displayingabitmap-1/lib/arm/libApplicationMain.so (_ZN8Main_obj11__constructEv+108)
    #06 pc 008cc02c  /data/app/org.openfl.samples.displayingabitmap-1/lib/arm/libApplicationMain.so (_ZN17DocumentClass_obj11__constructEN2hx9ObjectPtrIN6openfl7display26DisplayObjectContainer_objEEE+148)
    #07 pc 008cc4a8  /data/app/org.openfl.samples.displayingabitmap-1/lib/arm/libApplicationMain.so (_ZN17DocumentClass_obj7__allocEPN2hx14ImmixAllocatorENS0_9ObjectPtrIN6openfl7display26DisplayObjectContainer_objEEE+100)
    #08 pc 00c3bc30  /data/app/org.openfl.samples.displayingabitmap-1/lib/arm/libApplicationMain.so (_ZN19ApplicationMain_obj5startEN2hx9ObjectPtrIN6openfl7display9Stage_objEEE+436)
    #09 pc 00c3a2c8  /data/app/org.openfl.samples.displayingabitmap-1/lib/arm/libApplicationMain.so (_ZZN19ApplicationMain_obj6createE7DynamicEN13_hx_Closure_27_hx_runEv+76)
    #10 pc 00c3a354  /data/app/org.openfl.samples.displayingabitmap-1/lib/arm/libApplicationMain.so (_ZZN19ApplicationMain_obj6createE7DynamicEN13_hx_Closure_25__runEv+20)
    #11 pc 000e1a48  /data/app/org.openfl.samples.displayingabitmap-1/lib/arm/libApplicationMain.so (_ZN7DynamicclEv+64)
    #12 pc 00975a40  /data/app/org.openfl.samples.displayingabitmap-1/lib/arm/libApplicationMain.so (_ZN4lime3app20_Event_Void_Void_obj8dispatchEv+208)
    #13 pc 00b84210  /data/app/org.openfl.samples.displayingabitmap-1/lib/arm/libApplicationMain.so (_ZN6openfl7display13Preloader_obj16display_onUnloadEN2hx9ObjectPtrINS_6events9Event_objEEE+676)
    #14 pc 00b84278  /data/app/org.openfl.samples.displayingabitmap-1/lib/arm/libApplicationMain.so (_ZN6openfl7displayL31__Preloader_objdisplay_onUnloadEPN2hx6ObjectERK7Dynamic+52)
    #15 pc 00ccfde0  /data/app/org.openfl.samples.displayingabitmap-1/lib/arm/libApplicationMain.so (_ZN2hx16CMemberFunction15__runERK7Dy

I noticed this because I ran into an issue with filenames. In higher android versions I usually get /storage/emulated/0 from Sys.environment().get("EXTERNAL_STORAGE"). But under Android 5.0.2 I get /storage/emulated/legacy, and that clashes with native Java getUriForFile and android.os.Environment.getExternalStorageDirectory() which remains /storage/emulated/0 and thus fails. Legacy does not seem to get resolved to 0, probably due to fileprovider being a hassle. In trying to work around it elegantly I ran into applicationdirectory and the instant crash above.

@player-03
Copy link
Contributor

Late response, but if this is still a problem, what happens when you try to access lime.system.System.documentsDirectory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants