Bug 139655 - SIGSEGV in XSpreadsheetDocument::getSheets()
Summary: SIGSEGV in XSpreadsheetDocument::getSheets()
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-15 22:07 UTC by Erik Sohns
Modified: 2021-02-12 18:31 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
minimal code (2.78 KB, text/x-c++src)
2021-01-17 15:02 UTC, Erik Sohns
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Sohns 2021-01-15 22:07:41 UTC
this is the relevant stacktrace: (type contains a NULL so "type.get()->" doesn't work)

~"#0  binaryurp::Unmarshal::readValue(com::sun::star::uno::TypeDescription const&) (this=0x7fffe67fa860, type=...) at /usr/src/debug/libreoffice-7.0.4.2-3.fc33.x86_64/binaryurp/source/unmarshal.cxx:249\n"

>~"#1  0x00007fffec05af87 in binaryurp::Reader::readReplyMessage(binaryurp::Unmarshal&, unsigned char) (flags1=<optimized out>, unmarshal=..., this=0xb8ee20) at /usr/src/debug/libreoffice-7.0.4.2-3.fc33.x86_64/binaryurp/source/reader.cxx:424\n"

>~"#2  binaryurp::Reader::readMessage(binaryurp::Unmarshal&) (unmarshal=..., this=0xb8ee20) at /usr/src/debug/libreoffice-7.0.4.2-3.fc33.x86_64/binaryurp/source/reader.cxx:140\n"

>~"#3  binaryurp::Reader::execute() (this=0xb8ee20) at /usr/src/debug/libreoffice-7.0.4.2-3.fc33.x86_64/binaryurp/source/reader.cxx:118\n"
>~"#4  0x00007ffff4229a5b in salhelper::Thread::run() (this=0xb8ee20) at /usr/src/debug/libreoffice-7.0.4.2-3.fc33.x86_64/salhelper/source/thread.cxx:40\n"
>~"#5  0x00007ffff42298de in osl::threadFunc(void*) (param=0xb8ee30) at /usr/src/debug/libreoffice-7.0.4.2-3.fc33.x86_64/include/osl/thread.hxx:185\n"
>~"#6  0x00007ffff7d2e0c8 in osl_thread_start_Impl(void*) (pData=0xb910c0) at /usr/src/debug/libreoffice-7.0.4.2-3.fc33.x86_64/sal/osl/unx/thread.cxx:258\n"
>~"#7  0x00007ffff7f863f9 in start_thread () at /lib64/libpthread.so.0\n"
>~"#8  0x00007ffff4339903 in clone () at /lib64/libc.so.6\n"

any ideas ?
Comment 1 Julien Nabet 2021-01-16 09:04:05 UTC
It could be useful to have minimum step by step process to reproduce this.
Comment 2 Erik Sohns 2021-01-16 10:03:38 UTC
this is already a minimal setup. I use XComponentLoader::loadComponentFromURL() and cast the result to sheet::XSpreadSheetDocument. I assert that the cast works with the .is() method(s). i.e.

component_ = component_loader_p->loadComponentFromURL()
assert (component_.is ());
document_.set (component_, uno::UNO_QUERY);
assert (document_.is ());
spreadsheets_p = document_->getSheets (); // <<-- SIGSEGV
Comment 3 Erik Sohns 2021-01-17 15:02:53 UTC
Created attachment 168952 [details]
minimal code

this is the minimal code to reproduce the error
Comment 4 Erik Sohns 2021-02-12 18:31:44 UTC
I found the solution myself. I was not setting the environment/ini variables UNO_TYPES and UNO_SERVICES correctly, so the bootstrap wasn't working