ARM - crash on NumberFormat

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
nmset
Posts: 12
Joined: Thu May 13, 2010 7:35 pm

ARM - crash on NumberFormat

Post by nmset »

Hello,

The following code works well on x86_64 and always results in AOO crash on ARM.

Code: Select all

Sub Test()
	On Error GoTo ErrHandler
	Dim dt As Date, sf, res As String
	dt = Now()
	sf = "JJJJ JJ MMMM AAAA - HH:MM:SS"
	res = FormatDate(dt, sf)
	MsgBox res
	Exit Sub
ErrHandler:
	MsgBox Error$
End Sub

Function FormatDate(dDate As Date, sFormat As String)
	Dim oNumberFormatter, oDoc As Object, formatId As Integer, NumberFormats as Object
	oDoc = ThisComponent
	NumberFormats = oDoc.getNumberFormats()
	oLocale  = createUnoStruct( "com.sun.star.lang.Locale" ) 
	oLocale.Language = "fr"	   'On Error GoTo 0
	oLocale.Country = "FR"
	formatId = NumberFormats.queryKey(sFormat, oLocale, True)
	If formatId = -1 Then
	   formatId = NumberFormats.addNew(sFormat, oLocale)
	End If
	oNumberFormatter = createUnoService("com.sun.star.util.NumberFormatter") 
	oNumberFormatter.attachNumberFormatsSupplier(oDoc) 
	
	FormatDate = oNumberFormatter.convertNumberToPreviewString ( sFormat, dDate, oLocale, true )
	
End Function
I haven't found any such report.

Info:
$ uname -a
Linux localhost 3.8.13.28-3-ARCH #3 SMP PREEMPT Thu Oct 9 22:49:47 MDT 2014 armv7l GNU/Linux

uname -a
Linux localhost 3.17.6-1-ARCH #1 SMP PREEMPT Sun Dec 7 23:43:32 UTC 2014 x86_64 GNU/Linux
AOO on ARM has been compiled with the following configure line :

Code: Select all

./configure --disable-debug –disable-unit-tests --without-junit --with-lang=ALL --with-package-format=installed --with-epm=/usr/bin/epm --enable-category-b --enable-gstreamer --enable-opengl --enable-beanshell --enable-hyphen --enable-hunspell --enable-minimizer --enable-presenter-console --enable-pdfimport --enable-wiki-publisher --enable-graphite --with-arm-target=7 --with-jdk-home=/path/to/open-jdk7
It seems to be a bug, can some one reproduce that ? I can workaround that with the Format() function, using VBA format strings. Any known fix without using a workaround?

Thank you.
nmset
Posts: 12
Joined: Thu May 13, 2010 7:35 pm

Re: ARM - crash on NumberFormat

Post by nmset »

An update.

After compiling AOO SVN rev 1649339 (20150104), the above behaviour did not occur when run natively (on ODROID U2). It always occurs on the same hardware with AOO 4.1.

When run in chroot on an Android tablet, it always happens, regardless of AOO version. Even with Option Explicit (and declaring oLocale in the above code).

Weird, but I'll live with it.
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: ARM - crash on NumberFormat

Post by RusselB »

Apache Open Office doesn't have an official version for Android tablets.
There is an unofficial 3rd party port for Android devices.
Since you don't get the problem when running the code natively and do get it when running on the same hardware, then I suspect that this is an error that is hardware dependent, and, therefore, difficult to impossible to replicate.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
nmset
Posts: 12
Joined: Thu May 13, 2010 7:35 pm

Re: ARM - crash on NumberFormat

Post by nmset »

1. AOO does not crash with

Code: Select all

FormatDate = oNumberFormatter.convertNumberToString(formatId, dDate)
. It was not logical to use convertNumberToPreviewString if we add a new format.

