Bug 131613 - Crash after object rename from Navigator
Summary: Crash after object rename from Navigator
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.0.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2020-03-26 21:36 UTC by Jim Raykowski
Modified: 2020-04-01 16:52 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
document with one table (8.37 KB, application/vnd.oasis.opendocument.text)
2020-03-26 21:36 UTC, Jim Raykowski
Details
crash backtrace (36.59 KB, text/plain)
2020-03-26 21:41 UTC, Jim Raykowski
Details
video demo of crash (482.01 KB, video/x-matroska)
2020-03-27 02:22 UTC, Jim Raykowski
Details
bt with debug symbols (4.32 KB, text/plain)
2020-03-27 21:59 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Raykowski 2020-03-26 21:36:34 UTC
Created attachment 159053 [details]
document with one table

This seems to happen only when a file is opened from the launcher and only for SAL_USE_VCLPLUGIN=gen

Steps to repro:

1) Open the attached test file
2) Open Navigator in the sidebar
3) Right click on Table1 and select Rename... from the context menu
4) Click Cancel

result: Crash

Version: 7.0.0.0.alpha0+
Build ID: b23b0452dde6608b13d3fcb7feaff92bee019927
CPU threads: 4; OS: Linux 5.0; UI render: default; VCL: x11; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Jim Raykowski 2020-03-26 21:41:42 UTC
Created attachment 159055 [details]
crash backtrace

The attached backtrace shows GetParent() is not valid in the call to GetParentWindow()->UpdateListBox() in SwContentTree::ExecuteContextMenuAction
Comment 2 Bhavesh Patel 2020-03-26 22:16:37 UTC
Not repeatable under Windows 10 - version 7.0.0.0.alpha0+ (x86 and 64 bit, both)
Comment 3 Julien Nabet 2020-03-26 22:42:35 UTC
Just for the record, on pc Debian x86-64 with master sources updated today + gen rendering I don't reproduce this.
Comment 4 Jim Raykowski 2020-03-27 02:22:30 UTC
Created attachment 159058 [details]
video demo of crash

It only happens for me when done immediately after the document opens. If the MotD window appears, or if another action like clicking on a menu item in the main menu is done first, it does not happen.

I repro on both:
  Lubuntu/Ubuntu 19.04 LXQt Version: 0.14.1
  Lubunto/Ubuntu 18.04 LXDE

The blanking of the Navigator content view, seen in the attached video, also occurs for me when Edit... replaces the repro step of Rename... but does not crash on exit of the dialog like rename does.
Comment 5 Jim Raykowski 2020-03-27 02:35:10 UTC
(In reply to Jim Raykowski from comment #4)
> or if another action like clicking on a menu item
> in the main menu is done first, it does not happen.

Please ignore this about clicking on a menu item, but not the MotD part.
Comment 6 Julien Nabet 2020-03-27 19:45:57 UTC
I reproduced once but now I can't anymore.
What does "MotD" mean?
Comment 7 Jim Raykowski 2020-03-27 21:37:19 UTC
(In reply to Julien Nabet from comment #6)
> I reproduced once but now I can't anymore.
> What does "MotD" mean?

Message of the Day, should have been TotD (Tip of the Day), the dialog with helpful tips that appears sometimes at start.
Comment 8 Julien Nabet 2020-03-27 21:59:33 UTC
Created attachment 159084 [details]
bt with debug symbols

I could reproduce this but very difficult to reproduce.
I wasn't on gdb so attached gdb when I saw the right pane was blank.
Comment 9 Xisco Faulí 2020-03-31 11:52:36 UTC
I can't reproduce it in

Version: 7.0.0.0.alpha0+
Build ID: 11e6582b23b983fde4b04ece5b37c546bcd98a43
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: x11; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

I don't have enough time to reproduce the steps before the tip of the day is prompted
Comment 10 Jim Raykowski 2020-03-31 17:55:23 UTC
(In reply to Xisco Faulí from comment #9)

> I don't have enough time to reproduce the steps before the tip of the day is
> prompted

Hi Xisco,

You could try exiting and restarting. For me the tip of the day only appears once a day unless I do a reset to factory settings.
Comment 11 Aron Budea 2020-04-01 00:17:56 UTC
Thanks for the hint, Jim!
Confirmed with the following steps in LO 7.0.0.0.alpha0+ (9b784a74a2f09e9eb9a0fd41d58c1f6b47ee6ee6):

1. Remove/rename the user profile
2. Open the attached file like eg. SAL_USE_VCLPLUGIN=gen ./soffice ~/onetable.odt
3. Dismiss the Tip of the Day dialog with OK, and exit LO
4. Start LO again like SAL_USE_VCLPLUGIN=gen ./soffice
5. Open the document again, from the start center
6. Open Navigator in the sidebar
7. Right click on Table1 and select Rename... from the context menu
8. Click Cancel

=> Crash.
No crash again when further repeating steps 4-8.

No crash in LO 6.4. => regression

Bibisected to the following commit using repo bibisect-linux-64-6.5. Adding CC: to Caolán McNamara.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=027ccdb03b1d6f7bfb7bc89fdd30a6ca2a6b21e0
author		Caolán McNamara <caolanm@redhat.com>	2020-02-14 13:00:29 +0000
committer	Caolán McNamara <caolanm@redhat.com>	2020-02-15 13:44:29 +0100

weld NumEditAction Item Window
Comment 12 Caolán McNamara 2020-04-01 10:40:26 UTC
sidebar is destroyed and recreated for some reason in these scenarios and its possible to get a popup menu from the first one before its destroyed and activate it after its own is destroyed
Comment 13 Caolán McNamara 2020-04-01 10:56:06 UTC
I think its timing related wrt the results for your available printers coming back triggering a DataChanged which eventually causes the sidebars to be recreated
Comment 14 Caolán McNamara 2020-04-01 11:04:24 UTC
assuming what I see as the trigger for me is the same for everyone else then ignoring printer changing for layout of the panels would make it not happen. And in any account I see that I commented the code triggering the re-layout as of dubious utility anyway so I think its safer to remove that too.
Comment 15 Commit Notification 2020-04-01 13:09:40 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5ed29e09f73168a943710837d9877c04d3ee034a

tdf#131613 ignore printer change as a trigger for relayout panels

It will be available in 7.0.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 Commit Notification 2020-04-01 13:11:02 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#131613 remove explicit UpdateSettings call

It will be available in 7.0.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 17 Caolán McNamara 2020-04-01 13:11:44 UTC
That fixed what I saw, hopefully there's just the one problem
Comment 18 Jim Raykowski 2020-04-01 16:52:10 UTC
Thank you Caolán for the fix and explanation of the cause. I no longer can repro the crash.