Bug 59484 - : Dialog endExecute() crash libreoffice
Summary: : Dialog endExecute() crash libreoffice
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
3.6.4.3 release
Hardware: All Windows (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords: haveBacktrace
: 63525 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-16 21:48 UTC by Franco Pellegrini
Modified: 2017-01-04 08:40 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example (10.58 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-01-27 02:18 UTC, Franco Pellegrini
Details
Example (10.58 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-01-27 02:20 UTC, Franco Pellegrini
Details
more robust tescase to reproduce the problem (16.04 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-04-14 13:09 UTC, pasqual milvaques
Details
backtrace of the error extracted with windbg (561.95 KB, application/octet-stream)
2014-01-25 20:08 UTC, pasqual milvaques
Details
analisys of the backtrace done with windbg (5.61 KB, text/plain)
2014-01-25 20:11 UTC, pasqual milvaques
Details
testcase to reproduce the problem (16.04 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-04-19 17:26 UTC, pasqual milvaques
Details
backtrace extracted with the procdump tool on windows (7.11 KB, text/plain)
2015-04-20 15:15 UTC, pasqual milvaques
Details
backtrace of the problem in windows 8.1 32 bits (error in the first iteration) (7.04 KB, text/plain)
2015-04-20 18:23 UTC, pasqual milvaques
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Franco Pellegrini 2013-01-16 21:48:14 UTC
Problem description: 
When I use the method endExecute() in a Dialog (to close it with a specific condition) 90% libreofice crash.

Steps to reproduce:
1. create a dialog (GUI)
2. excecute it with a button with some macro like:

Dim oDlg As Object
Sub StartDialog
oDlg = CreateUnoDialog(DialogLibraries.Standard.Dialog1 )
oDlg.execute()
End Sub 

3. finish the dialog excecution with a button in it, excecuting the macro:

Sub CloseDialog
oDlg.endExecute()
End Sub

Current behavior:
90% crash prob 

Expected behavior:
Close the Dialog
              
Operating System: Windows 8
Version: 3.6.4.3 release
Comment 1 Markus Mohrhard 2013-01-17 15:35:19 UTC
Not even close to a blocker bug.
Comment 2 bfoman (inactive) 2013-01-25 12:07:57 UTC
Could you attach any example documents with needed macro, button etc. to allow others to check on different system/build simply by downloading and opening a file? Thanks.
Comment 3 Franco Pellegrini 2013-01-27 02:18:02 UTC
Created attachment 73706 [details]
Example

here it is the example. When you press the button, the dialog close and the libreoffice crash
Comment 4 Franco Pellegrini 2013-01-27 02:20:31 UTC
Created attachment 73707 [details]
Example

Here it is (example). When you press the close button, the dialog close an then libreoffice crash.
Comment 5 Franco Pellegrini 2013-01-27 07:43:00 UTC
In ubuntu works Fine, so its a Windows version bug
Comment 6 bfoman (inactive) 2013-01-28 10:15:43 UTC
(In reply to comment #4)
> Here it is (example). When you press the close button, the dialog close an
> then libreoffice crash.

Checked with:
LO 4.0.0.2
Build ID: own W7 debug build
Windows 7 Professional SP1 64 bit

Could not reproduce. Dialog closed, no crash.
Comment 7 Franco Pellegrini 2013-01-28 12:31:28 UTC
I´m using Windows 8 pro 64bits when it crash. I try to remove all the appdata info and reinstalling again, but the problem continues. I can reproduce it in another machine with the same windows version.
Comment 8 pasqual milvaques 2013-04-14 13:04:44 UTC
*** Bug 63525 has been marked as a duplicate of this bug. ***
Comment 9 pasqual milvaques 2013-04-14 13:09:53 UTC
Created attachment 77948 [details]
more robust tescase to reproduce the problem

take a look to:
https://bugs.freedesktop.org/show_bug.cgi?id=63525

for more information
Comment 10 pasqual milvaques 2013-04-14 13:16:05 UTC
I have the same problem and I reported it in bug (closed as duplicate of this one):
https://bugs.freedesktop.org/show_bug.cgi?id=63525

I add here the tescase that I created for that bug report 

the problem seems to be windows specific and doesn't happens with all dialogs and not every time you use them, with complex dialogs it's easy to reproduce. 

please, use that latest tescase submitted to see if you can reproduce the problem as that one is more exhaustive to look for the problem

thanks
Comment 11 francogpellegrini 2013-07-06 12:32:25 UTC
This can be reproduced with Libreoffice 4.0.4.2
Comment 12 francogpellegrini 2013-07-06 12:34:50 UTC
(using dispose())
Comment 13 pasqual milvaques 2014-01-25 20:04:28 UTC
Comment on attachment 77948 [details]
more robust tescase to reproduce the problem

this testcase not longer gives error with libreoffice 4.1 (at least for me)
Comment 14 pasqual milvaques 2014-01-25 20:08:51 UTC
Created attachment 92781 [details]
backtrace of the error extracted with windbg

following the guide in:
https://wiki.documentfoundation.org/How_to_get_a_backtrace_with_WinDbg

I have extracted this minidump with libreoffice 4.2.0.3
Comment 15 pasqual milvaques 2014-01-25 20:11:23 UTC
Created attachment 92782 [details]
analisys of the backtrace done with windbg
Comment 16 Julien Nabet 2015-04-19 13:21:50 UTC
Franco/Pasqual: any update with recent LO version (4.4.2 or at least 4.3.6)?
Comment 17 pasqual milvaques 2015-04-19 17:26:06 UTC
Created attachment 114914 [details]
testcase to reproduce the problem

to reproduce the problem click the 'Launch TestCase (complex dialog)' button. it will open and close a dialog 10 times, if that doesn't not freeze libreofice repeat the operation several times
Comment 18 pasqual milvaques 2015-04-19 17:27:45 UTC
Using the testcase, that I have uploaded a moment ago, the problem still reproduces with 4.4.2
Comment 19 Julien Nabet 2015-04-19 18:52:48 UTC
On pc Debian x86-64 with master sources updated today, I don't reproduce this after having clicked on the button 5 times.
Hope someone will be luckier than me or perhaps Windows only bug.

It could be great if someone could retrieve a backtrace with symbols. (see https://wiki.documentfoundation.org/QA/BugReport/Debug_Information)
Comment 20 pasqual milvaques 2015-04-20 15:15:50 UTC
Created attachment 114961 [details]
backtrace extracted with the procdump tool on windows

the dump has been extracted with the procdump tool and later analyzed with windbg
Comment 21 pasqual milvaques 2015-04-20 15:31:38 UTC
Increasing the number of iterations in the testcase code can make easier to reproduce the problem (use 1000 or more). In my home pc the problem reproduces quite fast (10-15 iterations), at work it I have need a lot more, I don't know the cause. I will try to take an additional backtrace
I can't reproduce too the bug in centos 7
Comment 22 Julien Nabet 2015-04-20 15:42:46 UTC
Pasquale: taking a quick look to bt, the pb is at this line:
GetMessageW( &aTmpMsg, pInst->mhComWnd, SAL_MSG_RELEASEWAITYIELD, SAL_MSG_RELEASEWAITYIELD );
(see http://opengrok.libreoffice.org/xref/core/vcl/win/source/app/salinst.cxx#239)

Caolan: bt part shows vcl part with "GetMessageW" function. It seems the only location where "GetMessageW" is used (instead of "GetMessage").
Any thought?
Comment 23 pasqual milvaques 2015-04-20 18:23:42 UTC
Created attachment 114965 [details]
backtrace of the problem in windows 8.1 32 bits (error in the first iteration)

in this backtrace libreoffice hanged in the first iteration (normally take 10-5 to fail but this also happens sometimes), the ios was windows 8.1 32 bits
Comment 24 pasqual milvaques 2015-04-20 18:33:25 UTC
I have tested more at home (windows 8.1 32 bits), there the problem reproduces very fast and the error is different from the one I had at work (windows 7 64 bits).

the error in the 32 bits machine seems a thread interlock (error in mutex.c) and happens very quickly, probably the errors are two different bugs

I will test it more tomorrow to check if the os architecture is relevant
Comment 25 pasqual milvaques 2015-04-21 13:48:41 UTC
today I have tested the problem in new windows 7, 32 and 64 bits, machines. the mutex bug reproduces in both quite quickly so the os architecture doesn't seem relevant in this bug
Comment 26 QA Administrators 2017-01-03 19:48:35 UTC Comment hidden (obsolete)
Comment 27 pasqual milvaques 2017-01-04 08:40:15 UTC
Works for me in LibreOffice 5.2.4 both in Linux x86-64 (fedora) and Windows 10 32 bits