Bug 37412 - command line conversion from HTML to ODT crashes
Summary: command line conversion from HTML to ODT crashes
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.4.0 RC1
Hardware: Other All
: medium normal
Assignee: Muthu
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-20 08:57 UTC by Petr Mladek
Modified: 2012-03-07 01:19 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Test document (553 bytes, text/html)
2011-05-20 08:57 UTC, Petr Mladek
Details
Wrong file generated with the change from the commit 926c6c068af6cd12bd61cd5408d65f78d3f6e46b (534 bytes, text/html)
2011-06-03 07:11 UTC, Petr Mladek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Mladek 2011-05-20 08:57:14 UTC
Created attachment 46958 [details]
Test document

The following command crashes:

/opt/libreoffice3.4/program/soffice --convert-to odt test.html

--- cut ---
Program terminated with signal 11, Segmentation fault.
#0  0x00007fe648ffbfde in SfxFilterMatcher::GetFilter4EA(String const&, unsigned long, unsigned long) const () from /opt/libreoffice3.4/program/../basis-link/program/libsfxlx.so
(gdb) bt
#0  0x00007fe648ffbfde in SfxFilterMatcher::GetFilter4EA(String const&, unsigned long, unsigned long) const () from /opt/libreoffice3.4/program/../basis-link/program/libsfxlx.so
#1  0x00007fe648ffdae3 in SfxFilterMatcher::GuessFilterIgnoringContent(SfxMedium&, SfxFilter const**, unsigned long, unsigned long) const ()
   from /opt/libreoffice3.4/program/../basis-link/program/libsfxlx.so
#2  0x00007fe64b6280b2 in Config::SetGroup(ByteString const&) () from /opt/libreoffice3.4/program/../basis-link/program/libsofficeapp.so
#3  0x00007fe64b630419 in Config::SetGroup(ByteString const&) () from /opt/libreoffice3.4/program/../basis-link/program/libsofficeapp.so
#4  0x00007fe64b63a1d9 in Config::SetGroup(ByteString const&) () from /opt/libreoffice3.4/program/../basis-link/program/libsofficeapp.so
#5  0x00007fe64b614a7e in Config::SetGroup(ByteString const&) () from /opt/libreoffice3.4/program/../basis-link/program/libsofficeapp.so
#6  0x00007fe64b6167fa in Config::SetGroup(ByteString const&) () from /opt/libreoffice3.4/program/../basis-link/program/libsofficeapp.so
#7  0x00007fe6471287f8 in ?? () from /opt/libreoffice3.4/program/../basis-link/program/libvcllx.so
#8  0x00007fe63c403a9f in SalDisplay::DispatchInternalEvent() () from /opt/libreoffice3.4/basis3.4/program/libvclplug_genlx.so
#9  0x00007fe63e100b54 in g_hash_table_new () from /opt/libreoffice3.4/basis3.4/program/libvclplug_gtklx.so
#10 0x00007fe63c68260a in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#11 0x00007fe63c685e88 in ?? () from /usr/lib64/libglib-2.0.so.0
#12 0x00007fe63c68603c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#13 0x00007fe63e10258d in g_hash_table_new () from /opt/libreoffice3.4/basis3.4/program/libvclplug_gtklx.so
#14 0x00007fe646f00d31 in Application::Yield(bool) () from /opt/libreoffice3.4/program/../basis-link/program/libvcllx.so
#15 0x00007fe646f00de7 in Application::Execute() () from /opt/libreoffice3.4/program/../basis-link/program/libvcllx.so
#16 0x00007fe64b617e2f in Config::SetGroup(ByteString const&) () from /opt/libreoffice3.4/program/../basis-link/program/libsofficeapp.so
#17 0x00007fe646f06073 in ?? () from /opt/libreoffice3.4/program/../basis-link/program/libvcllx.so
#18 0x00007fe646f06165 in SVMain() () from /opt/libreoffice3.4/program/../basis-link/program/libvcllx.so
#19 0x00007fe64b63cfec in soffice_main () from /opt/libreoffice3.4/program/../basis-link/program/libsofficeapp.so
#20 0x0000000000400fdb in main ()
--- cut ---
Comment 1 Petr Mladek 2011-05-20 08:57:45 UTC
Muthu, could you please have a look?
Comment 3 Petr Mladek 2011-06-03 07:11:50 UTC
Created attachment 47474 [details]
Wrong file generated with the change from the commit 926c6c068af6cd12bd61cd5408d65f78d3f6e46b

Hmm, I can't test it easily because the crash happens only with x86_64 build and I have only 32-bit build tree at hands.

Anyway, your patch does not work as expected. It started to produce test.odt file with HTML content instead of ODT content.

BTW: It generated Flat XML ODT without your patch on i586 system. I would expect the usually structured and zipped ODF format.
Comment 4 Petr Mladek 2011-06-23 09:22:49 UTC
OK the fix solved the crash, so I have cherry-picked it for LO-3.4.2, see
http://cgit.freedesktop.org/libreoffice/libs-core/commit/?h=libreoffice-3-4&id=48f79d786a01fc51939243e4ad26f76fd183cdd8

=> FIXED

If you open test.html in LO, it can't be saved as .odt in File/Save. The .odt file format is available only via File/Export. This probably causes why it produces .odt with HTML content. A workaround is to use -convert-to odt:writer8. I think that it newer worked. Anyway, it should be solved in another bug.