Bug 141930 - libreoffice math does not ask to save changes when closing
Summary: libreoffice math does not ask to save changes when closing
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
7.1.2.2 release
Hardware: All Linux (All)
: high major
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.2.0 target:7.1.4 target:7.0.6
Keywords: bibisected, dataLoss, regression
: 141519 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-04-27 11:05 UTC by Markéta Machová
Modified: 2021-08-03 08:51 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markéta Machová 2021-04-27 11:05:04 UTC
This bug started to occur in 7.1.2 in all SUSE and openSUSE distributions and it is still here.

Version: 7.1.3.1 / LibreOffice Community
Build ID: 10(Build:1)
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: x11
Locale: en-US (en_US.utf8); UI: en-US
Calc: threaded

Steps to reproduce:
1. open Math Formula editor
2. make some changes
3. kill it with Ctrl+q

Expected: 'save changes' dialog pops out
Actual: no dialog, changes lost

I did not test other distributions. Could you please look into it? Thanks!
Comment 1 Gerald Pfeifer 2021-04-30 11:56:18 UTC
I does not reproduce in all situations, but many, and deterministically.

Here is a concrete reproducer:

 1. Open Math Formula editor.
 2. Select +[ ] symbol (unary plus) from the list.
 3. Enter "abc" and click outside symbol + string (leaving edit mode).
 4. <Ctrl>+<Q> - "Save changes" message box pops up.
 5. Click at the string "abc" (entering edit mode again).
 5. <Ctrl>+<Q> exits Math Formula editor without question.

NOT reproduced with Version: 7.1.1.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US

REPRODUCED with Version: 7.1.3.0.0+ / LibreOffice Community
Build ID: 66319fd36564f55feb9669b3f117176f4ef4c939
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:libreoffice-7-1, Time: 2021-03-20_11:15:06

NOT reproduced with Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 0dc9da5df470b9c345e78dbe9553d81b9e4a7435
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-04-29_15:55:29


So this looks like a regression on the 7.1 release branch between 7.1.1.2
and 7.1.3.0.0+ as of March 20.
Comment 2 Gerald Pfeifer 2021-04-30 11:57:42 UTC
Still reproduces with current 7.1 branch, i.e.,

Version: 7.1.4.0.0+ / LibreOffice Community
Build ID: e5b8477a1270a8b572b3815cfb318110eb19d0f2
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:libreoffice-7-1, Time: 2021-04-28_11:37:37
Comment 3 Marina Latini (SUSE) 2021-05-03 10:48:33 UTC
Some notes for reproducing the regression:

The regression happens only when trying to close using <ctrl>+<q> or <alt>+<f4>. The save pop-up shows properly trying to use File+Close from the File menu.
 
I tried to bisect with VCL=kf5 but it works perfectly showing always the save pop-up as expected.

The regression is gtk3 only. 
For my bisect I was able to reproduce forcing VCL with:
SAL_USE_VCLPLUGIN=gtk3


cd8a95897491fa33980122053825176779e7624a is the first bad commit
commit cd8a95897491fa33980122053825176779e7624a
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Fri Feb 26 01:04:33 2021 +0100

    source sha:f7243a465fc75f8c29c1decb7628f7a8f6d1d769
    
    source sha:f7243a465fc75f8c29c1decb7628f7a8f6d1d769

 instdir/program/libsmlo.so | Bin 1791192 -> 1791264 bytes
 instdir/program/setuprc    |   2 +-
 instdir/program/versionrc  |   2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)

 
 
 git bisect log
