Problem with Timer-related assertion


#1

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;
}
else
{
-> 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


#2

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


#3

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…

-A


#4