Issue 59026

Summary: crash on desktop terminate() through PyUNO
Product: udk Reporter: aziem <ahz001>
Component: codeAssignee: AOO issues mailing list <issues>
Status: ACCEPTED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: dominik, issues, szybalski
Version: OOo 2.0.1Keywords: crash
Target Milestone: AOO PleaseHelp   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Description Flags
Kit to reproduce crash. Kit contains instructions and observations, Bash scripts, Python script, and blank Word document. (ZIP, 4KB) none

Description aziem 2005-12-07 14:19:13 UTC
I can reliably produce a crash when closing using PyUNO to call
the desktop terminate() function.

System: 2.0.1rc1
Linux 2.6 (Fedora Core 4 x86-32)

Basic steps to reproduce:
Open a blank Word document in under Xvfb (virtual frame buffer).
 Close through terminate().  Repeat.  

The second iteration of the above process, crashes and PyUNO
reports the following error:
" URP_Bridge : disposed\n(tid=3)
Unexpected connection closure"

The OOo core dump has the following backtrace:

#0  0xb7597e20 in uno_type_isAssignableFromData () from
#1  0xb759b9a8 in uno_type_isAssignableFromData () from
#2  0xb75a30b7 in uno_type_any_assign () from
#3  0xb4280f45 in component_getFactory () from
#4  0xb27eb22a in component_getFactory () from
#5  0xb27d2f29 in component_canUnload () from
#6  0xb27d09a4 in component_canUnload () from
#7  0xb27c68d5 in component_canUnload () from
#8  0xb73f02f7 in osl_yieldThread () from
#9  0x00d65b80 in start_thread () from /lib/
#10 0x00bd69ce in clone () from /lib/
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

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?


Traceback (most recent call last):
 File "/usr/local/bin/", line 198, in <module>
__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
 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
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 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 
    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/ 
(gdb) bt 
#0 0x00007fffdf672f20 in SdResId::SdResId(unsigned short) () 
from /opt/openoffice.org3/program/../basis-link/program/ 
#1 0x00007fffdf6b22fb in ?? () from /opt/openoffice.org3/program/../basis-link/program/ 
#2 0x00007fffdf6e284e in SdPage::EndListenOutlineText() () 
from /opt/openoffice.org3/program/../basis-link/program/ 
#3 0x00007fffdf6e0c83 in SdPage::~SdPage() () from /opt/openoffice.org3/program/../basis-
#4 0x00007fffe39b58f0 in SdrModel::ClearModel(unsigned char) () 
from /opt/openoffice.org3/program/../basis-link/program/ 
#5 0x00007fffdf6c0935 in ?? () from /opt/openoffice.org3/program/../basis-link/program/ 
#6 0x00007fffdf67ab78 in sd::DrawDocShell::~DrawDocShell() () 
from /opt/openoffice.org3/program/../basis-link/program/ 
#7 0x00007ffff677ff66 in ?? () from /opt/openoffice.org3/program/../basis-link/program/ 
#8 0x00007ffff495e41a in Timer::ImplTimerCallbackProc() () 
from /opt/openoffice.org3/program/../basis-link/program/ 
#9 0x00007fffeee4cb6e in ?? () from /opt/ 
#10 0x00007fffec3a5adb in ?? () from /usr/lib/ 
#11 0x00007fffec3a5384 in g_main_context_dispatch () from /usr/lib/ 
#12 0x00007fffec3a8695 in ?? () from /usr/lib/ 
#13 0x00007fffec3a8b7b in g_main_context_iteration () from /usr/lib/ 
#14 0x00007fffeee4e603 in ?? () from /opt/ 
#15 0x00007ffff49586ee in Application::Yield(bool) () 
from /opt/openoffice.org3/program/../basis-link/program/ 
#16 0x00007ffff49587c7 in Application::Execute() () from /opt/openoffice.org3/program/../basis-
#17 0x00007ffff778f494 in ?? () from /opt/openoffice.org3/program/../basis-
#18 0x00007ffff495df26 in ?? () from /opt/openoffice.org3/program/../basis-link/program/ 
#19 0x00007ffff495e015 in SVMain() () from /opt/openoffice.org3/program/../basis-
#20 0x00007ffff77cb40c in soffice_main () from /opt/openoffice.org3/program/../basis-
#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).
Comment 10 Marcus 2017-05-20 11:31:39 UTC
Reset assigne to the default "".