Bug 114670 - Crash in: Menu::~Menu()
Summary: Crash in: Menu::~Menu()
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.4.2 release
Hardware: All All
: medium normal
Assignee: Maxim Monastirsky
URL:
Whiteboard: target:6.1.0 target:5.4.5 target:6.0.0.2
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-23 17:49 UTC by Gibey
Modified: 2018-01-03 16:23 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["Menu::~Menu()"]


Attachments
extension to reproduce the crash (2.34 KB, application/vnd.openofficeorg.extension)
2017-12-23 19:05 UTC, Maxim Monastirsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gibey 2017-12-23 17:49:41 UTC
This bug was filed from the crash reporting server and is br-b88ee78d-7bc6-48ec-96e9-102cf788e46c.
=========================================
Comment 1 Gibey 2017-12-23 17:51:44 UTC
Using Writer with 2 files open Copy/paste between Files
Comment 2 Xisco Faulí 2017-12-23 18:07:00 UTC Comment hidden (obsolete)
Comment 3 Maxim Monastirsky 2017-12-23 19:05:25 UTC
Created attachment 138612 [details]
extension to reproduce the crash

I looked at the crash report, and I believe this is how to reproduce this crash:

1. If under Linux, export SAL_USE_VCLPLUGIN=gen
2. Open LO, install the attached extension.
3. Open a Writer document.
4. Switch off edit mode (menu Edit > Edit Mode).
5. Right click on the document.
6. Close the context menu, by either selecting a menu option, or just clicking somewhere outside the menu.

VclPtr<Menu> pMenu; in SwEditWin::Command looks suspicious, probably changing it to ScopedVclPtr will do the trick.
Comment 4 Xisco Faulí 2017-12-23 23:08:52 UTC
I can reproduce it in

Version: 6.1.0.0.alpha0+
Build ID: 45bbb07680b3d81aaf66ef2d11c95d4c48ab23de
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: x11; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

but not in

Version: 6.0.0.0.alpha1+
Build ID: f94d98db1be8c27e470b39d4b16ed406db3aef87
CPU threads: 1; OS: Windows 6.1; UI render: default; 
Locale: es-ES (es_ES); Calc: group
Comment 5 Commit Notification 2017-12-23 23:10:46 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

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

tdf#114670 Make sure to dispose the menu

It will be available in 6.1.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 6 Maxim Monastirsky 2017-12-23 23:16:33 UTC
Fixed on master, backport to 6-0 and 5-4 in gerrit.
Comment 7 Maxim Monastirsky 2017-12-23 23:19:34 UTC
(In reply to Xisco Faulí from comment #4)
> but not in
> 
> Version: 6.0.0.0.alpha1+
> Build ID: f94d98db1be8c27e470b39d4b16ed406db3aef87
> CPU threads: 1; OS: Windows 6.1; UI render: default; 
> Locale: es-ES (es_ES); Calc: group
That's odd, as I reproduced it also in 5.4.4.2 under Windows 7.
Comment 8 Xisco Faulí 2017-12-23 23:24:59 UTC
(In reply to Maxim Monastirsky from comment #7)
> (In reply to Xisco Faulí from comment #4)
> > but not in
> > 
> > Version: 6.0.0.0.alpha1+
> > Build ID: f94d98db1be8c27e470b39d4b16ed406db3aef87
> > CPU threads: 1; OS: Windows 6.1; UI render: default; 
> > Locale: es-ES (es_ES); Calc: group
> That's odd, as I reproduced it also in 5.4.4.2 under Windows 7.

Oh, actually i forgot to set it to read-only when i tested on win. I can reproduce it on win now. Thanks for the quick fix btw ;-)
Comment 9 Xisco Faulí 2017-12-27 23:40:26 UTC
Verified in

Version: 6.1.0.0.alpha0+
Build ID: 2bf1cc7372088ec31ac5f0fb60de57feda59d3b7
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded
Comment 10 Commit Notification 2018-01-03 16:21:41 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1fc5b27a72f00b34a681cd9aa63438119436e7dd&h=libreoffice-5-4

tdf#114670 Make sure to dispose the menu

It will be available in 5.4.5.

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 11 Commit Notification 2018-01-03 16:23:03 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=612a613a6bad3574f4750b27a3638064963baf14&h=libreoffice-6-0

tdf#114670 Make sure to dispose the menu

It will be available in 6.0.0.2.

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.