简体   繁体   中英

Android Open Source, screenrecord “SIGBUS”

  1. Using Samsung Galaxy S6 ( @ v5.1.1 )
  2. I have compiled Android OS 5.1.1_r33 in accordance to https://source.android.com/source/building.html ( aosp_arm-eng )
  3. In specific I have compiled "screenrecord" ( and not the rest of the OS )
  4. I have copied 'screenrecord' to '/data/local/tmp/' using adb push ( on the real device )
  5. Lunching /data/local/tmp/screenrecord --verbose --bugreport /data/local/tmp/dump.mp4 is causing "Fatal signal 7 (SIGBUS), code 1, fault addr 0xf4c08e3f in tid 3263 (screenrecord)".
  6. This doesn't happen w/ the built-in 'screenrecord', only w/ the one I manually compile.

This has properly worked w/ Android 5.0 @ Galaxy S5, and, is working on Android 6.0 @ Nexus 5 , what may be the problem? what might cause the crash?


Logcat Stack trace

F/libc    ( 3263): Fatal signal 7 (SIGBUS), code 1, fault addr 0xf4c08e3f in tid 3263 (screenrecord_5_)

I/DEBUG   ( 2965): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

I/DEBUG   ( 2965): Build fingerprint: 'samsung/zerofltexx/zeroflte:5.1.1/LMY47X/G920FXXU3COI9:user/release-keys'

W/NativeCrashListener( 3566): Couldn't find ProcessRecord for pid 3263

I/DEBUG   ( 2965): Revision: '11'

E/DEBUG   ( 2965): AM write failure (32 / Broken pipe)

I/DEBUG   ( 2965): ABI: 'arm'

I/DEBUG   ( 2965): pid: 3263, tid: 3263, name: screenrecord_5_  >>> /data/local/tmp/screenrecord_5_1_1_r33 <<<

I/DEBUG   ( 2965): signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xf4c08e3f

I/DEBUG   ( 2965):     r0 000001cc  r1 0000fffe  r2 000001f6  r3 00000001

I/DEBUG   ( 2965):     r4 f4c08e17  r5 f4438000  r6 f4400000  r7 000001cd

I/DEBUG   ( 2965):     r8 f4c08d40  r9 f76426a4  sl 00000001  fp 00000010

I/DEBUG   ( 2965):     ip 0000ffff  sp ffa72048  lr f761b811  pc f760e254  cpsr 20030030

I/DEBUG   ( 2965): 

I/DEBUG   ( 2965): backtrace:

I/DEBUG   ( 2965):     #00 pc 00042254  /system/lib/libc.so (je_arena_dalloc_bin_locked+399)

I/DEBUG   ( 2965):     #01 pc 0004f80d  /system/lib/libc.so (je_tcache_bin_flush_small+240)

I/DEBUG   ( 2965):     #02 pc 0004a06d  /system/lib/libc.so (ifree+448)

I/DEBUG   ( 2965):     #03 pc 00012d57  /system/lib/libc.so (free+10)

I/DEBUG   ( 2965):     #04 pc 0000cb2b  /system/lib/libstagefright_foundation.so (android::AMessage::clear()+24)

I/DEBUG   ( 2965):     #05 pc 0000cb5b  /system/lib/libstagefright_foundation.so (android::AMessage::~AMessage()+18)

I/DEBUG   ( 2965):     #06 pc 0000cb75  /system/lib/libstagefright_foundation.so (android::AMessage::~AMessage()+4)

I/DEBUG   ( 2965):     #07 pc 0000ede5  /system/lib/libutils.so (android::RefBase::decStrong(void const*) const+40)

I/DEBUG   ( 2965):     #08 pc 000056cd  /data/local/tmp/screenrecord_5_1_1_r33 (android::sp<android::AMessage>::~sp()+10)

I/DEBUG   ( 2965):     #09 pc 000a74bd  /system/lib/libstagefright.so (android::MediaCodec::dequeueOutputBuffer(unsigned int*, unsigned int*, unsigned int*, long long*, unsigned int*, long long)+244)

I/DEBUG   ( 2965):     #10 pc 00004d19  /data/local/tmp/screenrecord_5_1_1_r33

I/DEBUG   ( 2965):     #11 pc 00012e9d  /system/lib/libc.so (__libc_init+44)

I/DEBUG   ( 2965):     #12 pc 00005320  /data/local/tmp/screenrecord_5_1_1_r33

Solution was simple

  1. Samsung has it's own Android Flavor built upon Googles Android Open Source
  2. Before building for Samsung the code base should be updated to support Samsung Flavor
  3. Code base update is done by downloading Samsung's code @ http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=G920F
  4. And adding it on to Googles Android code-base.
  5. Build & deploy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM