Toolbar dropdown menu crash on wxPython 4.0.0b2 on Win7

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Toolbar dropdown menu crash on wxPython 4.0.0b2 on Win7

terence.coudert
Hi

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.

Thanks for your help
Terence.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

app.py (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Toolbar dropdown menu crash on wxPython 4.0.0b2 on Win7

Tim Roberts
[hidden email] 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.

--
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Toolbar dropdown menu crash on wxPython 4.0.0b2 on Win7

Rufus V. Smith

> On Oct 25, 2017, at 1:02 PM, Tim Roberts <[hidden email]> wrote:
>
> [hidden email] 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.
>

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


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Toolbar dropdown menu crash on wxPython 4.0.0b2 on Win7

Robin Dunn
In reply to this post by Tim Roberts
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:
[hidden email] 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.

--
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Toolbar dropdown menu crash on wxPython 4.0.0b2 on Win7

Robin Dunn
See https://github.com/wxWidgets/Phoenix/issues/580 to follow up.

Robin


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:
[hidden email] 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.

--
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.