-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
ncmpcpp Segmentation fault #3333
Comments
I built debug versions of ncmpcpp, boost and openssl and looked at it with gdb. At first I got:
But I'm not sure if this an actual problem or a variant of #1660. Anyways, ignoring that error (disabling the check for hardware sha512 capabilities) gives:
I guess we should patch ncmpcpp to just use UTF-8 and not check for other locales. I will experiment a bit with it later today and hopefully come up with a fix |
Applying this patch:
Unfortunately didn't change anything so the problem seem to be in boost. |
Attempted on-device build, no avail. Apparently a null pointer is dereferenced. It is indeed a boost problem. 04-11 18:12:21.668 29911 29911 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 29911 (ncmpcpp), pid 29911 (ncmpcpp)
04-11 18:12:21.684 29914 29914 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
04-11 18:12:21.686 29914 29914 I crash_dump64: performing dump of process 29911 (target tid = 29911)
04-11 18:12:21.687 29914 29914 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-11 18:12:21.687 29914 29914 F DEBUG : Build fingerprint: 'samsung/jackpotltexx/jackpotlte:9/PPR1.180610.011/A530FXXU4CSC6:user/release-keys'
04-11 18:12:21.687 29914 29914 F DEBUG : Revision: '7'
04-11 18:12:21.687 29914 29914 F DEBUG : ABI: 'arm64'
04-11 18:12:21.687 29914 29914 F DEBUG : pid: 29911, tid: 29911, name: ncmpcpp >>> ./ncmpcpp <<<
04-11 18:12:21.687 29914 29914 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
04-11 18:12:21.687 29914 29914 F DEBUG : Cause: null pointer dereference
04-11 18:12:21.687 29914 29914 F DEBUG : x0 0000007e4726e000 x1 0000000000000000 x2 0000000000000000 x3 0000007fcb1a69d8
04-11 18:12:21.687 29914 29914 F DEBUG : x4 0000007fcb1a69e0 x5 0000007fcb1a6b2d x6 0000000065757274 x7 0000000065757274
04-11 18:12:21.687 29914 29914 F DEBUG : x8 0000000000000000 x9 0000000000000008 x10 000000000000003d x11 0101010101010101
04-11 18:12:21.687 29914 29914 F DEBUG : x12 0000000000000000 x13 0000000000001840 x14 0000000000000070 x15 aaaaaaaaaaaaaaab
04-11 18:12:21.687 29914 29914 F DEBUG : x16 0000007e480f1088 x17 0000007e47b69bb4 x18 0000000000000001 x19 0000007e4726e000
04-11 18:12:21.687 29914 29914 F DEBUG : x20 0000007fcb1a6b24 x21 0000007e472332a8 x22 0000007fcb1a6b24 x23 0000000000000001
04-11 18:12:21.687 29914 29914 F DEBUG : x24 0000000000000040 x25 0000007fcb1a69f0 x26 0000000000000002 x27 0000000000000000
04-11 18:12:21.687 29914 29914 F DEBUG : x28 0000000000000000 x29 0000007fcb1a69c0
04-11 18:12:21.687 29914 29914 F DEBUG : sp 0000007fcb1a69b0 lr 0000007e4809bd28 pc 0000007e47b69be0
04-11 18:12:21.689 29914 29914 F DEBUG :
04-11 18:12:21.689 29914 29914 F DEBUG : backtrace:
04-11 18:12:21.689 29914 29914 F DEBUG : #00 pc 0000000000028be0 /system/lib64/libc.so (iconv+44)
04-11 18:12:21.689 29914 29914 F DEBUG : #01 pc 000000000001ad24 /data/data/com.termux/files/usr/lib/libboost_locale.so.1.69.0
04-11 18:12:21.689 29914 29914 F DEBUG : #02 pc 00000000000199b8 /data/data/com.termux/files/usr/lib/libboost_locale.so.1.69.0
04-11 18:12:21.689 29914 29914 F DEBUG : #03 pc 0000000000032828 /data/data/com.termux/files/usr/lib/libboost_locale.so.1.69.0
04-11 18:12:21.689 29914 29914 F DEBUG : #04 pc 0000000000031d40 /data/data/com.termux/files/usr/lib/libboost_locale.so.1.69.0
04-11 18:12:21.689 29914 29914 F DEBUG : #05 pc 000000000001fbbc /data/data/com.termux/files/usr/lib/libboost_locale.so.1.69.0 (boost::locale::generator::generate(std::__ndk1::locale const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&) const+292)
04-11 18:12:21.689 29914 29914 F DEBUG : #06 pc 000000000001fa6c /data/data/com.termux/files/usr/lib/libboost_locale.so.1.69.0 (boost::locale::generator::generate(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&) const+60)
04-11 18:12:21.689 29914 29914 F DEBUG : #07 pc 0000000000130328 /data/data/com.termux/files/home/ncmpcpp/src/ncmpcpp (Charset::internalLocale()+48)
04-11 18:12:21.689 29914 29914 F DEBUG : #08 pc 000000000015ad24 /data/data/com.termux/files/home/ncmpcpp/src/ncmpcpp (main+60)
04-11 18:12:21.690 29914 29914 F DEBUG : #09 pc 00000000000ae878 /system/lib64/libc.so (__libc_init+88) Somewhere here: https://github.com/boostorg/locale/blob/bc9ab436c525a7409f64926b8407e6215660debd/src/shared/generator.cpp#L120 Did some basic fixes, now ncmpcpp works again! https://github.com/bakaika/ncmpcpp |
Seems like boost uses iconv from libc instead of libandroid-support:
|
Hm, yes, starting ncmpcpp with |
Then I guess linking boost/ncmpcpp with libandroid-support should completely solve problem. |
ncmpcpp segfaults on android 9 because it picks up iconv in libc.so if we don't link against libandroid-support.so properly. This fixes termux#3333.
Yeah, libboost_locale is linked against libiconv/libandroid-support but ncmpcpp isn't, so I guess this is a variant of android/ndk#201. #3667 fixes it |
Otherwise mutt segfaults (sporadically) when trying to use iconv from libc on android pie. Probably related to the ncmcpp crash: #3333
Otherwise mutt segfaults (sporadically) when trying to use iconv from libc on android pie. Probably related to the ncmcpp crash: #3333
Otherwise mutt segfaults (sporadically) when trying to use iconv from libc on android pie. Probably related to the ncmcpp crash: #3333
Otherwise mutt segfaults (sporadically) when trying to use iconv from libc on android pie. Probably related to the ncmcpp crash: #3333
Hi, after installing latest packages still thee is here is logtrace, it looks like diferent error?
|
I'm not exactly sure where to begin. It's beyond my understanding. Ive been trying to understand and figure out where to begin but I've just been so confused. |
@ibeex what's your output of |
|
@ibeex The fix has only been pushed to the android >= 7 branch, you are subscribed to the android 5 & 6 repos. The android-7 repos are default for all fresh installations on android >= 7 devices since the last two weeks or so. To upgrade to this repo you can run |
@Grimler91 thx, this is it, now it works |
Otherwise mutt segfaults (sporadically) when trying to use iconv from libc on android pie. Probably related to the ncmcpp crash: #3333
Otherwise mutt segfaults (sporadically) when trying to use iconv from libc on android pie. Probably related to the ncmcpp crash: #3333
Otherwise mutt segfaults (sporadically) when trying to use iconv from libc on android pie. Probably related to the ncmcpp crash: #3333
Otherwise mutt segfaults (sporadically) when trying to use iconv from libc on android pie. Probably related to the ncmcpp crash: #3333
Otherwise mutt segfaults (sporadically) when trying to use iconv from libc on android pie. Probably related to the ncmcpp crash: #3333
Otherwise mutt segfaults (sporadically) when trying to use iconv from libc on android pie. Probably related to the ncmcpp crash: #3333
Otherwise mutt segfaults (sporadically) when trying to use iconv from libc on android pie. Probably related to the ncmcpp crash: #3333
Otherwise mutt segfaults (sporadically) when trying to use iconv from libc on android pie. Probably related to the ncmcpp crash: #3333
Otherwise mutt segfaults (sporadically) when trying to use iconv from libc on android pie. Probably related to the ncmcpp crash: #3333
Problem description
Starting
all pkgs upgraded.
Steps to reproduce
install ncmpcpp
start it
Additional information
Samsung galaxy s9+, android version 9
Depending on problem, additional information may be requested:
logcat -d "*:W"
.The text was updated successfully, but these errors were encountered: