When I run the attached script on Linux using wxpython Phoenix 4.0.1, I get the traceback error: “RuntimeError: wrapped C/C++ object of type NotebookDemo has been deleted” (attached) when I close the GUI frame if I change tabs before I close; where as, if I don’t change tabs, or if I change back to “TabOne” before closing the GUI frame, I don’t get an error. When I run the same script on a MACOSX running wxpython 3.0.0 I don’t get a traceback error if I change tabs or not before closing.
Is there something I’m doing wrong, or is this a bug in Phoenix 4.0.1?
When I run the attached script on Linux using wxpython Phoenix 4.0.1, I get the traceback error: “RuntimeError: wrapped C/C++ object of type NotebookDemo has been deleted” (attached) when I close the GUI frame if I change tabs before I close; where as, if I don’t change tabs, or if I change back to “TabOne” before closing the GUI frame, I don’t get an error. When I run the same script on a MACOSX running wxpython 3.0.0 I don’t get a traceback error if I change tabs or not before closing.
Is there something I’m doing wrong, or is this a bug in Phoenix 4.0.1?
Thanks,
Jeff
–
You received this message because you are subscribed to the Google Groups “wxPython-users” group.
mario@pc:~$ python
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
[GCC 7.3.0] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
import wx
print wx.version
3.0.2.0
[2]+ Detenido python
mario@pc:~$ python3
Python 3.6.6 (default, Sep 12 2018, 18:26:19)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
It sounds like the EVT_NOTEBOOK_PAGE_CHANGED and EVT_NOTEBOOK_PAGE_CHANGING events are being processed after the notebook has started to be or has already been deleted, and the events are probably initially sent when the notebook is deleting the pages and it needs to switch the current page to one that still exists. The delay in processing the events could stem from differences in the GTK version, like gtk2 vs gtk3, or it’s not unheard of for different point releases of gtk to have behavioral differences like this. It could also be interference from a theme engine or something. In any case, the workaround is easy, just add something like this to the beginning of those handlers:
When I run the attached script on Linux using wxpython Phoenix 4.0.1, I get the traceback error: “RuntimeError: wrapped C/C++ object of type NotebookDemo has been deleted” (attached) when I close the GUI frame if I change tabs before I close; where as, if I don’t change tabs, or if I change back to “TabOne” before closing the GUI frame, I don’t get an error. When I run the same script on a MACOSX running wxpython 3.0.0 I don’t get a traceback error if I change tabs or not before closing.
Is there something I’m doing wrong, or is this a bug in Phoenix 4.0.1?
On Wednesday, October 3, 2018 at 5:17:09 PM UTC-5, Robin Dunn wrote:
On Tuesday, October 2, 2018 at 11:56:48 AM UTC-7, jeff....@gmail.com wrote:
When I run the attached script on Linux using wxpython Phoenix 4.0.1, I get the traceback error: “RuntimeError: wrapped C/C++ object of type NotebookDemo has been deleted” (attached) when I close the GUI frame if I change tabs before I close; where as, if I don’t change tabs, or if I change back to “TabOne” before closing the GUI frame, I don’t get an error. When I run the same script on a MACOSX running wxpython 3.0.0 I don’t get a traceback error if I change tabs or not before closing.
Is there something I’m doing wrong, or is this a bug in Phoenix 4.0.1?
It sounds like the EVT_NOTEBOOK_PAGE_CHANGED and EVT_NOTEBOOK_PAGE_CHANGING events are being processed after the notebook has started to be or has already been deleted, and the events are probably initially sent when the notebook is deleting the pages and it needs to switch the current page to one that still exists. The delay in processing the events could stem from differences in the GTK version, like gtk2 vs gtk3, or it’s not unheard of for different point releases of gtk to have behavioral differences like this. It could also be interference from a theme engine or something. In any case, the workaround is easy, just add something like this to the beginning of those handlers:
On Wednesday, October 3, 2018 at 1:26:34 PM UTC-5, Mario Lacunza wrote:
I have both Python 2 & 3 installed:
mario@pc:~$ python
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
[GCC 7.3.0] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
import wx
print wx.version
3.0.2.0
[2]+ Detenido python
mario@pc:~$ python3
Python 3.6.6 (default, Sep 12 2018, 18:26:19)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
When I run the attached script on Linux using wxpython Phoenix 4.0.1, I get the traceback error: “RuntimeError: wrapped C/C++ object of type NotebookDemo has been deleted” (attached) when I close the GUI frame if I change tabs before I close; where as, if I don’t change tabs, or if I change back to “TabOne” before closing the GUI frame, I don’t get an error. When I run the same script on a MACOSX running wxpython 3.0.0 I don’t get a traceback error if I change tabs or not before closing.
Is there something I’m doing wrong, or is this a bug in Phoenix 4.0.1?
Thanks,
Jeff
–
You received this message because you are subscribed to the Google Groups “wxPython-users” group.