Bug 113273 - Crash in: SfxShell::SetDisableFlags(SfxDisableFlags)
Summary: Crash in: SfxShell::SetDisableFlags(SfxDisableFlags)
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2 all versions
Hardware: All All
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, haveBacktrace, regression
Depends on:
Blocks: Templates Crash
  Show dependency treegraph
 
Reported: 2017-10-19 18:18 UTC by Frédéric Buclin
Modified: 2024-07-31 06:53 UTC (History)
6 users (show)

See Also:
Crash report or crash signature: ["SfxShell::SetDisableFlags(SfxDisableFlags)","SfxShell::SetDisableFlags"]


Attachments
ODT file causing LibreOffice to crash (45.00 KB, application/octet-stream)
2018-02-27 21:12 UTC, Frédéric Buclin
Details
Template (11.79 KB, application/vnd.oasis.opendocument.text-template)
2018-02-28 13:50 UTC, Frédéric Buclin
Details
bt with debug symbols (4.73 KB, text/plain)
2020-05-16 21:00 UTC, Julien Nabet
Details
bibisect in lo-linux-dbgutil-daily-till52 (2.40 KB, text/plain)
2020-06-24 12:00 UTC, Terrence Enger
Details
bt with debug symbols (5.11 KB, text/plain)
2021-08-02 10:12 UTC, Julien Nabet
Details
Valgrind trace (204.51 KB, application/x-bzip)
2021-08-02 12:47 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Buclin 2017-10-19 18:18:00 UTC
This bug was filed from the crash reporting server and is br-d78dea88-5e3b-4882-8c3f-57203d264a0e.
=========================================
Comment 1 Xisco Faulí 2017-10-19 19:39:20 UTC
Thank you for reporting the bug.
Unfortunately without clear steps to reproduce it, we cannot track down the origin of the problem.
Please provide a clearer set of step-by-step instructions on how to reproduce the problem.
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the steps are provided
Comment 2 Frédéric Buclin 2018-02-27 21:12:12 UTC
Created attachment 140195 [details]
ODT file causing LibreOffice to crash

Steps to reproduce:
1) Open the attached ODT file.
2) When the following popup appears (translated from french), click "Keep old styles":

"Model 'modele_test' on which this document is based has changed. Do you want to update the format based on the modified model?"

3) No need to edit the document. Simply close the document, and LibreOffice will ask you if you want to save changes (which ones??). Click "Do not save".

4) LibreOffice crashes. This is also reproducible with 6.0.1.1, see http://crashreport.libreoffice.org/stats/crash_details/6f4b4a2b-f332-4596-bd0b-08b147250933
Comment 3 Xisco Faulí 2018-02-28 09:10:17 UTC
Hi  Frédéric Buclin,
Could you please attach the template you used to create the document? Otherwise, I don't see the popup for the styles...
Comment 4 Frédéric Buclin 2018-02-28 13:50:27 UTC
Created attachment 140219 [details]
Template

This is the template I have in ~/.config/libreoffice/4/user/template which causes LibreOffice to crash when I open old files I created a few years ago. If I remove this template from this directory, then no popup appears and LibreOffice doesn't crash.

