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: 340
Joined: Mon Oct 06, 2008 12:55 pm

assert GetEventHandler()== this failed

Post by samsam598 »

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 10 64bit
VS Community 2019
msys2-mingw13.2.0 C::B character set: UTF-8/GBK(Chinese)
wxWidgets 3.3/3.2.4 Unicode Mono Static gcc static build
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4182
Joined: Sun Jan 03, 2010 5:45 pm

Re: assert GetEventHandler()== this failed

Post by PB »

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: 340
Joined: Mon Oct 06, 2008 12:55 pm

Re: assert GetEventHandler()== this failed

Post by samsam598 »

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 10 64bit
VS Community 2019
msys2-mingw13.2.0 C::B character set: UTF-8/GBK(Chinese)
wxWidgets 3.3/3.2.4 Unicode Mono Static gcc static 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 »

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: 4182
Joined: Sun Jan 03, 2010 5:45 pm

Re: assert GetEventHandler()== this failed

Post by PB »

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
Super wx Problem Solver
Super wx Problem Solver
Posts: 438
Joined: Fri Dec 12, 2008 10:31 am

Re: assert GetEventHandler()== this failed

Post by ollydbg23 »

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