Bug 120487 - Delete all comments leaves a comment box behind (and will end in a crash) ( not gtk3 )
Summary: Delete all comments leaves a comment box behind (and will end in a crash) ( n...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.1.2 release
Hardware: All All
: highest critical
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.2.0 target:6.1.3
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2018-10-10 15:45 UTC by Telesto
Modified: 2018-10-19 09:35 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["sw::annotation::SwAnnotationWin::GetAuthor()"]


Attachments
Example file (24.15 KB, application/vnd.oasis.opendocument.text)
2018-10-10 15:45 UTC, Telesto
Details
screencast (4.66 MB, video/mp4)
2018-10-10 16:18 UTC, Xisco Faulí
Details
bt from assert with debug symbols (gtk) (21.88 KB, text/plain)
2018-10-10 20:49 UTC, Julien Nabet
Details
bt with debug symbols (gen) (9.80 KB, text/plain)
2018-10-10 20:50 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2018-10-10 15:45:03 UTC
Description:
Delete all comments leaves a comment box behind (and will end in crash)

Steps to Reproduce:
1. Open the attached file
2. Click bottom comment box arrow & delete all comments 
3. Comment box stays behind.
4. Enter the remain textbox and press CUT -> Crash (there a more scenarios which will end in crash)

Actual Results:
Crash

Expected Results:
No crash


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.2.0.0.alpha0+
Build ID: 87e3539d69626780c6d7531b725dd0d64c69e6d8
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-10-10_06:50:13
Locale: nl-NL (nl_NL); Calc: CL
Comment 1 Telesto 2018-10-10 15:45:18 UTC
Created attachment 145573 [details]
Example file
Comment 2 Xisco Faulí 2018-10-10 16:05:56 UTC
I can reproduce it in

Version: 6.2.0.0.alpha0+
Build ID: 87e3539d69626780c6d7531b725dd0d64c69e6d8
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: x11; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

and

Versión: 6.1.2.1
Id. de compilación: 65905a128db06ba48db947242809d14d3f9a93fe
Subprocs. CPU: 1; SO: Windows 6.1; Repres. IU: predet.; 
Configuración regional: es-ES (es_ES); Calc: group threaded
Comment 3 Xisco Faulí 2018-10-10 16:13:04 UTC
Regression introduced by:

author	Caolán McNamara <caolanm@redhat.com>	2018-08-07 13:44:17 +0100
committer	Caolán McNamara <caolanm@redhat.com>	2018-08-07 17:18:01 +0200
commit b8a83417ed080b4c63b797d3f6837c49cdbdd2a2 (patch)
tree 73d5b34fd4c6d837e8e6d75eebacb6dea478a3e8
parent 0dced3431fd7ef664d55d73ac9b1ec76d28c51fd (diff)
tdf#119130 only have the active postit as a dialog control...

Bisected with: bibisect-linux64-6.2

Adding Cc: to Caolán McNamara
Comment 4 Xisco Faulí 2018-10-10 16:15:48 UTC
I can't reproduce it in gtk3, only gtk or gen
Comment 5 Xisco Faulí 2018-10-10 16:18:07 UTC
Created attachment 145577 [details]
screencast
Comment 6 Julien Nabet 2018-10-10 20:49:22 UTC
Created attachment 145581 [details]
bt from assert with debug symbols (gtk)

On pc Debian x86-64 with master sources updated today, I got an assert when trying to delete all comments.
Comment 7 Julien Nabet 2018-10-10 20:50:59 UTC
Created attachment 145582 [details]
bt with debug symbols (gen)

On pc Debian x86-64 with master sources updated today, I could reproduce the pb with gen rendering. There's a remnant comment after having clicked "Delete all comments" and when clicking on button on it, it crashed.
Comment 8 Caolán McNamara 2018-10-11 14:36:24 UTC
looks like a tricky focus problem, disposing the window causes the focus to move to another window, and eventually triggers recreating missing comment boxes because the comment is still in the list of comments, because its removed after the dispose completes
Comment 9 Commit Notification 2018-10-11 18:45:02 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=759dcc107cb7740ec4242634a19631d9ed70cb0f

Resolves: tdf#120487 postit losing focus triggering recreation of postit

It will be available in 6.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 10 Caolán McNamara 2018-10-11 18:45:54 UTC
backport to 6-1 in gerrit
Comment 11 Commit Notification 2018-10-13 18:46:15 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f1e09253316d9db39b7adab6d31e759c09de3406&h=libreoffice-6-1

Resolves: tdf#120487 postit losing focus triggering recreation of postit

It will be available in 6.1.4.

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

Affected users are encouraged to test the fix and report feedback.
Comment 12 Xisco Faulí 2018-10-15 10:13:22 UTC
Verified in

Version: 6.2.0.0.alpha0+
Build ID: 49c87270f7176312806d1759967c247a312f0acf
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: x11; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

@Caolán, Thanks for fixing this!
Comment 13 Commit Notification 2018-10-19 08:35:16 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-1-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a4257d576cb77753979aae14a9c1751d14d6e375&h=libreoffice-6-1-3

Resolves: tdf#120487 postit losing focus triggering recreation of postit

It will be available in 6.1.3.

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

Affected users are encouraged to test the fix and report feedback.
Comment 14 Julien Nabet 2018-10-19 09:35:28 UTC
Simplify targets