Bug 97380 - Dialog Designer: Crash when importing a dialog file twice
Summary: Dialog Designer: Crash when importing a dialog file twice
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:5.2.0 target:5.1.3
Keywords: haveBacktrace
Depends on:
Blocks: BASIC-Dialog-Designer
  Show dependency treegraph
 
Reported: 2016-01-26 13:43 UTC by Samuel Mehrbrodt (allotropia)
Modified: 2016-10-25 19:03 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple xdl dialog (1.12 KB, application/xml)
2016-04-16 08:53 UTC, Samuel Mehrbrodt (allotropia)
Details
bt + console logs (5.87 KB, text/plain)
2016-04-16 10:20 UTC, Julien Nabet
Details
bt for exchanging one non-NULL manager log (6.97 KB, text/plain)
2016-04-16 10:59 UTC, Julien Nabet
Details
bt for exchanging one non-NULL manager log (5.13 KB, text/plain)
2016-04-16 11:26 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Mehrbrodt (allotropia) 2016-01-26 13:43:13 UTC
1. Open Dialog Designer
2. Import any dialog file, choose "Replace" when asked
3. Repeat step 2
4. LibreOffice crashes

Happens on Windows 7, 32 bit, LO Version: 5.0.4.2
Comment 1 Buovjaga 2016-01-28 17:10:52 UTC
Replacing somehow does not work at all in 5.0.4. The file is not imported and import button does not work immediately (have to close the designer).
5.2 works, but does not crash :(

Win 7 Pro 64-bit, Version: 5.0.4.2 (x64)
Build ID: 2b9802c1994aa0b7dc6079e128979269cf95bc78
Locale: fi-FI (fi_FI)

Version: 5.2.0.0.alpha0+
Build ID: 259c1ed201f4277d74dfd600fed8c837cbf56abc
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-01-27_00:45:12
Locale: fi-FI (fi_FI)
Comment 2 raal 2016-01-30 08:10:10 UTC
I can reproduce crash in first import. Version: 5.2.0.0.alpha0+
Build ID: d1a49df6833ff16f5cbaf98534eaae62693e520b
CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-01-29_02:01:58
Comment 3 Julien Nabet 2016-04-16 08:05:44 UTC
Samuel: why did you put me in cc?
No problem to give it a try to retrieve a bt but I don't even know how to import a dialog file :-(
Comment 4 Samuel Mehrbrodt (allotropia) 2016-04-16 08:52:42 UTC
(In reply to Julien Nabet from comment #3)
> Samuel: why did you put me in cc?
> No problem to give it a try to retrieve a bt but I don't even know how to
> import a dialog file :-(

I did because you were fixing other crashes, so thought you might try this one also.
You can import a dialog file by going to Tools->Macros->Organize Dialogs, then create a new dialog, and use the toolbar button "Import dialog" to import an existing dialog.
I'll upload one here.
Comment 5 Samuel Mehrbrodt (allotropia) 2016-04-16 08:53:23 UTC
Created attachment 124382 [details]
Simple xdl dialog
Comment 6 Julien Nabet 2016-04-16 10:20:55 UTC
Created attachment 124384 [details]
bt + console logs

On pc Debian x86-64 with master sources updated today, I could reproduce this.

Thank you Samuel for the additional info.
Comment 7 Julien Nabet 2016-04-16 10:59:02 UTC
Created attachment 124385 [details]
bt for exchanging one non-NULL manager log

However, it seems the test is wrong since if pUndoMgr is null and pNewUndoMgr is not null.
Comment 8 Julien Nabet 2016-04-16 11:04:18 UTC
(In reply to Julien Nabet from comment #7)
> Created attachment 124385 [details]
> bt for exchanging one non-NULL manager log
> 
> However, it seems the test is wrong since if pUndoMgr is null and
> pNewUndoMgr is not null.

Oups, wrong test, forget this comment.
Comment 9 Julien Nabet 2016-04-16 11:26:11 UTC
Created attachment 124386 [details]
bt for exchanging one non-NULL manager log

This one is the right one this time.
Comment 10 Julien Nabet 2016-04-16 21:55:47 UTC
I submitted a patch on master sources to gerrit, see https://gerrit.libreoffice.org/#/c/24139/
Comment 11 Commit Notification 2016-04-16 22:29:35 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

tdf#97380: don't destroy completely window when replace dialog

It will be available in 5.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 12 Samuel Mehrbrodt (allotropia) 2016-04-18 12:03:24 UTC
Thanks a lot Julien!

Can someone verify this is fixed on Windows also?
Comment 13 Buovjaga 2016-04-21 06:54:00 UTC
No crash.

Win 7 Pro 64-bit Version: 5.2.0.0.alpha0+
Build ID: 3dca8575d63db50b0120fbff09bbfcd056fa3732
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-04-20_05:07:29
Locale: fi-FI (fi_FI)
Comment 14 Commit Notification 2016-04-21 14:01:56 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

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

tdf#97380: don't destroy completely window when replace dialog

It will be available in 5.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 15 Commit Notification 2016-05-03 09:36:33 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-5-1-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=83189bcee3235baec8f0314dada6e7e9fcd1baaf&h=libreoffice-5-1-3

tdf#97380: don't destroy completely window when replace dialog

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