Bug 108889 - Crash: When editing a document which is opened at the moment of setting the undo count to zero (0)
Summary: Crash: When editing a document which is opened at the moment of setting the u...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
(earliest affected)
Hardware: All All
: medium major
Assignee: Caolán McNamara
Whiteboard: target:7.6.0
Keywords: haveBacktrace
Depends on:
Blocks: Undo-Zero-Steps Crash
  Show dependency treegraph
Reported: 2017-07-01 15:13 UTC by Telesto
Modified: 2023-05-04 07:51 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

Example file (50.09 KB, application/vnd.oasis.opendocument.graphics)
2017-07-01 15:15 UTC, Telesto
GDB trace of crash (22.75 KB, text/plain)
2019-06-23 14:15 UTC, Buovjaga

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2017-07-01 15:13:58 UTC
Bit of a corner case. Crash: When editing a document which is opened at the moment of setting the undo count to zero (0)

Steps to Reproduce:
1. Open the attachment
2. Menu -> Tools -> Options - Advanced -> Open expert configuration: Set the undo count from 100 (default) to zero (https://help.libreoffice.org/Common/Memory#Number_of_undo_steps) 
3. Delete the image

Actual Results:  

Expected Results:
No crash.

Reproducible: Always

User Profile Reset: No

Additional Info:
Build ID: cac5c9f6081590b0548d3116bc4cd4a2509ec576
CPU threads: 4; OS: Windows 6.19; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-07-01_00:41:48
Locale: nl-NL (nl_NL); Calc: CL

User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Comment 1 Telesto 2017-07-01 15:15:05 UTC
Created attachment 134427 [details]
Example file
Comment 2 raal 2017-07-05 04:54:02 UTC
confirm. Version:
Build ID: 77f77c57d336ba041faf51e2168372d1e0962a19
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-06-29_23:40:47
Comment 3 Telesto 2017-07-20 20:26:21 UTC
@Michael, you might be interested in this one (based on the previous fixes)
Comment 4 QA Administrators 2018-07-27 02:42:39 UTC Comment hidden (obsolete)
Comment 5 Buovjaga 2019-06-21 14:24:33 UTC
No crash for me. Telesto, can you re-test?
If this is gone, there would be only one bug left in the 0 undo steps meta. I hope the last one could be fixed as well and then I think the meta might be closed.

Arch Linux 64-bit
Build ID: ff6456b851cbe80f9fa03522c88699cc30ffcfb6
CPU threads: 8; OS: Linux 5.1; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 21 June 2019
Comment 6 Telesto 2019-06-21 20:16:06 UTC
I still repro.. Scope is very limited .. It's only happening with the file opened at the point when changing undo from 100 to 0 

Version: (x86)
Build ID: 60271c4433372097ef5ecc74e522532ebf5af8e0
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-06-19_05:53:39
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: threaded
Comment 7 Buovjaga 2019-06-23 14:15:17 UTC
Created attachment 152356 [details]
GDB trace of crash

It's true, I wasn't going exactly by the steps in the description. Now I got a trace after following them by the book.
Comment 8 QA Administrators 2022-05-17 03:30:35 UTC Comment hidden (obsolete)
Comment 9 Telesto 2022-05-17 07:07:42 UTC
Still crashing
Version: / LibreOffice Community
Build ID: 7e2d26ef0ed47bf01d7396aa7c749062f9bdde98
CPU threads: 8; OS: Mac OS X 12.3.1; UI render: Skia/Metal; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded
Comment 10 Commit Notification 2023-05-04 07:51:09 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":


tdf#108889 ref count goes negative with 0 undo levels configured

It will be available in 7.6.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:

Affected users are encouraged to test the fix and report feedback.
Comment 11 Caolán McNamara 2023-05-04 07:51:31 UTC
that works for me in trunk