Download it now!
Bug 46655 - Crash when executeDispatch('.uno:Quit') in python macros in W7
Summary: Crash when executeDispatch('.uno:Quit') in python macros in W7
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-26 13:57 UTC by LAB Emmanuel
Modified: 2015-02-11 19:48 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Self-running macro which launches LibreOffice if not yet launched (3.81 KB, text/x-python)
2012-02-26 13:57 UTC, LAB Emmanuel
Details
gdb traces (11.28 KB, text/plain)
2012-02-29 13:23 UTC, LAB Emmanuel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LAB Emmanuel 2012-02-26 13:57:01 UTC
Created attachment 57683 [details]
Self-running macro which launches LibreOffice if not yet launched

Problem description: 
systematic crash when calling Dispatcher.executeDispatch(model.getCurrentController(),
                               '.uno:Quit', '', 0, ())
This did not exist with release 3.4.3

Steps to reproduce:
1. Run macro joined on W7 while LibreOffice is not running

Current behavior:
Crashes

Expected behavior:
Should quit LibreOffice and stop

Platform (if different from the browser): W7
              
Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Comment 1 Stephan Bergmann 2012-02-27 02:30:49 UTC
This might basically be the same as <https://issues.apache.org/ooo/show_bug.cgi?id=59026> "crash on desktop terminate() through PyUNO" and <http://cgit.freedesktop.org/libreoffice/core/tree/unotest/source/cpp/officeconnection.cxx?id=bb4ceaa4bbe253f4d6b22b09098de0f2f0b793c8#n162> "it appears that DisposedExceptions can already happen while receiving the response of the terminate call" (and it might well be coincidence that you never experienced it with 3.4.3):  When a remote process asks soffice to terminate, it can happen that soffice drops the connection to the remote process rather early, so the remote process's end of the bridge generates a DisposedException which the remote process then sees as the response of its request to terminate soffice.
Comment 2 LAB Emmanuel 2012-02-29 01:50:32 UTC
The proposed explanation might be good, but does not explain that LibreOffice crashes and can not be re-run without killing the process manually.
Comment 3 Stephan Bergmann 2012-02-29 04:23:19 UTC
(In reply to comment #2)
> The proposed explanation might be good, but does not explain that LibreOffice
> crashes and can not be re-run without killing the process manually.

So, does soffice.bin crash for you or does it hang (so you need to "kill[...] the process manually")?

Maybe the to-be-terminated soffice.bin deadlocks (potentially from within the signal handler)?  Then, any newly started soffice processes would not spawn new soffice.bin instances, but would rather try to connect to the hanging instance.

If there is an soffice.bin process still running, you can attach gdb to it and obtain backtraces with "thread apply all bt".
Comment 4 LAB Emmanuel 2012-02-29 13:23:34 UTC
Created attachment 57831 [details]
gdb traces
Comment 5 LAB Emmanuel 2012-02-29 13:29:45 UTC
Comment on attachment 57831 [details]
gdb traces

What really happends is the following:
on bug.py I get:
  File "C:\Users\Emmanuel\Documents\Emmanuel\Developpement\Eclipse\LibreOffice\Bug.py", line 95, in <module>
    '.uno:Quit', '', 0, ())
__main__.DisposedException: Binary URP bridge disposed during call

On LibreOffice I Get a new window "Libre Office 3.5" in french saying more or less "LibreOffice stopped suddently due to an unwaited error. all files on which you where running ..."
The list of files to be recovered is empty.
Clicking OK button does not have any effect.
soffice.bin and soffice.exe processes are still running

running gdb gives the attached traces.

trying to open a LibreOffice Document does not have any effect. neither trying to open one of the components of LibreOffice. except that it adds a soffice.bin and soffice.exe instance in the process lists.

Trying to kill the process soffice.bin using Windows task management works and puts back to normal everything.
Comment 6 Stephan Bergmann 2012-02-29 13:56:41 UTC
(In reply to comment #5)
> On LibreOffice I Get a new window "Libre Office 3.5" in french saying more or
> less "LibreOffice stopped suddently due to an unwaited error. all files on
> which you where running ..."
> The list of files to be recovered is empty.
> Clicking OK button does not have any effect.
> soffice.bin and soffice.exe processes are still running

Ah, that's the crash reporting mechanism (where soffice.exe starts a new instance of soffice.bin if the latter has crashed).  Disable it with passing --norestore command line argument to soffice.exe.
Comment 7 LAB Emmanuel 2012-03-01 09:11:59 UTC
(In reply to comment #6)
> Ah, that's the crash reporting mechanism (where soffice.exe starts a new
> instance of soffice.bin if the latter has crashed).  Disable it with passing
> --norestore command line argument to soffice.exe.
I confirm that passing the --norestore argument suppress the crash and blocking.
This clue solves my problem, but seems to confirm existence of 1) a crash, 2) a problem in the crash reporting mechanism.
Comment 8 bfoman (inactive) 2013-01-29 10:42:14 UTC
(In reply to comment #5)
> running gdb gives the attached traces.

Sorry for offtopic - as you used it, would you like to add Debugging with gdb (on Windows) section to https://wiki.documentfoundation.org/Development/How_to_debug ?
This could help some developers to receive more input from users in case of crashers and thus improve LO quality. Thanks in advance.
Comment 9 Julien Nabet 2013-07-22 08:46:48 UTC
Emmanuel: any update with a newer LO version? (last stable one from 4.0 branch is 4.0.4)
Comment 10 Jorendc 2014-05-17 09:34:43 UTC
Per comment 9 -> NEEDINFO

(In reply to comment #9)
> Emmanuel: any update with a newer LO version? (last stable one from 4.0
> branch is 4.0.4)
Comment 11 QA Administrators 2015-01-10 18:06:16 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information.

For more information about our NEEDINFO policy please read the wiki located here: 
https://wiki.documentfoundation.org/QA/FDO/NEEDINFO

If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed.


Thank you for helping us make LibreOffice even better for everyone!


Warm Regards,
QA Team

Message generated on: 10/01/2015
Comment 12 QA Administrators 2015-02-11 19:48:11 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INVALID due to inactivity and a lack of information which is needed in order to accurately reproduce and confirm the problem. We encourage you to retest your bug against the latest release. If the issue is still present in the latest stable release, we need the following information (please ignore any that you've already provided):

a) Provide details of your system including your operating system and the latest version of LibreOffice that you have confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED and we will attempt to reproduce the issue. 
Please do not:
a) respond via email 
b) update the version field in the bug or any of the other details on the top section of FDO

Message generated on: 2015-02-11