Assert failure in wxTimer (wxMSW)

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
asp
Knows some wx things
Knows some wx things
Posts: 32
Joined: Sun Sep 12, 2004 4:35 pm

Assert failure in wxTimer (wxMSW)

Post by asp » Thu Sep 01, 2005 10:55 am

Hello

Some users of my application have reported this assert failure:
bogus timer id in wxTimerProc
I can't reproduce this problem, even running the program 24 hours a day during several weeks.

Does anyone know how this problem can be solved?

Thanks

Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg » Thu Sep 01, 2005 11:07 am

not without crucual code .. it sounds like a debug / release issue .. are you sure your vars are initialized right ??

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb

upCASE
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE » Thu Sep 01, 2005 11:12 am

Hmmm...
Although this shouldn't happen as ~wxTimer() calls Stop first which deletes the timer from the timer map, I'd suggest to explicitly stop timers before deleting them. If you use a lot of timers, maybe the timer id lookup isn't fast enough. But I guess this would really mean a lot timers. Maybe multithreading your app could help in that case.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda

asp
Knows some wx things
Knows some wx things
Posts: 32
Joined: Sun Sep 12, 2004 4:35 pm

Post by asp » Thu Sep 01, 2005 12:37 pm

Yes, the vars are initialized correctly and I stop the timers before destroying them. Normally, there are about 3-4 timers enabled. The problem is really hard to reproduce, in fact I can't, so I don't know which timer triggers the assert failure.

Post Reply