Problem with Timer-related assertion

I have an error that only arises on Windows:

[color=blue]void removeTimer (Timer* const t) throw()
if (t->previous != 0)
jassert (firstTimer != t);
t->previous->next = t->next;
-> jassert (firstTimer == t);
firstTimer = t->next;[/color]

The assertion marked with an arrow is made, and subsequently an error occurs in the following line of dbgheap.c:

[color=blue]/* fill data with silly value (but non-zero) */
memset((void *)pbData(pHead), _bCleanLandFill, nSize);[/color]

  • What could be the cause for this? I know which class has the timer that causes assertion, but the underlying reason of the assertion is not clear to me.

  • Thanks in advance, A

Most likely you’re corrupting memory, deleting a dangling pointer, or something along those lines…

Okay, I guess I have to go hunting then… I think it’s worth mentioning, that the exact same code with regards to timers runs smoothly on mac…