segfault in DocumentLoader example

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello world, 

> I copied the C++ DocumentLoader example, but I get an segmentation fault.

By "I copied C++ DocumentLoader example" you presumably mean that you've built 
and run the example outside the environment set by LibO SDK (i.e. by 
'setsdkenv_$your_os') ?

Correct me if I'm wrong

> The segfault is caused by invoking
> `cppu::defaultBootstrap_InitialComponentContext()`

Umm, so the example code could be made a bit more robust here and fail early 
if the bootstrap failed (instead of assuming that bootstrap succeeds at all 
times). Nevertheless it doesn't explain why bootstrapping LibO didn't work for 
you.

Anyway:

> command line was: ./generator -env:URE_MORE_TYPES=file://"./offapi.rdb"
> "./test.odt"
> "uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager"
> 
> Libreoffice was started with: soffice
> "-accept=socket,host=localhost,port=2083;urp;StarOffice.ServiceManager"

Try using absolute path to the file DocumentLoader is expected to open (i.e. 
'/full/path/to/test.odt' instead of './test.odt') 

If that doesn't help, the next step would be adding some debug code into into 
DocumentLoader.cxx code, for ex. wrap defaultBootstrap_InitialComponentContext 
in some try-catch block and see what exception(s) are thrown ... 

HTH
 
-- 
Katarina Behrens

Senior Software-Entwicklerin FLOSS
â??â??â??
CIB software GmbH
Geschäftsstelle Hamburg
Flachsland 10
22083 Hamburg
â??â??â??
T +49 (40) / 28 48 42 -235
F +49 (40) / 28 48 42 -100

Katarina.Behrens at cib.de
www.cib.de
â??â??â??
Sitz: München
Registergericht München, HRB 123286
Geschäftsführer: Dipl.-Ing. Ulrich Brandner




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux