SIGSEGV on Android device/emulator when library is being loaded
Original Reporter info from Mantis: lenz
-
Reporter name: Lenz Kessler
Original Reporter info from Mantis: lenz
- Reporter name: Lenz Kessler
Description:
Modifications to "dllprt0.as" in revision 24804 that address Issue ID 24519 seem to make application crash on Android upon loading SO file. This was discussed in this thread:
http://forum.lazarus.freepascal.org/index.php/topic,22944.0.html
Apparently, undoing the changes in revision 24804 seems to fix the problem.
This can always be reproduced on Motorola RAZR I with Android 4.1.2, on Android 2.3.3 x86 emulator and Android 4.4 x86 emulator. Replacing "\rtl\android\i386\dllprt0.as" file with the one attached resolves the problem.
Additional information:
My stack trace is:
12-16 21:38:29.452: A/libc(20058): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 20058 (native_activity)
12-16 21:38:29.472: W/IMGSRV(666): :0: gralloc_unregister_buffer: ID: 1267 handle: 0x579794c0 size: 540 x 888 fmt: 5 usage: 0xb00
12-16 21:38:29.472: W/IMGSRV(666): :0: gralloc_unregister_buffer: ID: 1268 handle: 0x53d2e3b0 size: 540 x 888 fmt: 5 usage: 0xb00
12-16 21:38:29.472: W/IMGSRV(666): :0: gralloc_unregister_buffer: ID: 1269 handle: 0x54c85bb0 size: 540 x 888 fmt: 5 usage: 0xb00
12-16 21:38:29.472: W/IMGSRV(383): :0: gralloc_device_free: ID: 1267 handle: 0x5a3be940 size: 540 x 888 fmt: 5 usage: 0xb00
12-16 21:38:29.472: W/IMGSRV(383): :0: gralloc_device_free: ID: 1268 handle: 0x5d327e00 size: 540 x 888 fmt: 5 usage: 0xb00
12-16 21:38:29.552: I/DEBUG(138): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-16 21:38:29.552: I/DEBUG(138): Build fingerprint: 'motorola/XT890_amxmx/smi:4.1.2/9.8.2I-50_SML-25/1362161579:user/release-keys'
12-16 21:38:29.552: I/DEBUG(138): pid: 20058, tid: 20058, name: native_activity >>> com.aaademo.native_activity <<<
12-16 21:38:29.552: I/DEBUG(138): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
12-16 21:38:29.772: I/DEBUG(138): eax bf8c470c ebx 40038fb8 ecx 40040000 edx 536f3f3f
12-16 21:38:29.772: I/DEBUG(138): esi 00000002 edi 53734000
12-16 21:38:29.772: I/DEBUG(138): xcs 00000073 xds 0000007b xes 0000007b xfs 00000000 xss 0000007b
12-16 21:38:29.772: I/DEBUG(138): eip 536f3f51 ebp bf8c3e48 esp bf8c3e40 flags 00210282
12-16 21:38:29.772: I/DEBUG(138): backtrace:
12-16 21:38:29.772: I/DEBUG(138): #00 pc 0000df51 /data/data/com.aaademo.native_activity/lib/libaaademo.so
12-16 21:38:29.772: I/DEBUG(138): #01 pc 00005c98 /system/bin/linker (__dl_call_constructors_recursive+1160)
12-16 21:38:29.772: I/DEBUG(138): stack:
12-16 21:38:29.782: I/DEBUG(138): bf8c3e00 00000000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e04 00000000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e08 00000000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e0c 00000000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e10 00000000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e14 00000000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e18 00000000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e1c 00000000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e20 00000000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e24 00000000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e28 00000000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e2c 00000000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e30 00000000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e34 00000000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e38 00000000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e3c 00000000
12-16 21:38:29.782: I/DEBUG(138): #00 bf8c3e40 536f3fe9 /data/data/com.aaademo.native_activity/lib/libaaademo.so
12-16 21:38:29.782: I/DEBUG(138): bf8c3e44 40038fb8 /system/bin/linker
12-16 21:38:29.782: I/DEBUG(138): bf8c3e48 00000004
12-16 21:38:29.782: I/DEBUG(138): bf8c3e4c 40009c98 /system/bin/linker (__dl_call_constructors_recursive+1160)
12-16 21:38:29.782: I/DEBUG(138): #01 bf8c3e50 4205ff00 /dev/ashmem/dalvik-heap (deleted)
12-16 21:38:29.782: I/DEBUG(138): bf8c3e54 40eecaf8 /system/lib/libdvm.so
12-16 21:38:29.782: I/DEBUG(138): bf8c3e58 536e71cd /data/data/com.aaademo.native_activity/lib/libaaademo.so
12-16 21:38:29.782: I/DEBUG(138): bf8c3e5c 40040000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e60 00000070
12-16 21:38:29.782: I/DEBUG(138): bf8c3e64 bf8c3f00 [stack]
12-16 21:38:29.782: I/DEBUG(138): bf8c3e68 4000809b /system/bin/linker (__dl_link_image.isra.5+11)
12-16 21:38:29.782: I/DEBUG(138): bf8c3e6c 40038fb8 /system/bin/linker
12-16 21:38:29.782: I/DEBUG(138): bf8c3e70 00000000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e74 40040000
12-16 21:38:29.782: I/DEBUG(138): bf8c3e78 52f31750
12-16 21:38:29.782: I/DEBUG(138): bf8c3e7c 4003a85c
12-16 21:38:29.782: I/DEBUG(138): bf8c3e80 52f3177b
12-16 21:38:29.782: I/DEBUG(138): bf8c3e84 4003a740
12-16 21:38:29.782: I/DEBUG(138): bf8c3e88 0000006e
12-16 21:38:29.782: I/DEBUG(138): bf8c3e8c 4006f7bf /system/lib/libc.so (malloc+31)
Mantis conversion info:
- Mantis ID: 25435
- OS: Android
- OS Build: 4.1.2
- Build: trunk revision 26249
- Platform: i386
- Version: 2.7.1
- Fixed in version: 3.0.0
- Fixed in revision: 26269 (#90b8e051)