Bug 140308 - Crash import old OpenOffice template (stw, stc, sti, std) ( steps in comment 12 )
Summary: Crash import old OpenOffice template (stw, stc, sti, std) ( steps in comment ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.3 release
Hardware: All All
: highest critical
Assignee: Not Assigned
URL:
Whiteboard: target:7.2.0 target:7.1.2 target:7.1.1
Keywords: bibisected, bisected, haveBacktrace, regression
: 139151 140502 (view as bug list)
Depends on:
Blocks: Crash-Assert
  Show dependency treegraph
 
Reported: 2021-02-10 00:47 UTC by Regina Henschel
Modified: 2021-02-23 14:17 UTC (History)
6 users (show)

See Also:
Crash report or crash signature: https://crashreport.libreoffice.org/stats/crash_details/38bc108f-9b95-41da-8b35-bbce4f182bc7


Attachments
Document, which crashes LO 7.1 (17.02 KB, application/vnd.oasis.opendocument.text)
2021-02-10 00:47 UTC, Regina Henschel
Details
docx file from where the crashing file was created (17.90 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-02-10 00:48 UTC, Regina Henschel
Details
Callstack (5.80 KB, text/plain)
2021-02-10 22:15 UTC, Regina Henschel
Details
Old OpenOffice template (9.43 KB, application/vnd.sun.xml.draw.template)
2021-02-11 00:11 UTC, Regina Henschel
Details
gdb bt (17.05 KB, text/plain)
2021-02-13 09:07 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2021-02-10 00:47:50 UTC
Created attachment 169638 [details]
Document, which crashes LO 7.1

Open attached document. LO crashes immediately.
The file passes ODF validator.

I get the crash with Version: 7.1.0.3 (x64) / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL

and with Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 3ed9bba283a6a67864c0928186e277240be0d9ba
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL

My own build does not crash.
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 32e4d0907fa6d1fcd82b0762c3f02f4c1ee1dd94
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL

The file was original imported from docx.
Comment 1 Regina Henschel 2021-02-10 00:48:47 UTC
Created attachment 169639 [details]
docx file from where the crashing file was created
Comment 2 [REDACTED] 2021-02-10 14:47:21 UTC
No repro

Version: 7.1.0.3 / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: kf5
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 3 dianazubareva 2021-02-10 17:03:34 UTC
I can not reproduce the bug in

Version: 6.4.6.2
Build ID: 1:6.4.6-0ubuntu0.20.04.1
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

Version: 7.2.0.0.alpha0+
Build ID: 80f3c0ce51a7f94b127fe7c4dd4dd1d87ce694d6
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF-dbg, Branch:master, Time: 2021-01-07_19:28:48
Calc: threaded

Version: 7.0.4.2
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 4 mulla.tasanim 2021-02-10 17:37:42 UTC
Thank You for reporting the bug.

I can not reproduce the bug in,

Version: 7.0.3.1 (x64)
Build ID: d7547858d014d4cf69878db179d326fc3483e082
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

Version: 7.2.0.0.alpha0+ (x64)
Build ID: 761a672d62df1891b9f4f367a499b220ab2b33fa
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 5 Regina Henschel 2021-02-10 18:12:57 UTC
I come a little but closer to the problem.
The crash happens, if I have added a template path. That is in Tools > Options > LibreOffice > Paths. Select 'Templates' and then click on Edit.

If I set it back to defaults by clicking 'Default' and restart, then the attached file no longer crashes.
Comment 6 Julien Nabet 2021-02-10 18:52:03 UTC
On pc Debian x86-64 with master sources updated today + "/tmp" added and promoted as default templates path, I don't reproduce this with gen or gtk3 rendering.

Perhaps Windows only bug?
Comment 7 Roman Kuznetsov 2021-02-10 19:05:56 UTC
(In reply to Regina Henschel from comment #5)
> I come a little but closer to the problem.
> The crash happens, if I have added a template path. That is in Tools >
> Options > LibreOffice > Paths. Select 'Templates' and then click on Edit.
> 
> If I set it back to defaults by clicking 'Default' and restart, then the
> attached file no longer crashes.

No crash anyway

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: ca074a47e8fdae396633dad6f59450508bb2c9f0
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL
Comment 8 Regina Henschel 2021-02-10 22:15:59 UTC
Created attachment 169660 [details]
Callstack

As I now know, that it has something to do with templates, I have added a template folder in my debug build too. And then it crashes there as well.

It comes from

#1767    css::uno::Reference<css::xml::sax::XFastParser> xDocHandler(xFilter, css::uno::UNO_QUERY);
#1768    assert(xDocHandler);

in \sfx2\source\doc\SfxDocumentMetaData.cxx

Error message is
Unhandled exception at 0x00007FFE524C287E (ucrtbase.dll) in soffice.bin: Fatal program exit requested.

Callstack is attached.
Comment 9 Regina Henschel 2021-02-10 22:31:37 UTC
Next step: It is not the file itself, but it crashes, when it tries to read the templates. This is, I get the crash already, when I use the Templates drop-down in start center.

There is no crash with the same folder in Version: 6.4.5.0.0+ (x64)
Build ID: 70a2071ce91b71326659e645dd97996262ea309a
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: GL; VCL: win; 
Locale: de-DE (en_US); UI-Language: en-US
Calc: threaded

I will try to reduce that folder. Currently it is too large to attach it.
Comment 10 Regina Henschel 2021-02-11 00:11:34 UTC
Created attachment 169662 [details]
Old OpenOffice template

I think, I found the problem now. My template folders contain some old OpenOffice templates, like that what I have attached.
Try to import it with LO7 => crash. LO64 can handle such templates without problem.
Comment 11 Regina Henschel 2021-02-11 08:50:29 UTC
*** Bug 139151 has been marked as a duplicate of this bug. ***
Comment 12 Xisco Faulí 2021-02-11 15:44:43 UTC
I can reproduce it in

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: dc1b416c684c4e2525978e48252d55d78adcfca8
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Steps:
1. File - Templates - Manage Templates
2. Import - My Templates
3. Select the attached document

-> Crash
Comment 13 Xisco Faulí 2021-02-11 15:57:04 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=cfe5a5044845a3fc90e3634e996edb4d85808d3c

author	Noel Grandin <noelgrandin@gmail.com>	2020-10-17 08:08:36 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2020-10-17 10:28:29 +0200
commit	cfe5a5044845a3fc90e3634e996edb4d85808d3c (patch)
tree	66c056196534ddecaf2a71bae2c3664895cdf5d2
parent	3059f556f6818b66b2fa988c69664f5a98f4c075 (diff)
sfx2: use the fastparser API when possible

Bisected with: bibisect-linux64-7.1

Adding Cc: to Noel Grandin
Comment 14 Julien Nabet 2021-02-13 09:07:46 UTC
Created attachment 169710 [details]
gdb bt

On pc Debian x86-64 with master sources updated today + enable-dbgutil, I got an assertion.
I attached bt with some console logs + some gdb info.
Comment 15 Commit Notification 2021-02-14 18:14:03 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/228f43f2e3c2896c227f1ea30c5d16231acf66da

tdf#140308 Crash import old OpenOffice template

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Regina Henschel 2021-02-14 21:25:23 UTC
Verified with my build Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 228f43f2e3c2896c227f1ea30c5d16231acf66da
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL
Comment 17 Commit Notification 2021-02-15 09:47:10 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/6da480d946a7b881ca0cd482db16d8c32b5380ac

tdf#140308 Crash import old OpenOffice template

It will be available in 7.1.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Xisco Faulí 2021-02-18 16:02:28 UTC
*** Bug 140502 has been marked as a duplicate of this bug. ***
Comment 19 Commit Notification 2021-02-23 14:17:04 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-1-1":

https://git.libreoffice.org/core/commit/b402f12ac3b63727d459742b6d6131bda0606a99

tdf#140308 Crash import old OpenOffice template

It will be available in 7.1.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.