Bug 92666 - Base Form/Database Closed When Report Window Closed If Database Browser Window .SetVisible(False)
Summary: Base Form/Database Closed When Report Window Closed If Database Browser Windo...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
(earliest affected)
3.6 all versions
Hardware: Other All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Base-UX
  Show dependency treegraph
Reported: 2015-07-10 04:29 UTC by Doug
Modified: 2019-10-22 02:32 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:

demonstration database: enable macros and open Form1, follow instructions there (17.57 KB, application/vnd.sun.xml.base)
2015-07-10 04:29 UTC, Doug
the odb that crashes (44.83 KB, application/vnd.oasis.opendocument.database)
2017-10-15 17:00 UTC, Ηλίας Ηλιάδης
bt with debug symbols from ODatabaseDocument::connectController message (9.79 KB, text/plain)
2017-10-15 18:43 UTC, Julien Nabet

Note You need to log in before you can comment on or make changes to this bug.
Description Doug 2015-07-10 04:29:58 UTC
Created attachment 117165 [details]
demonstration database: enable macros and open Form1, follow instructions there

When the database browser is hidden via macro using the method.SetVisible(False), if a Base Report is opened and then the report window is closed, the Form used to open the report via macro is unexpectedly is closed as well, along with the whole database.

The report window should be treated like a Form window and should be closeable without closing everything regardless of whether the database browser is .SetVisible(False).  Alternatively, when you close the report's Writer window, it should not close a hidden database that has an open Form.

If is not possible to artfully macro around this, as the report window does not seem to have any macro events.

This is presumably one of several non-integration bugs from the implementation of jFreeReport.  Using Windows 7 LO
Comment 1 Alex Thurgood 2015-07-12 10:50:32 UTC
Build ID: 9136f2344af88d524b6c10b6b2dfd6017bba60ec
Locale: fr-FR (fr.UTF-8)

Comment 2 Alex Thurgood 2015-07-12 10:50:46 UTC
Reproduced on OSX
Comment 3 Robert Großkopf 2015-07-12 15:01:14 UTC
I have tested this:
Set the database unvisible (first button).
Opened the report (second button).
Closed the report (only the report) by choosing "Close Document" (not close the window of the windowmaker) or "File" → "Close"

Both ways the database isn't closed because the entry-menue is opened instead of the report. The form is also open.

If I close the report-document by coosing taking the 'X' from the windowmaker it will close the whole LibreOffice - also the opened form. This is different if I open the report directly from base without hiding the window.

"File" → "Exit LibreOffice" will close all opened windows - if visible or hidden it makes no difference.

So I could confirm the database is unexpectly closed when choosing the close-button of the windowmaker. This behavior is the same in all LO-Versions I have installed - also 3.*-Versions.

My system: OpenSUSE 13.2 64bit rpm Linux
Comment 4 Doug 2015-07-14 02:14:30 UTC
I would tick the importance of the bug down a notch because there is a partial workaround by watching the state of the Writer window via macro and hiding the Base application window again when the Writer window is closed.  Base macros seem to be multi-threaded, allowing the applications to continue normally while the Base macro loops looking for the size.width of the writer window to go to 0 or the .isVisible to go to false, at which time it hides the application window.  The need for the first `Wait 50` below illustrates another oddity of LO Basic, which is that sometimes instituting a `Wait` is necessary to allow the application to finish reaching the desired state before continuing.

    appWindow.isMinimized = True

    Wait 50
    writerRept = reportContainer.open
    writerCntrllr = writerRept.CurrentController
    writerFrame = writerCntrllr.Frame
    writerWindow = writerFrame.getComponentWindow

    i = 0
    sz = writerWindow.getSize.Width
    vis = writerWindow.isVisible

    Do While sz > 0 And vis = True And i < 100000
      sz = writerWindow.getSize.width 
      vis = writerWindow.isVisible
      i = i + 1
      Wait 10    

Comment 5 QA Administrators 2016-09-20 10:18:56 UTC Comment hidden (obsolete)
Comment 6 Ηλίας Ηλιάδης 2017-10-15 17:00:22 UTC
Created attachment 136996 [details]
the odb that crashes

I can provide a mysql dump if needed but I think it will not be necessary.
Comment 7 Ηλίας Ηλιάδης 2017-10-15 17:02:45 UTC
Comment on attachment 136996 [details]
the odb that crashes

odb crashes after closing the main BASE window if opened with macros enabled.
Comment 8 Julien Nabet 2017-10-15 18:43:32 UTC
Created attachment 136999 [details]
bt with debug symbols from ODatabaseDocument::connectController message

On pc Debian x86-64 with master sources updated yesterday + enable-dbgutil, I don't reproduce the crash but I got a hang when trying to open the file.

I noticed too this message:
warn:legacy.osl:12259:12274:dbaccess/source/core/dataaccess/databasedocument.cxx:808: ODatabaseDocument::connectController: this controller is already connected!
Comment 9 QA Administrators 2018-10-16 02:51:15 UTC Comment hidden (obsolete)
Comment 10 Robert Großkopf 2018-10-21 15:58:57 UTC
Bug still exists with version: on OpenSUSE 15, 64bit rpm Linux.
Comment 11 QA Administrators 2019-10-22 02:32:18 UTC
Dear Doug,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

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

Warm Regards,
QA Team