0

I am using some local HTML5 files within an embedded WebView in an Android app. This is built with only SDK, not NDK. When the WebView loads, there is a segmentation fault on HTC One X (not on any other phones), and the app crashes. I've read that the ndk-stack can be used to see the stack trace of the where the problem might arise. But without the obj directory, ie. with the sdk-only project, is it possible to use the ndk-stack?

01-11 12:19:40.286: I/DEBUG(139): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-11 12:19:40.286: I/DEBUG(139): Build fingerprint: 'htc_europe/endeavoru/endeavoru:4.0.3/IML74K/56722.9:user/release-keys'
01-11 12:19:40.286: I/DEBUG(139): pid: 7062, tid: 7078  >>> com.bose.sample.android <<<
01-11 12:19:40.286: I/DEBUG(139): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000014c
01-11 12:19:40.286: I/DEBUG(139):  r0 00000000  r1 50a8d210  r2 43b40000  r3 505406cd
01-11 12:19:40.286: I/DEBUG(139):  r4 025c1ad8  r5 00000000  r6 023c0738  r7 02339588
01-11 12:19:40.286: I/DEBUG(139):  r8 51fa5aa0  r9 51fa5a34  10 51fa5ab8  fp 00000001
01-11 12:19:40.286: I/DEBUG(139):  ip 000000a0  sp 51fa5920  lr 505406d9  pc 50540342  cpsr a0000030
01-11 12:19:40.286: I/DEBUG(139):  d0  0000000000000000  d1  000001680000000c
01-11 12:19:40.286: I/DEBUG(139):  d2  3f80000000000000  d3  0000000000000000
01-11 12:19:40.286: I/DEBUG(139):  d4  8000000000000000  d5  000000003f800000
01-11 12:19:40.286: I/DEBUG(139):  d6  0000000000000000  d7  4140000043b40000
.............
01-11 12:19:40.286: I/DEBUG(139):  scr 20000013
01-11 12:19:40.436: I/DEBUG(139):          #00  pc 001b4342  /system/lib/libwebcore.so
01-11 12:19:40.436: I/DEBUG(139):          #01  pc 001b46d4  /system/lib/libwebcore.so
01-11 12:19:40.436: I/DEBUG(139):          #02  pc 003c8fbc  /system/lib/libwebcore.so
01-11 12:19:40.436: I/DEBUG(139):          #03  pc 003c9e32  /system/lib/libwebcore.so
...............

Thanks,
Rajath

Rajath
  • 11,787
  • 7
  • 48
  • 62
  • It may actually be possible to deduce a fair amount by dumping the installed .so. However, consider the alternate approach of experimentally reducing the HTML5 files to a minimal case still able to cause the crash. – Chris Stratton Dec 19 '13 at 21:18

1 Answers1

1

In this case object file you need is located on the device /system/lib/libwebcore.so, however you may not have permission to access it. Even you've managed to get it, that file is stripped of debug symbols - meaning it won't tell you anything valuable.

auselen
  • 27,577
  • 7
  • 73
  • 114
  • 1
    Well, everybody has read access to `/system/lib`, but it does not help much in the discussed case, because any debug info was stripped from these libraries. I think the circumstances require a bug report to HTC. – Alex Cohn Jan 12 '13 at 19:58
  • Just because a library is stripped doesn't mean it is devoid of useful information. Remember that all dynamically linked functions are still going to have names. Particularly where you have generally closely comparable source available from AOSP, it may actually be possible to figure out quite a bit about what was going on at the time of the crash. Keep in mind also that we do not know if the crash is truly vendor unique, or if that device is simply the only one with that precise upstream Android version which the tester had available. – Chris Stratton Dec 19 '13 at 21:16
  • @ChrisStratton omitting frame pointers, having a huge library with a single entry... all for making life of developers easier. – auselen Dec 19 '13 at 22:19