mmingfeilam1
August 24th, 2007, 06:43 PM
Hi,
My company is writing a test harness in MFC to test out the Cantata telephone switch. we keep on running into issues when we are running the test harness with a lot of threads, ie >=40 threads. Attached is a screen shot of the assertion error that keeps on popping up. It complains about CMutex m_eventQueueCS not being a valid runtime class:
ASSERT(pObject->IsKindOf(RUNTIME_CLASS(CSyncObject)))
I suspect this is because of the invalid memory address that m_eventQueueCS occupies. This is probably due to the limited stack size assigned to the whole process, when the stack size is exceeded, then a thread can simply overwrite the existing stack memory, thereby causing memory problems. I tried to change m_eventQueueCS to use heap memory by doing this: m_eventQueueCS = new CMutex(); but it doesn't help.
Could there be a limit to the number of mutexex that you can have in an application/process?
Can anyone help shed some lights into this issue?
Thanks,
Mike Lam
My company is writing a test harness in MFC to test out the Cantata telephone switch. we keep on running into issues when we are running the test harness with a lot of threads, ie >=40 threads. Attached is a screen shot of the assertion error that keeps on popping up. It complains about CMutex m_eventQueueCS not being a valid runtime class:
ASSERT(pObject->IsKindOf(RUNTIME_CLASS(CSyncObject)))
I suspect this is because of the invalid memory address that m_eventQueueCS occupies. This is probably due to the limited stack size assigned to the whole process, when the stack size is exceeded, then a thread can simply overwrite the existing stack memory, thereby causing memory problems. I tried to change m_eventQueueCS to use heap memory by doing this: m_eventQueueCS = new CMutex(); but it doesn't help.
Could there be a limit to the number of mutexex that you can have in an application/process?
Can anyone help shed some lights into this issue?
Thanks,
Mike Lam