# bad: [a0d29a846f1429ed8281d59f22bcfbdd13119279] source sha:91385bbc7cccfdf59f60a24eaf81894772134af0
# good: [36741205b2e1c9e51d58dff4d0b4ce9022013411] source sha:574c57090642347980d2395e1e183cc7b5c171ad
git bisect start 'origin/master' 'oldest'
# good: [a41af4542f3c9bd81eba53ed8d55c23543d82ef7] source sha:487df0c8f307500029b06c89985a1148ebc784b5
git bisect good a41af4542f3c9bd81eba53ed8d55c23543d82ef7
# good: [fdbbff390d14ece1013e2ea8f511f9ace5f6da4b] source sha:ebea072fa7d7081ba9d1e549f5aa629c749d8c0e
git bisect good fdbbff390d14ece1013e2ea8f511f9ace5f6da4b
# good: [71fc1eec4e0ecdbd983a21610e6a745470c4b82d] source sha:14fb7d2cce5c41bacf7c6b571aa946c766205bc3
git bisect good 71fc1eec4e0ecdbd983a21610e6a745470c4b82d
# good: [b01d2c96f3a1cffd388e43c6fb26616a8d542ccb] source sha:bc0d161d3651ab2d38a6ff664e43841d2719f4cc
git bisect good b01d2c96f3a1cffd388e43c6fb26616a8d542ccb
# good: [17cc6f8c9ce4df336b9b78008ce1bd9239a092ab] source sha:608151c7de0f0661783daceecd9250bdcf497b59
git bisect good 17cc6f8c9ce4df336b9b78008ce1bd9239a092ab
# bad: [606a1b6c61493129322817145ecc6fd48798ccfd] source sha:11d344f6271e4171f8006c2cb29372f612cbdc00
git bisect bad 606a1b6c61493129322817145ecc6fd48798ccfd
# bad: [e816f0bcf200157099e00b069e2f45f2d0c532ea] source sha:ff94f7779232088728bf724ec47608f35f5310b7
git bisect bad e816f0bcf200157099e00b069e2f45f2d0c532ea
# bad: [377f98e9d6b6432410eb65d6b3c21dc52590187d] source sha:d92235df75829a8cf2ee8cc7b0b76063093b6cc2
git bisect bad 377f98e9d6b6432410eb65d6b3c21dc52590187d
# bad: [924927e1950ae5f3c113adbec19d559fc0d25351] source sha:bbafee3424fdc59d2f69204fefab8a318aeec0e1
git bisect bad 924927e1950ae5f3c113adbec19d559fc0d25351
# bad: [e615b0b9af48f065fcbc4fd9d86b60152511d19c] source sha:f580ea54bddee91e85ef018be286b60b48935681
git bisect bad e615b0b9af48f065fcbc4fd9d86b60152511d19c
# good: [eb71bd63e4f77212d45f412a8eb6412259dbb107] source sha:1220b206c7be018ca970421f36b8ed4774321ae2
git bisect good eb71bd63e4f77212d45f412a8eb6412259dbb107
# bad: [cd8a95897491fa33980122053825176779e7624a] source sha:f7243a465fc75f8c29c1decb7628f7a8f6d1d769
git bisect bad cd8a95897491fa33980122053825176779e7624a
# good: [4933965c83355ace9db5e23d85a206f69711f21a] source sha:2465b0467d57ca325e820f13efeb40e69386b4a1
git bisect good 4933965c83355ace9db5e23d85a206f69711f21a
# first bad commit: [cd8a95897491fa33980122053825176779e7624a] source sha:f7243a465fc75f8c29c1decb7628f7a8f6d1d769


https://git.libreoffice.org/core/+/f7243a465fc75f8c29c1decb7628f7a8f6d1d769
Adding to CC Caolán McNamara

Raising the priority to high-major because there's a dataloss risk connected to this regression.
Comment 4 Caolán McNamara 2021-05-04 08:05:12 UTC
Prior to that change using the cursor keys will also reset the state so that no save dialog is prompted on exit, the underlying issue preexists.
Comment 5 Commit Notification 2021-05-04 09:37:05 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9fed7b07af44792012028eb57900640a5ee833cb

tdf#141930 document set as unmodified if editengine didn't modify on keyevent

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 6 Commit Notification 2021-05-04 11:20:18 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/8e78b937fca92f5ed07383e69ceef71715a15fe1

tdf#141930 document set as unmodified if editengine didn't modify on keyevent

It will be available in 7.1.4.

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 7 Xisco Faulí 2021-05-05 14:35:56 UTC
Verified in

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

@Caolán, thanks for fixing this issue!!
Comment 8 Commit Notification 2021-05-05 14:39:02 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-0-6":

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

tdf#141930 document set as unmodified if editengine didn't modify on keyevent

It will be available in 7.0.6.

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 9 Commit Notification 2021-05-05 18:47:52 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/61900f697dd7bb5161eb0e56d0cea87153efbb9b

tdf#141930 document set as unmodified if editengine didn't modify on keyevent

It will be available in 7.0.7.

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 10 Adolfo Jayme 2021-05-08 06:31:13 UTC
*** Bug 141519 has been marked as a duplicate of this bug. ***
Comment 11 Rober James 2021-07-28 06:06:46 UTC Comment hidden (spam)