Recent

Author Topic: [solved?] Crash in libicui18n on Android 8.1 oreo 64 bit  (Read 4571 times)

BeniBela

  • Hero Member
  • *****
  • Posts: 905
    • homepage
[solved?] Crash in libicui18n on Android 8.1 oreo 64 bit
« on: September 25, 2018, 06:56:48 pm »
It crashes during the initialization:

Quote
Code: [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?
« Last Edit: November 22, 2018, 12:36:21 am by BeniBela »

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 158
Re: Crash in libicui18n on Android 8.1 oreo 64 bit
« Reply #1 on: October 19, 2018, 04:05:38 pm »
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

  • Hero Member
  • *****
  • Posts: 905
    • homepage
Re: Crash in libicui18n on Android 8.1 oreo 64 bit
« Reply #2 on: October 26, 2018, 06:48:24 pm »
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

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: Crash in libicui18n on Android 8.1 oreo 64 bit
« Reply #3 on: October 26, 2018, 06:54:35 pm »
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?
Specialize a type, not a var.

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 158
Re: Crash in libicui18n on Android 8.1 oreo 64 bit
« Reply #4 on: November 01, 2018, 12:28:09 pm »
Is 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

  • Hero Member
  • *****
  • Posts: 905
    • homepage
Re: Crash in libicui18n on Android 8.1 oreo 64 bit
« Reply #5 on: November 01, 2018, 08:41:03 pm »
Just 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

  • Full Member
  • ***
  • Posts: 158
Re: Crash in libicui18n on Android 8.1 oreo 64 bit
« Reply #6 on: November 03, 2018, 01:32:06 pm »
That 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

  • Hero Member
  • *****
  • Posts: 905
    • homepage
Re: Crash in libicui18n on Android 8.1 oreo 64 bit
« Reply #7 on: November 22, 2018, 12:36:05 am »
That 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

 

TinyPortal © 2005-2018