I was able to reproduce this with this additional information.
The crash is occurring inside the garbage collection thread after the script has called sys.exit().
(gdb) info threads
* 5 Thread 0xb5d98b90 (LWP 19348) 0xb7fb6410 in __kernel_vsyscall ()
3 Thread 0xb6599b90 (LWP 19343) 0xb7fb6410 in __kernel_vsyscall ()
2 Thread 0xb6d9ab90 (LWP 19341) 0xb7fb6410 in __kernel_vsyscall ()
1 Thread 0xb7e128c0 (LWP 19332) 0xb7fb6410 in __kernel_vsyscall ()
(gdb) bt
#0 0xb7fb6410 in __kernel_vsyscall ()
#1 0xb7e3df35 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7e3f8b1 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0x080e8677 in Py_FatalError (msg=0x8134f4c "PyImport_GetModuleDict: no module dictionary!") at ../Python/pythonrun.c:1561
#4 0x080df147 in PyImport_AddModule (name=0xb7c423ed "__main__") at ../Python/import.c:365
#5 0xb7c27b64 in ?? () from /usr/lib/openoffice/program/libpyuno.so
#6 0xb7c27ee5 in pyuno::Runtime::Runtime () from /usr/lib/openoffice/program/libpyuno.so
#7 0xb7c41dcd in pyuno::GCThread::run () from /usr/lib/openoffice/program/libpyuno.so
#8 0xb7c41fe2 in threadFunc () from /usr/lib/openoffice/program/libpyuno.so
#9 0xb797f5ed in ?? () from /usr/lib/openoffice/program/libuno_sal.so.3
I was able to reproduce this with this additional information.
The crash is occurring inside the garbage collection thread after the script has called sys.exit().
jason@hardy:~$ PYUNO_LOGLEVEL=ARGS python ooextract.py copyright 0x822c280] .createInstance WithContext( (string) "com.sun. star.bridge. UnoUrlResolver" , (com.sun. star.uno. XComponentConte xt)0x81ebe34) 0x822c280] .createInstance WithContext( )=(com. sun.star. uno.XInterface) 0x8236db0 0x8239e48] .resolve( (string) "uno:socket, host=localhost, port=2002; urp;StarOffice. ComponentContex t") 0x8239e48] .resolve( )=(com. sun.star. uno.XInterface) 0x81cb22c 0x8249370] .createInstance WithContext( (string) "com.sun. star.frame. Desktop" , (com.sun. star.uno. XInterface) 0x81cb22c) 0x8249370] .createInstance WithContext( )=(com. sun.star. uno.XInterface) 0x824a1f4 0x824db20] .loadComponentF romURL( (string) "file:/ //home/ jason/copyright ", (string)"_blank", (byte)0x0, ([]any){ (any){ (com.sun. star.beans. PropertyValue) { Name = (string)"Hidden", Handle = (long)0x0, Value = (any){ (boolean)true }, State = (com.sun. star.beans. PropertyState) DIRECT_ VALUE } } }) 0x824db20] .loadComponentF romURL( )=(com. sun.star. lang.XComponent )0x827681c 0x8277030] .dispose( ) 0x8277030] .dispose( )=void GetModuleDict: no module dictionary!
2008-01-16 14:53:39,197 [CALL,tid 1]: Instantiating pyuno bridge
Text (Encoded)
2008-01-16 14:53:39,256 [CALL,tid 1]: try py->uno[
2008-01-16 14:53:39,272 [CALL,tid 1]: success py->uno[
2008-01-16 14:53:39,273 [CALL,tid 1]: try py->uno[
2008-01-16 14:53:39,404 [CALL,tid 1]: success py->uno[
2008-01-16 14:53:39,417 [CALL,tid 1]: try py->uno[
2008-01-16 14:53:39,417 [CALL,tid 1]: success py->uno[
2008-01-16 14:53:39,961 [CALL,tid 1]: try py->uno[
2008-01-16 14:53:40,169 [CALL,tid 1]: success py->uno[
2008-01-16 14:53:40,221 [CALL,tid 1]: try py->uno[
2008-01-16 14:53:40,329 [CALL,tid 1]: success py->uno[
Fatal Python error: PyImport_
Aborted (core dumped)
(gdb) info threads i686/cmov/ libc.so. 6 i686/cmov/ libc.so. 6 GetModuleDict: no module dictionary!") at ../Python/ pythonrun. c:1561 import. c:365 openoffice/ program/ libpyuno. so Runtime: :Runtime () from /usr/lib/ openoffice/ program/ libpyuno. so GCThread: :run () from /usr/lib/ openoffice/ program/ libpyuno. so openoffice/ program/ libpyuno. so openoffice/ program/ libuno_ sal.so. 3
* 5 Thread 0xb5d98b90 (LWP 19348) 0xb7fb6410 in __kernel_vsyscall ()
3 Thread 0xb6599b90 (LWP 19343) 0xb7fb6410 in __kernel_vsyscall ()
2 Thread 0xb6d9ab90 (LWP 19341) 0xb7fb6410 in __kernel_vsyscall ()
1 Thread 0xb7e128c0 (LWP 19332) 0xb7fb6410 in __kernel_vsyscall ()
(gdb) bt
#0 0xb7fb6410 in __kernel_vsyscall ()
#1 0xb7e3df35 in raise () from /lib/tls/
#2 0xb7e3f8b1 in abort () from /lib/tls/
#3 0x080e8677 in Py_FatalError (msg=0x8134f4c "PyImport_
#4 0x080df147 in PyImport_AddModule (name=0xb7c423ed "__main__") at ../Python/
#5 0xb7c27b64 in ?? () from /usr/lib/
#6 0xb7c27ee5 in pyuno::
#7 0xb7c41dcd in pyuno::
#8 0xb7c41fe2 in threadFunc () from /usr/lib/
#9 0xb797f5ed in ?? () from /usr/lib/