2. Nevertheless, convertNumberToPreviewString does crash AOO on ARM in chroot on Android (phone and tablet), with the following (truncated) stack trace from a debug build :
...
...
Trace 27972/6: "osl_closeFile(32) => /home/android/programs/aoodebug/fr/openoffice4/program/../program/versionrc"
Trace 27972/6: "osl_openFile(32, readonly) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sv1c9cjd.tmp_/lo-oo-ressources-linguistiques-fr-v5.1.oxt/description.xml"
Trace 27972/6: "osl_closeFile(32) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sv1c9cjd.tmp_/lo-oo-ressources-linguistiques-fr-v5.1.oxt/description.xml"
Trace 27972/6: "osl_openFile(32, readonly) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/svg5x4tl.tmp_/OOOP-accessories-2.8.0.0.oxt/description.xml"
Trace 27972/6: "osl_closeFile(32) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/svg5x4tl.tmp_/OOOP-accessories-2.8.0.0.oxt/description.xml"
Trace 27972/6: "osl_openFile(32, readonly) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sve1dau6.tmp_/presentation-minimizer.oxt/description.xml"
Trace 27972/6: "osl_closeFile(32) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sve1dau6.tmp_/presentation-minimizer.oxt/description.xml"
Trace 27972/6: "module.c::osl_getModuleURLFromAddress - /home/android/programs/aoodebug/fr/openoffice4/program/libuno_cppu.so.3
"
Trace 27972/6: "> inserting new mapping: ;uno[4a3343e0];gcc3[48a313e8]"
> uno exception occurred: com.sun.star.ucb.InteractiveAugmentedIOException
Trace 27972/6: "> revoking mapping ;uno[4a3343e0];gcc3[48a313e8]"
> toUNOname(): N3com3sun4star3ucb31InteractiveAugmentedIOExceptionE => com.sun.star.ucb.InteractiveAugmentedIOException
Trace 27972/6: "osl_openFile(32, readonly) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sve1dau6.tmp_/presentation-minimizer.oxt/description.xml"
Trace 27972/6: "osl_closeFile(32) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sve1dau6.tmp_/presentation-minimizer.oxt/description.xml"
Trace 27972/6: "module.c::osl_getModuleURLFromAddress - /home/android/programs/aoodebug/fr/openoffice4/program/libuno_cppu.so.3
"
Trace 27972/6: "> inserting new mapping: ;uno[49b91c30];gcc3[48a313e8]"
> uno exception occurred: com.sun.star.ucb.InteractiveAugmentedIOException
Trace 27972/6: "> revoking mapping ;uno[49b91c30];gcc3[48a313e8]"
> toUNOname(): N3com3sun4star3ucb31InteractiveAugmentedIOExceptionE => com.sun.star.ucb.InteractiveAugmentedIOException
Trace 27972/6: "osl_openFile(32, readonly) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/svg5x4tl.tmp_/OOOP-accessories-2.8.0.0.oxt/description.xml"
Trace 27972/6: "osl_closeFile(32) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/svg5x4tl.tmp_/OOOP-accessories-2.8.0.0.oxt/description.xml"
Trace 27972/6: "osl_openFile(32, readonly) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sve1dau6.tmp_/presentation-minimizer.oxt/description.xml"
Trace 27972/6: "osl_closeFile(32) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sve1dau6.tmp_/presentation-minimizer.oxt/description.xml"
Trace 27972/6: "osl_openFile(32, readonly) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sv1c9cjd.tmp_/lo-oo-ressources-linguistiques-fr-v5.1.oxt/description.xml"
Trace 27972/6: "osl_closeFile(32) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sv1c9cjd.tmp_/lo-oo-ressources-linguistiques-fr-v5.1.oxt/description.xml"
Trace 27972/6: "osl_openFile(32, readonly) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/svg5x4tl.tmp_/OOOP-accessories-2.8.0.0.oxt/description.xml"
Trace 27972/6: "osl_closeFile(32) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/svg5x4tl.tmp_/OOOP-accessories-2.8.0.0.oxt/description.xml"
Trace 27972/6: "osl_openFile(32, readonly) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sv1c9cjd.tmp_/lo-oo-ressources-linguistiques-fr-v5.1.oxt/description.xml"
Trace 27972/6: "osl_closeFile(32) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sv1c9cjd.tmp_/lo-oo-ressources-linguistiques-fr-v5.1.oxt/description.xml"
Trace 27972/6: "osl_openFile(32, readonly) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sv1c9cjd.tmp_/lo-oo-ressources-linguistiques-fr-v5.1.oxt/description.xml"
Trace 27972/6: "osl_closeFile(32) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sv1c9cjd.tmp_/lo-oo-ressources-linguistiques-fr-v5.1.oxt/description.xml"
Trace 27972/6: "osl_openFile(32, readonly) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/svg5x4tl.tmp_/OOOP-accessories-2.8.0.0.oxt/description.xml"
Trace 27972/6: "osl_closeFile(32) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/svg5x4tl.tmp_/OOOP-accessories-2.8.0.0.oxt/description.xml"
Trace 27972/6: "osl_openFile(32, readonly) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/svg5x4tl.tmp_/OOOP-accessories-2.8.0.0.oxt/description.xml"
Trace 27972/6: "osl_closeFile(32) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/svg5x4tl.tmp_/OOOP-accessories-2.8.0.0.oxt/description.xml"
Trace 27972/6: "osl_openFile(32, readonly) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sve1dau6.tmp_/presentation-minimizer.oxt/description.xml"
Trace 27972/6: "osl_closeFile(32) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sve1dau6.tmp_/presentation-minimizer.oxt/description.xml"
Trace 27972/6: "osl_openFile(32, readonly) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sve1dau6.tmp_/presentation-minimizer.oxt/description.xml"
Trace 27972/6: "osl_closeFile(32) => /home/android/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sve1dau6.tmp_/presentation-minimizer.oxt/description.xml"
Trace 27972/6: "module.c::osl_getModuleURLFromAddress - /home/android/programs/aoodebug/fr/openoffice4/program/libuno_cppu.so.3
"
Trace 27972/6: "> inserting new mapping: ;uno[48a31ac8];gcc3[48a313e8]"
> uno exception occurred: com.sun.star.ucb.InteractiveAugmentedIOException
Trace 27972/6: "> revoking mapping ;uno[48a31ac8];gcc3[48a313e8]"
> toUNOname(): N3com3sun4star3ucb31InteractiveAugmentedIOExceptionE => com.sun.star.ucb.InteractiveAugmentedIOException
Trace 27972/6: "module.c::osl_getModuleURLFromAddress - /home/android/programs/aoodebug/fr/openoffice4/program/libuno_cppu.so.3
"
Trace 27972/6: "> inserting new mapping: ;uno[48a31d48];gcc3[48a313e8]"
> uno exception occurred: com.sun.star.ucb.InteractiveAugmentedIOException
Trace 27972/6: "> revoking mapping ;uno[48a31d48];gcc3[48a313e8]"
> toUNOname(): N3com3sun4star3ucb31InteractiveAugmentedIOExceptionE => com.sun.star.ucb.InteractiveAugmentedIOException
handleSendPropertyNotify for property _NET_WM_USER_TIME (new value)
Trace 27972/1: "/home/ddu/src/aoo/main/sal/rtl/source/bootstrap.cxx -- Bootstrap_Impl() - file:///home/android/programs/aoodebug/fr/openoffice4/program/../program/bootstraprc
"
Trace 27972/1: "osl_openFile(32, readonly) => /home/android/programs/aoodebug/fr/openoffice4/program/../program/bootstraprc"
Trace 27972/1: "/home/ddu/src/aoo/main/sal/rtl/source/bootstrap.cxx -- pushing: name=BaseInstallation value=${OOO_BASE_DIR}
"
Trace 27972/1: "/home/ddu/src/aoo/main/sal/rtl/source/bootstrap.cxx -- pushing: name=InstallMode value=<installmode>
"
Trace 27972/1: "/home/ddu/src/aoo/main/sal/rtl/source/bootstrap.cxx -- pushing: name=ProductKey value=OpenOffice 4.2.0
"
Trace 27972/1: "/home/ddu/src/aoo/main/sal/rtl/source/bootstrap.cxx -- pushing: name=UserInstallation value=$SYSUSERCONFIG/.openoffice/4
"
Trace 27972/1: "/home/ddu/src/aoo/main/sal/rtl/source/bootstrap.cxx -- pushing: name=ErrorReportPort value=80
"
Trace 27972/1: "/home/ddu/src/aoo/main/sal/rtl/source/bootstrap.cxx -- pushing: name=ErrorReportServer value=
"
Trace 27972/1: "osl_closeFile(32) => /home/android/programs/aoodebug/fr/openoffice4/program/../program/bootstraprc"
Trace 27972/1: "~VCLXDialog"
handleSendPropertyNotify for property _NET_FRAME_EXTENTS (new value)
Trace 27972/1: "module.c::osl_getModuleURLFromAddress - /home/android/programs/aoodebug/fr/openoffice4/program/libuno_cppu.so.3
"
handleSendPropertyNotify for property _KDE_NET_WM_FRAME_STRUT (new value)
Trace 27972/1: "Parser - Module1, bClassModule 0"
handleSendPropertyNotify for property _NET_WM_DESKTOP (deleted)
handleSendPropertyNotify for property _NET_WM_STATE (deleted)
handleSendPropertyNotify for property WM_STATE (deleted)
handleSendPropertyNotify for property _NET_WM_VISIBLE_NAME (deleted)
handleSendPropertyNotify for property _NET_WM_VISIBLE_ICON_NAME (deleted)
Trace 27972/1: "SbxErrObject::SbxErrObject ctor"
handleSendPropertyNotify for property _NET_WM_ICON_GEOMETRY (new value)
Trace 27972/1: "component path=file:///home/android/programs/aoodebug/fr/openoffice4/program/../program/i18npool.uno.so
"
Trace 27972/1: "error: osl_getAsciiFunctionSymbol failed with /home/android/programs/aoodebug/fr/openoffice4/program/../program/i18npool.uno.so: undefined symbol: component_getImplementationEnvironmentExt
"
loadSharedLibComponentFactory envDcp: gcc3 implName: ar.i18n.NumberFormatCodeMapper libName: file:///home/an
Trace 27972/1: "> inserting new mapping: ;gcc3[4a18a2a0];gcc3[4a18a2a0]"
Trace 27972/1: "> revoking mapping ;gcc3[4a18a2a0];gcc3[4a18a2a0]"
Trace 27972/1: "error: osl_getAsciiFunctionSymbol failed with /home/android/programs/aoodebug/fr/openoffice4/program/../program/i18npool.uno.so: undefined symbol: component_canUnload
"
Trace 27972/1: "error: osl_getAsciiFunctionSymbol failed with /home/android/programs/aoodebug/fr/openoffice4/program/liblocaledata_euro.so: undefined symbol: getAllFormats1_fr_FR
"
Trace 27972/1: "error: osl_getAsciiFunctionSymbol failed with /home/android/programs/aoodebug/fr/openoffice4/program/liblocaledata_euro.so: undefined symbol: getAllFormats1_fr_FR
"
handleSendPropertyNotify for property _NET_WM_ICON_GEOMETRY (new value)
Trace 27972/1: "component path=file:///home/android/programs/aoodebug/fr/openoffice4/program/../program/libsvl.so
"
Trace 27972/1: "error: osl_getAsciiFunctionSymbol failed with /home/android/programs/aoodebug/fr/openoffice4/program/libsvl.so: undefined symbol: component_getImplementationEnvironmentExt
"
loadSharedLibComponentFactory envDcp: gcc3 implName: SvNumberFormatterServiceObject libName: file:///home/an
Trace 27972/1: "> inserting new mapping: ;gcc3[4a18a2a0];gcc3[4a18a2a0]"
Trace 27972/1: "> revoking mapping ;gcc3[4a18a2a0];gcc3[4a18a2a0]"
Trace 27972/1: "error: osl_getAsciiFunctionSymbol failed with /home/android/programs/aoodebug/fr/openoffice4/program/libsvl.so: undefined symbol: component_canUnload
"
Trace 27972/1: "module.c::osl_getModuleURLFromAddress - /home/android/programs/aoodebug/fr/openoffice4/program/libuno_cppu.so.3
"
Trace 27972/1: "> inserting new mapping: ;gcc3[4a18a2a0];uno[4a8ad2b8]"
Trace 27972/1: "module.c::osl_getModuleURLFromAddress - /home/android/programs/aoodebug/fr/openoffice4/program/libuno_cppu.so.3
"
Trace 27972/1: "> inserting new mapping: ;uno[4a8ad2b8];gcc3[4a18a2a0]"
Signal 11 during fontconfig initialization called, ignoring fontconfig
cupsGetDests crashed, not using CUPS
./soffice : ligne 121 : 27972 Erreur de segmentation "$sd_prog/$sd_binary" "$@"
For the record.
Post Reply