Does it mean that old templates created with LibreOffice 4 (I think it was 4, maybe 3) are not compatible with LibreOffice 5 and 6? :(
Comment 5 Buovjaga 2018-03-10 13:49:59 UTC
I made sure the template is in the correct location regarding my path options, but the ODT file does not give the pop up and there is no crash.

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: 22b1d4784d02070ae1933c59cf2c9bb5a5284773
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on March 10th 2018
Comment 6 Frédéric Buclin 2018-04-09 13:06:00 UTC
I reproduced this issue using another template which I modified meanwhile:

http://crashreport.libreoffice.org/stats/crash_details/ceb3fa1e-937c-4a73-8a89-1a28cbed6fc3

Renaming the template fixes the issue. So it looks like that LibreOffice doesn't like when you edit a template already used to create files.
Comment 7 raal 2018-05-29 17:30:10 UTC Comment hidden (obsolete)
Comment 8 raal 2018-05-29 17:32:00 UTC
I can reproduce with following steps:

 - save .ott template in ~/.config/libreoffice/4/user/template
 - File-Templates-manage templates
 - right click modele_test  ->Open
 - write something and save file as .odt ; close the file
 - File-Templates-manage templates
 - right click modele_test  ->Edit
 - change for example Style of heading "formatif/significatif: sujet"
 - save and close the file
 - open .odt file -> Confirmation: The template 'modele_test' on which this document is based, has been modified. Do you want to update style based formatting according to the modified template? 
  -> click Keep old styles
 - close the document, and LibreOffice will ask you if you want to save changes (which ones??). Click "Do not save".


  Crash


Version: 6.2.0.0.alpha0+
Build ID: 8f9f66e8d2bae94c1f469ffc51bdbffeba853a2b
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-05-29_00:00:31
Comment 9 raal 2018-05-29 17:39:06 UTC
no crash in LO 4.1,Linux
Comment 10 Buovjaga 2018-07-12 17:29:27 UTC
Tried to bibisect with Linux 42max as it showed the crashing, but not in oldest. Unfortunately I got a useless result (for some small lotuswordpro change).

If anyone wants to try, the bibisecting is basically repeating these steps, so it's not that bad:

(In reply to raal from comment #8)
>  - open .odt file -> Confirmation: The template 'modele_test' on which this
> document is based, has been modified. Do you want to update style based
> formatting according to the modified template? 
>   -> click Keep old styles
>  - close the document, and LibreOffice will ask you if you want to save
> changes (which ones??). Click "Do not save".
Comment 11 QA Administrators 2019-07-14 02:48:24 UTC Comment hidden (obsolete)
Comment 12 Julien Nabet 2020-05-16 21:00:32 UTC
Created attachment 160913 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this with these steps:
 - save .ott template in ~/.config/libreoffice/4/user/template
 - File-Templates-manage templates
 - right click modele_test  ->Open
 - write something and save file as .odt ; close the file
 - File-Templates-manage templates
 - right click modele_test  ->Edit
=> it ask if I want to update or keep old style
 - I chose keep old style
 - change for example Style of heading "formatif/significatif: sujet"
 - save
=> crash
(so almost Raal's comment 8) but crash before + update or keep old style when choosing "Edit".
Comment 13 Julien Nabet 2020-05-16 21:16:29 UTC
Let's increase a bit importance since:
- it's a crash
- it concerns all envs
- it's a regression
Comment 14 Telesto 2020-05-16 22:15:30 UTC
(In reply to Julien Nabet from comment #13)
> Let's increase a bit importance since:
> - it's a crash
> - it concerns all envs
> - it's a regression

Based on the number seen in the crash reporter summary not to important.. IMHO.
Comment 15 Xisco Faulí 2020-05-21 13:15:51 UTC
(In reply to Telesto from comment #14)
> (In reply to Julien Nabet from comment #13)
> > Let's increase a bit importance since:
> > - it's a crash
> > - it concerns all envs
> > - it's a regression
> 
> Based on the number seen in the crash reporter summary not to important..
> IMHO.

less than 500 and considering it's reproducible since 4.2, that's very low. adjusting importance
Comment 16 Terrence Enger 2020-06-24 12:00:38 UTC
Created attachment 162368 [details]
bibisect in lo-linux-dbgutil-daily-till52

Working in bibisect repository lo-linux-dbgutil-daily-till52$ on
debian-buster, I see that the bug entered LO somewhere in the 65 or so
commits:

          commit    s-h       date
          --------  --------  -------------------
    good  09325a16  4ab31493  2016-05-24 00:40:36
    bad   6f9d5d29  44326f8d  2015-05-24 21:19:42

Observations and questions arising:

(*) I used a separate UserInstallation directory, which I named on the
    command line.

(*) I followed the steps in comment 8 once; then for each probe I
    followed the steps in comment 12.

(*) The crashes I observed were "Signal 6".  In a recent local-built
    soffice.bin, comparing my backtrace to Julien Nabet's attachment,
    I see at the top 14 additional frames of signal handling; after
    that there are 36 frames of same-named functions.

(*) If I open the .odt by clicking the thumbnail in Start Center, LO
    prompts "update or keep old style" (and possibly crashes upon
    closing) only the second time I open the file.

(*) The "update or keep old style" message cites template
    'modèle_test1', but the file I downloaded and from which I created
    the .odt is 'modele_test1.ott'.

    I wonder if this is central to the bug?

I am removing keyword bibisectRequest and adding bibisected.
Comment 17 Julien Nabet 2021-04-23 17:02:10 UTC
(In reply to Terrence Enger from comment #16)
> ...
> 
> I am removing keyword bibisectRequest and adding bibisected.

Terrence: If I interpret well, first bad commit is 44326f8d.
So 2 questions:
1) Looking at author of this is Jochen Nitschke, so why the bibisect log indicates: 6f9d5d29f552dc856083e0c7770e95c08ae8f167 is the first bad commit
commit 6f9d5d29f552dc856083e0c7770e95c08ae8f167
Author: Miklos Vajna <vmiklos@collabora.co.uk>
Date:   Wed May 25 05:39:46 2016 +0200

    2016-05-25: source-hash-44326f8dfabd81bf8b5a5c741f29ae8c57b4a88e
?

Miklos seems unrelated to this patch.

2) the patch concerns only winaccessibility part so, a priori, has an impact only on Windows. But this bug can be reproduced too on Linux. Shouldn't it pinpoint a commit not specific to Windows?
Comment 18 Terrence Enger 2021-06-19 22:40:21 UTC
The range I reported in comment 16 covers about 56 commits to master:
https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=4ab31493..44326f8d
Comment 19 Julien Nabet 2021-08-02 09:54:06 UTC Comment hidden (obsolete)
Comment 20 Julien Nabet 2021-08-02 10:12:44 UTC
Created attachment 174024 [details]
bt with debug symbols

Sorry, I had missed a step, I still reproduce the crash with master sources updated today.

I just wanted to give a new try and update bt if needed.
Comment 21 Julien Nabet 2021-08-02 12:47:11 UTC
Created attachment 174027 [details]
Valgrind trace
Comment 22 QA Administrators 2023-08-03 03:05:18 UTC Comment hidden (obsolete)
Comment 23 Stéphane Guillou (stragu) 2024-07-31 06:50:46 UTC
With comment 8 steps:

Repro in 6.0: https://crashreport.libreoffice.org/stats/crash_details/8d5cee91-851e-4f2e-8a5b-0d89c804b69b

And 6.1: https://crashreport.libreoffice.org/stats/crash_details/3f720818-0b6e-43a8-8b09-11fac76d7f30

No crash in 6.2.0.3 when using the ODT created with 6.0.
But running all the steps again, it crashes with "SfxShell::SetDisableFlags" signature: https://crashreport.libreoffice.org/stats/crash_details/25f469c3-1d37-4266-afdf-5049056f0032

So to really check if crash is still current, one has to test the whole series of steps.

7.0 crashes too: https://crashreport.libreoffice.org/stats/crash_details/2c6028f9-a0e3-4f04-b729-63239603c7d5

But no crash anymore in:

Version: 7.6.7.2 (X86_64) / LibreOffice Community
Build ID: dd47e4b30cb7dab30588d6c79c651f218165e3c5
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Not in:

Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59

-> "works for me".

(Would be great if someone else could verify.)
Comment 24 Stéphane Guillou (stragu) 2024-07-31 06:53:14 UTC
(Any of the two signature haven't been seen beyond 7.6.2.1, according to the crash report website.)