Edit: This is not really solved, but I found a way to avoid LibreOffice crashing when changing forms via loadComponentFromURL.
This was the problem:
There are some suggestions to deal with the problem mentioned below. What finally resolved the issue was changing the event the macros are bound to. The Macros for changing forms were bound to the event "Approve Action" of a push-button. When I bound the Macros to the event "Mouse Button Released" it suddenly stopped crashing. I have no clue why this worked, but perhaps this can help others who have similar problems.I use loadComponentFromURL to navigate through some Writer-Documents that contain different forms that query a database.
So there are Buttons in my Writer-Documents that open the following Macro:
This works for a while, but after three or four hops between the documents, Libreoffice crashes and tells me the following:Code: Select all
sub OpenfrmNatuerlichePersonen( oev as variant ) OpenForm( "/home/bla/natuerliche.odt" ) end sub sub OpenfrmJuristischePersonen( oev as variant ) OpenForm( "/home/bla/juristische.odt" ) end sub sub OpenfrmVerteiler( oev as variant ) OpenForm ( "/home/bla/verteiler.odt" ) end sub Function openForm(sFormName as string) as variant cUrl = ConvertToURL( sFormName ) Dim args(3) As New com.sun.star.beans.PropertyValue args(0).Name = "ActiveConnection" args(0).Value = getConnectionTC args(1).Name = "OpenMode" args(1).Value = "open" args(2).Name = "MacroExecutionMode" args(2).Value = com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE args(3).Name = "ReadOnly" args(3).Value = TRUE oDocFrame = ThisComponent.getCurrentController().getFrame() oDocFrame.loadComponentFromURL( cUrl, "_self", 0, args() ) End Function
Openoffice 3.3 had the same problem. I hoped the step to a shiny new Libreoffice would fix the issue, but it's still there. Any ideas? Or workarounds for navigating through documents?Code: Select all
Application Error Fatal exception: Signal 6 Stack: /usr/lib/libreoffice/program/libuno_sal.so.3(+0x39430)[0x7f78cb024430] /usr/lib/libreoffice/program/libuno_sal.so.3(+0x395a1)[0x7f78cb0245a1] /lib/x86_64-linux-gnu/libc.so.6(+0x33030)[0x7f78cac7e030] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcf)[0x7f78cac7dfcf] /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f78cac7f3fa] /usr/lib/libreoffice/program/libmergedlo.so(+0x2d0b262)[0x7f78cdf4e262] /usr/lib/libreoffice/program/libmergedlo.so(_ZN11Application5AbortERKN3rtl8OUStringE+0x9a)[0x7f78cded46aa] /usr/lib/libreoffice/program/libmergedlo.so(+0x1d79d38)[0x7f78ccfbcd38] /usr/lib/libreoffice/program/libmergedlo.so(+0x2c96ae2)[0x7f78cded9ae2] /usr/lib/libreoffice/program/libuno_sal.so.3(+0x15192)[0x7f78cb000192] /usr/lib/libreoffice/program/libuno_sal.so.3(+0x3955f)[0x7f78cb02455f] /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so(+0x8c15dd)[0x7f78839745dd] /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so(JVM_handle_linux_signal+0x1b9)[0x7f7883979279] /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so(+0x8b9fd8)[0x7f788396cfd8] /lib/x86_64-linux-gnu/libc.so.6(+0x33030)[0x7f78cac7e030] /usr/lib/libreoffice/program/libmergedlo.so(_ZN13DbGridControl16AdjustDataSourceEb+0x16f)[0x7f78cd7e159f] /usr/lib/libreoffice/program/libmergedlo.so(+0x2aaec3f)[0x7f78cdcf1c3f] /usr/lib/libreoffice/program/libmergedlo.so(_ZN17SalGenericDisplay21DispatchInternalEventEv+0x6c)[0x7f78cdf6ed4c] /usr/lib/libreoffice/program/libvclplug_gtk3lo.so(+0x4249d)[0x7f78b7a3549d] /usr/lib/libreoffice/program/libvclplug_gtk3lo.so(+0x42511)[0x7f78b7a35511] /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x15a)[0x7f78c8bdd6aa] /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4aa60)[0x7f78c8bdda60] /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c)[0x7f78c8bddb0c] /usr/lib/libreoffice/program/libvclplug_gtk3lo.so(+0x41b13)[0x7f78b7a34b13] /usr/lib/libreoffice/program/libmergedlo.so(_ZN11Application5YieldEv+0x51)[0x7f78cded4ed1] /usr/lib/libreoffice/program/libmergedlo.so(_ZN11Application7ExecuteEv+0x45)[0x7f78cded7405] /usr/lib/libreoffice/program/libmergedlo.so(+0x1d7fc23)[0x7f78ccfc2c23] /usr/lib/libreoffice/program/libmergedlo.so(+0x2c97c76)[0x7f78cdedac76] /usr/lib/libreoffice/program/libmergedlo.so(_Z6SVMainv+0x22)[0x7f78cdedad72] /usr/lib/libreoffice/program/libmergedlo.so(soffice_main+0x91)[0x7f78ccfe3f61] /usr/lib/libreoffice/program/soffice.bin(+0x7cb)[0x5557ab09c7cb] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f78cac6b2b1] /usr/lib/libreoffice/program/soffice.bin(+0x80a)[0x5557ab09c80a]