Closed gijzelaerr closed 10 years ago
Original comment thread migrated from bugzilla
Every so often, when I close a browser window where a plot is being displayed I get messages of the form:
Traceback (most recent call last): File "/home/twillis/LOFAR/installed/current/libexec/python/Timba/Grid/Services.py", line 138, in hideEvent self.emit(PYSIGNAL("hidden()"),()); File "/home/twillis/LOFAR/installed/current/libexec/python/Timba/Grid/CellBlock.py", line 186, in _unfloat w.reparent(cell.wtop(),pos); RuntimeError: underlying C/C++ object has been deleted
I think this thing tends to occur most often when I'm trying to close a window which I've let float free of the browser. I'll try to quantify it more carefully, but I thought I would open a bug report just to get things rolling.
This is actually a bit of a weakness with PyQwt: if you implicitly destroy a widget from the Qt side while retaining a Python reference to it, the Python object becomes invalid. E.g.:
parent = QListView(); child = QListViewItem(parent); parent.clear() // implicitly destroys all items in ListView child.someQtMethod() // voila, see scary error message
As you can imagine, it's quite easy to trigger if you're not careful... I've been trying to squash these errors one by one, so if you see more of them, please add the stack traces and scenarios here.
Scenario:
I have a 3d plot display (this can now be generated by running the uvbrick_test.g script in ~twillis/LOFAR/Timba/MeqServer/test on lofar9, and clicking on the MeqUVBrick vellsets 0 value ( a 1 x 2 x 741 x 741 array)). I 'float' the display from the browser by clicking on the 'float' icon. Then I click on the red x 'close this panel' icon. This causes the display to disappear, but a blank panel is left floating. I then click on the window manager X in the upper right hand corner. This causes the panel to disappear, but I then get
Traceback (most recent call last): File "/home/twillis/LOFAR/installed/current/libexec/python/Timba/Grid/Services.py", line 138, in hideEvent self.emit(PYSIGNAL("hidden()"),()); File "/home/twillis/LOFAR/installed/current/libexec/python/Timba/Grid/CellBlock.py", line 186, in _unfloat w.reparent(cell.wtop(),pos); RuntimeError: underlying C/C++ object has been deleted
Attempts to replot the array then fail with messages about 'Bad window' and the screen can then freeze.
Actually this seems to happen if you float any visualization window free (including standard 2D array plot) and then shut things down in the sequence I listed in my previous comment.
Traceback (most recent call last): File "/home/brentjens/LOFAR/installed/current/libexec/python/Timba/GUI/app_proxy_gui.py", line 544, in customEvent self.handleAppEvent(*event.data()); File "/home/brentjens/LOFAR/installed/current/libexec/python/Timba/GUI/meqserver_gui.py", line 219, in handleAppEvent self.treebrowser.update_forest_status(fstatus); File "/home/brentjens/LOFAR/installed/current/libexec/python/Timba/GUI/treebrowser.py", line 599, in update_forest_status self.make_node_visible(self._debug_node); File "/home/brentjens/LOFAR/installed/current/libexec/python/Timba/GUI/treebrowser.py", line 657, in make_node_visible best_item = self.expand_active_tree(active_ni=node.nodeindex); File "/home/brentjens/LOFAR/installed/current/libexec/python/Timba/GUI/treebrowser.py", line 668, in expand_active_tree self._nlv.setOpen(start,True); RuntimeError: underlying C/C++ object has been deleted
Haven't seen any in a while, so I'm downgrading the bug. Please add more if you see them.
Haven't seen any for a while in the browser. Some visualization plugins still trip over this though. Should file separate bugs as appropriate.
at 2005-04-16 00:22:04 Tony Willis reported:
Underlying C/C++ object being deleted