I don't believe this is unique to Phoenix. I'm using wxPython
3.0.3dev78327 on Python 3.4.2 on Windows 10. When I run your program
as-is, the drop-downs do nothing, but the app crashes on exit. The
crash is a heap corruption caused by freeing an already freed block.
I thought maybe it was related to using the same artwork in two menus,
so I commented out the second drop-down. When I do that, the first
drop-down triggers a crash, trying to dereference a pointer that's
actually a string ("cpp("). It still crashes on exit.
If I comment out the calls to tb.SetDropDown, then it exits just fine.
It's clearly some interaction between the toolbar and the menu.
···
terence.coudert@sintef.no wrote:
Please find attached a program that build a toolbar with a drop down tool.
The application crash when trying to access the drop-down menu and it
also crash when I close the window.
The program work fine when using Python 2.7 and wxPython 3, but it
crash when using Python 3.6 and wxPython 4.0.0b2.
I'm working on Windows 7.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
I have run into close-time crashes in the past when I've done things which made
sense to me at the time, like using a static text in multple places.
The first container closes down cleanly, but the second container will cause
a crash because the element doesn't exist.
Are you trying to do double-duty with any of your windows/widgets?
Rufus
···
On Oct 25, 2017, at 1:02 PM, Tim Roberts <timr@probo.com> wrote:
terence.coudert@sintef.no wrote:
Please find attached a program that build a toolbar with a drop down tool.
The application crash when trying to access the drop-down menu and it
also crash when I close the window.
If I comment out the calls to tb.SetDropDown, then it exits just fine.
It's clearly some interaction between the toolbar and the menu.
It looks like the menu is being deleted twice, probably due to not transferring ownership of the C++ menu object to the toolbar. I’ll verify that later today and get it fixed.
Robin
···
On Wednesday, October 25, 2017 at 10:02:25 AM UTC-7, Tim Roberts wrote:
terence.coudert@sintef.no wrote:
Please find attached a program that build a toolbar with a drop down tool.
The application crash when trying to access the drop-down menu and it
also crash when I close the window.
The program work fine when using Python 2.7 and wxPython 3, but it
crash when using Python 3.6 and wxPython 4.0.0b2.
I’m working on Windows 7.
I don’t believe this is unique to Phoenix. I’m using wxPython
3.0.3dev78327 on Python 3.4.2 on Windows 10. When I run your program
as-is, the drop-downs do nothing, but the app crashes on exit. The
crash is a heap corruption caused by freeing an already freed block.
I thought maybe it was related to using the same artwork in two menus,
so I commented out the second drop-down. When I do that, the first
drop-down triggers a crash, trying to dereference a pointer that’s
actually a string (“cpp(”). It still crashes on exit.
If I comment out the calls to tb.SetDropDown, then it exits just fine.
It’s clearly some interaction between the toolbar and the menu.
On Wednesday, October 25, 2017 at 10:57:06 AM UTC-7, Robin Dunn wrote:
It looks like the menu is being deleted twice, probably due to not transferring ownership of the C++ menu object to the toolbar. I’ll verify that later today and get it fixed.
Robin
On Wednesday, October 25, 2017 at 10:02:25 AM UTC-7, Tim Roberts wrote:
terence.coudert@sintef.no wrote:
Please find attached a program that build a toolbar with a drop down tool.
The application crash when trying to access the drop-down menu and it
also crash when I close the window.
The program work fine when using Python 2.7 and wxPython 3, but it
crash when using Python 3.6 and wxPython 4.0.0b2.
I’m working on Windows 7.
I don’t believe this is unique to Phoenix. I’m using wxPython
3.0.3dev78327 on Python 3.4.2 on Windows 10. When I run your program
as-is, the drop-downs do nothing, but the app crashes on exit. The
crash is a heap corruption caused by freeing an already freed block.
I thought maybe it was related to using the same artwork in two menus,
so I commented out the second drop-down. When I do that, the first
drop-down triggers a crash, trying to dereference a pointer that’s
actually a string (“cpp(”). It still crashes on exit.
If I comment out the calls to tb.SetDropDown, then it exits just fine.
It’s clearly some interaction between the toolbar and the menu.