[solved?] Crash in libicui18n on Android 8.1 oreo 64 bit lazarus / 43-Android ---------------------------------------------------------------------- BeniBela · 2018-09-25 16:56 It crashes during the initialization: QuoteCode: [Select]#0  0xf6ff00b2 in icu_58::Collator::createInstance(icu_58::Locale const&, UErrorCode&) ()    from /system/lib/libicui18n.so #1  0xf70879b4 in ucol_open_58 ()    from /system/lib/libicui18n.so #2  0xaab649d0 in CWSTRING_$$_INITTHREADDATA () #3  0xaab64a88 in CWSTRING_$$_GETCONVERTER$WORD$$POINTER () #4  0xaab64e58 in CWSTRING_$$_ANSI2UNICODEMOVE$PCHAR$WORD$UNICODESTRING$LONGINT () #5  0xaab65a70 in CWSTRING_$$_ANSI2WIDEMOVE$PCHAR$WORD$WIDESTRING$LONGINT () #6  0xaaaef0c4 in fpc_ansistr_to_widechararray     () #7  0xaaaf7860 in SYSTEM_$$_ASSIGN$TEXT$RAWBYTESTRING () #8  0xaaaf78e8 in SYSTEM_$$_ASSIGN$TEXT$SHORTSTRING () #9  0xaab66dbc in DL_$$_DLADDR$POINTER$PDL_INFO$$LONGINT () #10 0xaab61268 in SYSUTILS_$$_INITANDROID () #11 0xaab61320 in SYSUTILS_$$_init$ () #12 0xaaaf3e2c in fpc_initializeunits () #13 0xaaade430 in main () at xidel.pas:77 (gdb) How can we prevent this? ---------------------------------------------------------------------- yuriy_sydorov · 2018-10-19 14:05 I've fixed several cwstring issues for Android recently. Please try to build a crosscompiler using the latest trunk sources. Then check if the issue is still exists. ---------------------------------------------------------------------- BeniBela · 2018-10-26 16:48 Guess we will need to wait for someone with an affected device to reply on my github issue, before anything can be checked... Is there no option to disable cwstring? It is only making problems (remember dlopen?). I do not think I ever needed cwstring. I register my own utf8<->utf16 conversion routines as widestring manager ---------------------------------------------------------------------- Thaddy · 2018-10-26 16:54 I can't reproduce your problem. It may be that you have some kind of over-confidence in your ability. I often have the same problem. better to debug cwstrings then? ---------------------------------------------------------------------- yuriy_sydorov · 2018-11-01 11:28 Quote from: BeniBela on October 26, 2018, 06:48:24 pmIs there no option to disable cwstring? It is only making problems (remember dlopen?). Just don't use cwstring and clocale to unbind your app from ICU. A workaround for the dlopen issue have been implemented long time ago. ---------------------------------------------------------------------- BeniBela · 2018-11-01 19:41 Quote from: yuriy_sydorov on November 01, 2018, 12:28:09 pmJust don't use cwstring and clocale to unbind your app from ICU. That is not so easy Sysutils uses unix, which uses cwstring Not using Sysutils is kind of hard ---------------------------------------------------------------------- yuriy_sydorov · 2018-11-03 12:32 Quote from: BeniBela on November 01, 2018, 08:41:03 pmThat is not so easy Sysutils uses unix, which uses cwstring Not using Sysutils is kind of hard Indeed. I've fixed it in r40198. It allows you to not include cwstring at all. ---------------------------------------------------------------------- BeniBela · 2018-11-21 23:36 Quote from: yuriy_sydorov on November 03, 2018, 01:32:06 pmQuote from: BeniBela on November 01, 2018, 08:41:03 pmThat is not so easy Sysutils uses unix, which uses cwstring Not using Sysutils is kind of hard Indeed. I've fixed it in r40198. It allows you to not include cwstring at all. Thanks Another idea would be to split this cwstring in two units, the ordinary cwstring for Android and a unit to load libicui that does not depend on Android. Then one could use functions from libicui on Linux. One day I need  collation comparisons