Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing
|Summary:||crash on desktop terminate() through PyUNO|
|Component:||code||Assignee:||AOO issues mailing list <issues>|
|Status:||ACCEPTED ---||QA Contact:|
|Priority:||P3||CC:||dominik, issues, szybalski|
|Target Milestone:||AOO PleaseHelp|
|Issue Type:||DEFECT||Latest Confirmation in:||---|
Description aziem 2005-12-07 14:19:13 UTC
Summary: I can reliably produce a crash when closing OpenOffice.org using PyUNO to call the desktop terminate() function. System: OpenOffice.org 2.0.1rc1 Linux 2.6 (Fedora Core 4 x86-32) Xvfb Basic steps to reproduce: Open a blank Word document in OpenOffice.org under Xvfb (virtual frame buffer). Close OpenOffice.org through terminate(). Repeat. Results: The second iteration of the above process, OpenOffice.org crashes and PyUNO reports the following error: "uno.com.sun.star.lang.DisposedException: URP_Bridge : disposed\n(tid=3) Unexpected connection closure" The OOo core dump has the following backtrace: #0 0xb7597e20 in uno_type_isAssignableFromData () from /opt/openoffice.org2.0/program/libuno_cppu.so.3 #1 0xb759b9a8 in uno_type_isAssignableFromData () from /opt/openoffice.org2.0/program/libuno_cppu.so.3 #2 0xb75a30b7 in uno_type_any_assign () from /opt/openoffice.org2.0/program/libuno_cppu.so.3 #3 0xb4280f45 in component_getFactory () from /opt/openoffice.org2.0/program/acceptor.uno.so #4 0xb27eb22a in component_getFactory () from /opt/openoffice.org2.0/program/remotebridge.uno.so #5 0xb27d2f29 in component_canUnload () from /opt/openoffice.org2.0/program/liburp_uno.so #6 0xb27d09a4 in component_canUnload () from /opt/openoffice.org2.0/program/liburp_uno.so #7 0xb27c68d5 in component_canUnload () from /opt/openoffice.org2.0/program/liburp_uno.so #8 0xb73f02f7 in osl_yieldThread () from /opt/openoffice.org2.0/program/libuno_sal.so.3 #9 0x00d65b80 in start_thread () from /lib/libpthread.so.0 #10 0x00bd69ce in clone () from /lib/libc.so.6
Comment 1 aziem 2005-12-07 14:23:49 UTC
Created attachment 32170 [details] Kit to reproduce crash. Kit contains instructions and observations, Bash scripts, Python script, and blank Word document. (ZIP, 4KB)
Comment 2 Stephan Bergmann 2005-12-08 08:25:40 UTC
Comment 3 aziem 2007-03-24 06:48:42 UTC
Still happens on Linux w/ OOo 2.1 and OOO 2.2rc3.
Comment 4 aziem 2009-03-20 04:39:19 UTC
Happens even more easily on OOo 3.0.1 Linux (Fedora 10, i686, 32-bit)
Comment 5 amessina 2009-10-12 20:06:48 UTC
This continues to happen in openoffice.org-core-3.1.1-19.2.fc11.x86_64. Adding "time.sleep(3)" after a "desktop.terminate()" seems to reduce the frequency of the crash.
Comment 6 lszyba1 2009-10-27 15:53:39 UTC
My problem is similar but it happens randomly at various steps. I am using headless package, and starting the oo service via a command line. I'm using python uno to interface with oo. For some reason if the service is started via script, it is more prone to connection closure. If I start the service as user, the connection closure doesn't happen as often, but I was not able to prove it with any success. This error means something happen on the OO side and connection got disconnected? If yes, it would be interesting to know what it was, so that we can prevent it. Any idea how to debug this so that we can get more information on the problem? Thanks, Lucas Traceback (most recent call last): File "/usr/local/bin/xyz60.py", line 198, in <module> cursor2.gotoEnd(False) __main__.DisposedException: URP_Bridge : disposed (tid=3) Unexpected connection closure
Comment 7 Stephan Bergmann 2009-10-28 16:04:15 UTC
@lszyba1: Your <#desc7> is rather off-topic in this issue. If you want to discuss it further, please switch to a mailing list like email@example.com. In short, DisposedException from a remote bridge often means that the remote process crashed; you would need to attach a debugger to soffice.bin to find out more.
Comment 8 shrib 2010-07-22 06:35:20 UTC
I have an Impress 3.2 ODF file with the following Python script: import os import sys import unohelper from com.sun.star.beans import PropertyValue def OnOpen(event): document = XSCRIPTCONTEXT.getDocument() file_props = PropertyValue('FilterName', 0, 'MS PowerPoint 97', 0) target_path = '/tmp/test.ppt' target_url = unohelper.systemPathToFileUrl(target_path) document.storeToURL(target_url, (file_props,)) print 'Created ' + target_path document.setModified(False) print 'Terminating OOo' XSCRIPTCONTEXT.getDesktop().terminate() # <----- Causes a crash print 'Terminated OOo' The OnOpen function is associated with the "Document open" event. I run a command like "soffice.bin test.odf" expecting to end up with a test.ppt. The test.ppt file does get created (as can be seen by the output) but the OOo process crashes. The seg fault information while running under GDB is shown below. I tried a few variations like calling "document.dispose()" first, but nothing has worked so far. Is there any other way to close OOo from PyUno? Created /tmp/test.ppt Terminating OOo [New Thread 0x44007950 (LWP 4898)] [Thread 0x44007950 (LWP 4898) exited] Terminated OOo [New Thread 0x44007950 (LWP 4900)] [Thread 0x44007950 (LWP 4900) exited] [New Thread 0x44007950 (LWP 4901)] [Thread 0x44007950 (LWP 4901) exited] Program received signal SIGSEGV, Segmentation fault. 0x00007fffdf672f20 in SdResId::SdResId(unsigned short) () from /opt/openoffice.org3/program/../basis-link/program/libsdlx.so (gdb) bt #0 0x00007fffdf672f20 in SdResId::SdResId(unsigned short) () from /opt/openoffice.org3/program/../basis-link/program/libsdlx.so #1 0x00007fffdf6b22fb in ?? () from /opt/openoffice.org3/program/../basis-link/program/libsdlx.so #2 0x00007fffdf6e284e in SdPage::EndListenOutlineText() () from /opt/openoffice.org3/program/../basis-link/program/libsdlx.so #3 0x00007fffdf6e0c83 in SdPage::~SdPage() () from /opt/openoffice.org3/program/../basis- link/program/libsdlx.so #4 0x00007fffe39b58f0 in SdrModel::ClearModel(unsigned char) () from /opt/openoffice.org3/program/../basis-link/program/libsvxcorelx.so #5 0x00007fffdf6c0935 in ?? () from /opt/openoffice.org3/program/../basis-link/program/libsdlx.so #6 0x00007fffdf67ab78 in sd::DrawDocShell::~DrawDocShell() () from /opt/openoffice.org3/program/../basis-link/program/libsdlx.so #7 0x00007ffff677ff66 in ?? () from /opt/openoffice.org3/program/../basis-link/program/libsfxlx.so #8 0x00007ffff495e41a in Timer::ImplTimerCallbackProc() () from /opt/openoffice.org3/program/../basis-link/program/libvcllx.so #9 0x00007fffeee4cb6e in ?? () from /opt/openoffice.org/basis3.2/program/libvclplug_gtklx.so #10 0x00007fffec3a5adb in ?? () from /usr/lib/libglib-2.0.so.0 #11 0x00007fffec3a5384 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #12 0x00007fffec3a8695 in ?? () from /usr/lib/libglib-2.0.so.0 #13 0x00007fffec3a8b7b in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #14 0x00007fffeee4e603 in ?? () from /opt/openoffice.org/basis3.2/program/libvclplug_gtklx.so #15 0x00007ffff49586ee in Application::Yield(bool) () from /opt/openoffice.org3/program/../basis-link/program/libvcllx.so #16 0x00007ffff49587c7 in Application::Execute() () from /opt/openoffice.org3/program/../basis- link/program/libvcllx.so #17 0x00007ffff778f494 in ?? () from /opt/openoffice.org3/program/../basis- link/program/libsofficeapp.so #18 0x00007ffff495df26 in ?? () from /opt/openoffice.org3/program/../basis-link/program/libvcllx.so #19 0x00007ffff495e015 in SVMain() () from /opt/openoffice.org3/program/../basis- link/program/libvcllx.so #20 0x00007ffff77cb40c in soffice_main () from /opt/openoffice.org3/program/../basis- link/program/libsofficeapp.so #21 0x000000000040118b in main ()
Comment 9 Stephan Bergmann 2012-02-27 10:24:27 UTC
@shrib: Your comment 8 is unrelated to the problem described in this issue. Please file a separate issue for it (if it is still relevant).