[Libreoffice-bugs] [Bug 126828] New: Variables having assigned objects from closed components pretend to still be valid. Attempts to inspect them in the IDE cause crashes.
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Sun Aug 11 16:33:18 UTC 2019
https://bugs.documentfoundation.org/show_bug.cgi?id=126828
Bug ID: 126828
Summary: Variables having assigned objects from closed
components pretend to still be valid. Attempts to
inspect them in the IDE cause crashes.
Product: LibreOffice
Version: 6.3.0.2 rc
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: jag at psilosoph.de
Created attachment 153299
--> https://bugs.documentfoundation.org/attachment.cgi?id=153299&action=edit
The announced attachment. Contains macro!
(See also code below.)
A variable got assigned a component, another one an object emerging from that
component. The component then was closed (doc.Close(True)).
Expectations:
Closing a document component should remove any non-Null assignment from
variables previously giving access to it or to an object having emerged from
that component.
The variables should best get assigned the 'Null' value.
Actual behaviour:
After closing the document component, the IDE still shows the mentioned
variables as if they still give access to the dead document and to the other
object.
Special aggravation:
An attempt to inspect one of the phantom objects results in a complete crash of
LibreOffice.
Experience and tests with LibO V 6.3.0.2RC under Win 10 newest version as of
2019-08-10.
MS Windows(TM) Version 1903 (Build 18362.267)
"1903" should probably read "2019-03", but wisely MS indicates the corporation
won't live to see the next century.
Code:
Sub test
Dim nullOb As Object REM Usage see below!
Dim doc As Object, Sheet As Object
doc = StarDesktop.loadComponentFromUrl("private:factory/scalc", "_blank", 0,
Array())
sheet = doc.Sheets(0)
doc.Close(True)
h1 = doc REM Assignment as if doc still is accessible!
h2 = sheet REM Assignment as if sheet still is accessible!
REM The following would help to avoid the crash.
doc = nullOb
sheet = nullOb
End Sub
For more details see attachment.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190811/60b0f656/attachment.html>
More information about the Libreoffice-bugs
mailing list