[ooo-build] Bootstrap.bootstrap() second call

Jānis Upītis janis.upitis at gmail.com
Tue Jul 27 01:28:55 PDT 2010


Hi,

I'm trying to use Open Office from my C#/Mono application. I can get
XComponentContext, using uno.util.Bootstrap.bootstrap(), when calling it
first time, but application crashes, if I'm trying to do it second time
(gots SIGSEGV somewhere in native code). Is there any problem in my
code. Open Office API documentation doesn't contain any clue about need
of any preparation for second call (for example, release of some
resources). Of course, it doesn't make sens to call bootstrap() two
times in row, but it can be necessary, if i want interact with Open
Office in different parts of my application, but I guess SIGSEGV is not
appropriate result anyway.

My code:
XComponentContext context = uno.util.Bootstrap.bootstrap();
context = uno.util.Bootstrap.bootstrap();

Here's stack strace:
Stacktrace:

at (wrapper managed-to-native) uno.util.Bootstrap.native_bootstrap ()
<0x00004>
at (wrapper managed-to-native) uno.util.Bootstrap.native_bootstrap ()
<0xffffffff>
at uno.util.Bootstrap.bootstrap () <0x0000d>
at Izsaukums.MainClass.Main (string[]) [0x00000]
in /home/janis/Desktop/ABC/Izsaukums/Izsaukums/Main.cs:1
at (wrapper runtime-invoke)
Izsaukums.MainClass.runtime_invoke_void_object
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

/usr/bin/mono() [0x80ca6e4]
/usr/bin/mono() [0x80f6893]
[0xb76e9410]
/usr/lib/ure/lib/libcli_uno.so(uno_ext_getMapping+0x1b2) [0xb3308042]
/usr/lib/openoffice/basis-link/ure-link/lib/libuno_cppu.so.3(+0x1809e)
[0xb688709e]
/usr/lib/openoffice/basis-link/ure-link/lib/libuno_cppu.so.3(+0x1855b)
[0xb688755b]
/usr/lib/openoffice/basis-link/ure-link/lib/libuno_cppu.so.3(uno_getMapping+0xbd6)
[0xb68881c2]
/usr/lib/openoffice/basis-link/ure-link/lib/libuno_cppu.so.3(uno_getMappingByName+0x91)
[0xb6888294]
/usr/lib/openoffice/basis-link/ure-link/lib/libcli_uno_glue.so(+0x118c)
[0xb6a6218c]
/usr/lib/openoffice/basis-link/ure-link/lib/libcli_uno_glue.so(native_bootstrap+0x2c)
[0xb6a6245c]
[0xb7032a4e]
[0xb703294e]
[0xb70322bf]
[0xb7032204]
/usr/bin/mono(mono_runtime_exec_main+0xde) [0x8113b1e]
/usr/bin/mono(mono_runtime_run_main+0x15a) [0x811429a]
/usr/bin/mono(mono_main+0x18c4) [0x80b3524]
/usr/bin/mono() [0x805ad25]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xb7473bd6]
/usr/bin/mono() [0x805ac61]

Debug info from gdb:

[Thread debugging using libthread_db enabled]
[New Thread 0xb430cb70 (LWP 4370)]
[New Thread 0xb4b67b70 (LWP 4369)]
[New Thread 0xb62f0b70 (LWP 4351)]
[New Thread 0xb6c3cb70 (LWP 4350)]
[New Thread 0xb6c60b70 (LWP 4349)]
0xb76e9422 in __kernel_vsyscall ()
6 Thread 0xb6c60b70 (LWP 4349) 0xb76e9422 in __kernel_vsyscall ()
5 Thread 0xb6c3cb70 (LWP 4350) 0xb76e9422 in __kernel_vsyscall ()
4 Thread 0xb62f0b70 (LWP 4351) 0xb76e9422 in __kernel_vsyscall ()
3 Thread 0xb4b67b70 (LWP 4369) 0xb76e9422 in __kernel_vsyscall ()
2 Thread 0xb430cb70 (LWP 4370) 0xb76e9422 in __kernel_vsyscall ()
* 1 Thread 0xb742a6f0 (LWP 4346) 0xb76e9422 in __kernel_vsyscall ()

Thread 6 (Thread 0xb6c60b70 (LWP 4349)):
#0 0xb76e9422 in __kernel_vsyscall ()
#1 0xb75ea736 in nanosleep () at ../sysdeps/unix/syscall-template.S:82
#2 0x081a6af8 in ?? ()
#3 0xb75e296e in start_thread (arg=0xb6c60b70) at pthread_create.c:300
#4 0xb752aa4e in clone ()
at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 5 (Thread 0xb6c3cb70 (LWP 4350)):
#0 0xb76e9422 in __kernel_vsyscall ()
#1 0xb75e9245 in sem_wait@@GLIBC_2.1 ()
at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/sem_wait.S:80
#2 0x0812e199 in ?? ()
#3 0x081527ea in ?? ()
#4 0x081c3062 in ?? ()
#5 0x081e1925 in ?? ()
#6 0xb75e296e in start_thread (arg=0xb6c3cb70) at pthread_create.c:300
#7 0xb752aa4e in clone ()
at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 4 (Thread 0xb62f0b70 (LWP 4351)):
#0 0xb76e9422 in __kernel_vsyscall ()
#1 0xb75e7342 in pthread_cond_timedwait@@GLIBC_2.3.2 ()

