Open greschd opened 1 year ago
A crude way to get rid of the error is by removing
added in #1141. I suspect this is not the correct solution though, and #1141 simply exposed the underlying issue.
Possibly related to this recent PR: https://github.com/enthought/pyface/pull/1192
Directly reverting #1192 (and passing self.control
as parent
) doesn't fix the issue, but it might indeed be related to why parent
was maybe used at some earlier point.
Also note: I've noticed this particular repro doesn't produce an error on Linux, but have seen the same error in a more complex application. If desired, I can try and find a version that fails on both platforms.
I have a hypothesis that this is because the status bar is not being removed from the owning window before it is destroyed.
Environment
OS: Windows Python version: 3.10 Toolkit: Wx
Description
When creating a
Workbench
with astatus_bar
, the following exception is raised when closing the window:Steps to Reproduce
Run the following script (adapted and minimized from the
workbench
example):Other observations
The exception does not occur if the window tab (
fred
) is closed before closing the Application.Changing the toolkit to
'qt'
also makes the exception disappear.