Crash in ntdll.dll when stopping Timer


#1

I am having a crash in ntdll.dll when I stop a timer.  This only happens in the debug build.  Does anybody have any ideas (partial stack trace below)?

ntdll.dll!RtlpWaitOnCriticalSection()
ntdll.dll!RtlpEnterCriticalSetionContended()
ntdll.dll!_RtlEnterCriticalSection@4()
juce::CriticalSection::enter(void)
juce::GenericScopedLock<class juce::CriticalSection>::GenericScopedLock<class juce::CriticalSection>(class juce......
juce::Timer::stopTimer(void)


#2

Where is the crash? Looks more like a dead-lock. Do you use the CriticalSection i your class? 


#3

I am just calling timerStop which has it's own lock.


#4

Most likely tour timer object is a dangling pointer.


#5

I just inherit the timer class and the first call in my destructor is stopTimer();


#6

Any other suggestions, like I said, this only happens in the debug build (could it be some build setting)?   


#7

Yes, and like I said, it'll be a dangling or null pointer.


#8

No, I do not think its about the build settings. If often happens, that crashes only appear under certain circumstances, especially if pointers are involved. So you have to start by checking your code. Sucessively remove code (in debug mode), until the crash disappears. That should help you narrow down the root cause.