<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Variables having assigned objects from closed components pretend to still be valid. Attempts to inspect them in the IDE cause crashes."
href="https://bugs.documentfoundation.org/show_bug.cgi?id=126828">126828</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Variables having assigned objects from closed components pretend to still be valid. Attempts to inspect them in the IDE cause crashes.
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>6.3.0.2 rc
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>BASIC
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jag@psilosoph.de
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=153299" name="attach_153299" title="The announced attachment. Contains macro!">attachment 153299</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=153299&action=edit" title="The announced attachment. Contains macro!">[details]</a></span>
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>