assert GetEventHandler()== this failed Topic is solved

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
samsam598
Super wx Problem Solver
Super wx Problem Solver
Posts: 324
Joined: Mon Oct 06, 2008 12:55 pm

assert GetEventHandler()== this failed

Post by samsam598 » Tue Nov 01, 2011 8:10 am

When I build wxFreeChart(http://sourceforge.net/projects/wxcode/ ... omponents/) with wx2.9.2 and/or wx2.9.3 +MinGW3.4.5 under windows xp,everything goes fine,the lib's generated and the sample program runs.But when I click X to close the sample window,wxWidgets Debug Alert window popped out and said:

Code: Select all

../../src/common/wincmn.cpp(468):assert "assert GetEventHandler()== this" failed in ~wxWindowBase():any pushed event handlers must have been removed.
Do you want to stop the program?
...
I have no clue what happened here and where to find the problem.
Could anybody help to figure me out where to start to search the possible problem?

Thanks for your help in advance.

Best Regards,
Sam
Regards,
Sam
-------------------------------------------------------------------
Windows xp
VS.Net 2003/MinGW 3.4.5 C::B character set: UTF-8
wxWidgets github 3.0 RC1 Unicode Static build,Unicode Shared build.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2066
Joined: Sun Jan 03, 2010 5:45 pm

Re: assert GetEventHandler()== this failed

Post by PB » Thu Dec 15, 2011 12:23 pm

I know it's somewhat late to respond to this (I started using wxFreeChart just yesterday and run into the same problem), but better late than never right?

Making an wxAuiManager instance a MainFrame member variable and calling its UnInit() method in the MainFrame destructor in the sample got me rid of the problems (wxWidgets 2.9.3, MSVC 2008, static monolithic build).So fortunately it was an issue just with the demo application and not the library itself.

Hope it helps (someone).

samsam598
Super wx Problem Solver
Super wx Problem Solver
Posts: 324
Joined: Mon Oct 06, 2008 12:55 pm

Re: assert GetEventHandler()== this failed

Post by samsam598 » Fri Dec 16, 2011 3:15 am

PB wrote:I know it's somewhat late to respond to this (I started using wxFreeChart just yesterday and run into the same problem), but better late than never right?

Making an wxAuiManager instance a MainFrame member variable and calling its UnInit() method in the MainFrame destructor in the sample got me rid of the problems (wxWidgets 2.9.3, MSVC 2008, static monolithic build).So fortunately it was an issue just with the demo application and not the library itself.

Hope it helps (someone).
Thank you so much,PB!!It isn't late.The issue's fixed and the thread should be marked now. :D
Regards,
Sam
-------------------------------------------------------------------
Windows xp
VS.Net 2003/MinGW 3.4.5 C::B character set: UTF-8
wxWidgets github 3.0 RC1 Unicode Static build,Unicode Shared build.

f4grx
In need of some credit
In need of some credit
Posts: 1
Joined: Tue Nov 26, 2013 3:30 pm

Re: assert GetEventHandler()== this failed

Post by f4grx » Tue Nov 26, 2013 3:32 pm

Hello,

I also got this problem with the recently released wxWidgets 3.0 in Windows Seven / mingw32TDM.

The proposed solution (calling wxAuiManager->UnInit(); in the frame destructor) also solved the problem.

Thank you!

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2066
Joined: Sun Jan 03, 2010 5:45 pm

Re: assert GetEventHandler()== this failed

Post by PB » Tue Nov 26, 2013 7:36 pm

As this is rather common problem with (the first-time use of) AUI, I am surprised patch from this ticket, seemingly simple, working and backwards compatible was not been applied long time ago. Perhaps it somewhat slipped through the cracks...

ollydbg23
I live to help wx-kind
I live to help wx-kind
Posts: 188
Joined: Fri Dec 12, 2008 10:31 am

Re: assert GetEventHandler()== this failed

Post by ollydbg23 » Sat Jul 14, 2018 3:03 pm

PB wrote:As this is rather common problem with (the first-time use of) AUI, I am surprised patch from this ticket, seemingly simple, working and backwards compatible was not been applied long time ago. Perhaps it somewhat slipped through the cracks...
I meet this issue today(I just forget to add the Uninit() function call), and I see this ticket is still not resolved. That's 6 years. :(

Post Reply