I have OOo 3.2 on Ubuntu 10.04 LTS.<br>It's official build.<br><br>Problem occurs, if bootrap() is called two times during execution of code. I can reproduce issue on my computer, if I'm modifying your code (last two lines):<br>
<br>using ( SpreadsheetSample aSample = new SpreadsheetSample( args ) )<br> {<br> aSample.doSampleFunctions();<br> }<br> Console.WriteLine( "\nSamples done." );<br>
unoidl.com.sun.star.uno.XComponentContext context = uno.util.Bootstrap.bootstrap();<br> Console.WriteLine(context.ToString());<br><br><div class="gmail_quote">2010/7/27 Petr Mladek <span dir="ltr"><<a href="mailto:pmladek@suse.cz">pmladek@suse.cz</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Jānis,<br>
<br>
Jānis Upītis píše v Út 27. 07. 2010 v 11:28 +0300:<br>
<div class="im">> Hi,<br>
><br>
> I'm trying to use Open Office from my C#/Mono application. I can get<br>
> XComponentContext, using uno.util.Bootstrap.bootstrap(), when calling<br>
> it<br>
> first time, but application crashes, if I'm trying to do it second<br>
> time<br>
> (gots SIGSEGV somewhere in native code). Is there any problem in my<br>
> code. Open Office API documentation doesn't contain any clue about<br>
> need<br>
> of any preparation for second call (for example, release of some<br>
> resources). Of course, it doesn't make sens to call bootstrap() two<br>
> times in row, but it can be necessary, if i want interact with Open<br>
> Office in different parts of my application, but I guess SIGSEGV is<br>
> not<br>
> appropriate result anyway.<br>
<br>
</div>What OOo version are you using?<br>
Is it your own build or an official build?<br>
Is the build based on ooo-build or on the pure upstream sources?<br>
<br>
The attached example works for me with the openSUSE OOo-3.2.1 build<br>
based on ooo-build-3.2.1.4.tar.gz. I just do:<br>
<br>
tar -xjf ooo-mono-test-3.x.tar.bz2<br>
cd ooo-mono-test-3.x<br>
make<br>
<br>
Unfortunately, I do not have experiences with writing mono stuff for<br>
OOo. I am not sure what is the problem on your side. Anyway, you could<br>
hopefully take inspiration from the sample.<br>
<br>
Hmm, the sample does not work with the last build based on ooo-build<br>
master; though, it is in 3.3-alpha state, so bugs are expected.<br>
<br>
<br>
<br>
--<br>
Best Regards,<br>
<font color="#888888"><br>
Petr Mladek<br>
software developer<br>
---------------------------------------------------------------------<br>
SUSE LINUX, s. r. o. e-mail: <a href="mailto:pmladek@suse.cz">pmladek@suse.cz</a><br>
Lihovarská 1060/12 tel: +420 284 028 952<br>
190 00 Prague 9 fax: +420 284 028 951<br>
Czech Republic <a href="http://www.suse.cz/" target="_blank">http://www.suse.cz/</a><br>
<br>
</font></blockquote></div>