at
../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:179
#2 0xb68dfe23 in ?? ()
from /usr/lib/openoffice/basis-link/ure-link/lib/libuno_sal.so.3
#3 0xb75e296e in start_thread (arg=0xb62f0b70) at pthread_create.c:300
#4 0xb752aa4e in clone ()
at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xb4b67b70 (LWP 4369)):
#0 0xb76e9422 in __kernel_vsyscall ()
#1 0xb75e7015 in pthread_cond_wait@@GLIBC_2.3.2 ()

at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:122
#2 0xb68b382a in osl_waitCondition ()
from /usr/lib/openoffice/basis-link/ure-link/lib/libuno_sal.so.3
#3 0xb43210a1 in ?? () from /usr/lib/ure/lib/liburp_uno.so
#4 0xb43119c2 in ?? () from /usr/lib/ure/lib/liburp_uno.so
#5 0xb68b7c9b in ?? ()
from /usr/lib/openoffice/basis-link/ure-link/lib/libuno_sal.so.3
#6 0xb75e296e in start_thread (arg=0xb4b67b70) at pthread_create.c:300
#7 0xb752aa4e in clone ()
at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xb430cb70 (LWP 4370)):
#0 0xb76e9422 in __kernel_vsyscall ()
#1 0xb75ea268 in recv () at ../sysdeps/unix/sysv/linux/i386/socket.S:97
#2 0xb68bdda9 in osl_receivePipe ()
from /usr/lib/openoffice/basis-link/ure-link/lib/libuno_sal.so.3
#3 0xb68bde16 in osl_readPipe ()
from /usr/lib/openoffice/basis-link/ure-link/lib/libuno_sal.so.3
#4 0xb43576a7 in ?? () from /usr/lib/ure/lib/connector.uno.so
#5 0xb4339b90 in ?? () from /usr/lib/ure/lib/remotebridge.uno.so
#6 0xb431f8d8 in ?? () from /usr/lib/ure/lib/liburp_uno.so
#7 0xb431d173 in ?? () from /usr/lib/ure/lib/liburp_uno.so
#8 0xb43119c2 in ?? () from /usr/lib/ure/lib/liburp_uno.so
#9 0xb68b7c9b in ?? ()
from /usr/lib/openoffice/basis-link/ure-link/lib/libuno_sal.so.3
#10 0xb75e296e in start_thread (arg=0xb430cb70) at pthread_create.c:300
#11 0xb752aa4e in clone ()
at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb742a6f0 (LWP 4346)):
#0 0xb76e9422 in __kernel_vsyscall ()
#1 0xb75e9f5b in read () at ../sysdeps/unix/syscall-template.S:82
#2 0x080ca87e in ?? ()
#3 0x080f6893 in ?? ()
#4 <signal handler called>
#5 0x0816bc17 in mono_assembly_get_image ()
#6 0xb3308042 in uno_ext_getMapping ()
from /usr/lib/ure/lib/libcli_uno.so
#7 0xb688709e in ?? ()
from /usr/lib/openoffice/basis-link/ure-link/lib/libuno_cppu.so.3
#8 0xb688755b in ?? ()
from /usr/lib/openoffice/basis-link/ure-link/lib/libuno_cppu.so.3
#9 0xb68881c2 in uno_getMapping ()
from /usr/lib/openoffice/basis-link/ure-link/lib/libuno_cppu.so.3
#10 0xb6888294 in uno_getMappingByName ()
from /usr/lib/openoffice/basis-link/ure-link/lib/libuno_cppu.so.3
#11 0xb6a6218c in ?? ()
from /usr/lib/openoffice/basis-link/ure-link/lib/libcli_uno_glue.so
#12 0xb6a6245c in native_bootstrap ()
from /usr/lib/openoffice/basis-link/ure-link/lib/libcli_uno_glue.so
#13 0xb7032a4e in ?? ()
#14 0xb703294e in ?? ()
#15 0xb70322bf in ?? ()
#16 0xb7032204 in ?? ()
#17 0x08113b1e in mono_runtime_exec_main ()
#18 0x0811429a in mono_runtime_run_main ()
#19 0x080b3524 in mono_main ()
#20 0x0805ad25 in ?? ()
#21 0xb7473bd6 in __libc_start_main (main=0x805ad00, argc=3,
ubp_av=0xbfb91f44, init=0x81e6be0, fini=0x81e6bd0,
rtld_fini=0xb76f80c0 <_dl_fini>, stack_end=0xbfb91f3c) at
libc-start.c:226
#22 0x0805ac61 in ?? ()

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/ooo-build/attachments/20100727/f168244d/attachment.htm>


More information about the ooo-build mailing list