Initially my application was not multithreaded, using parallel studio we found the hotspots and threaded few modules. After parllelizing the O/P is fine but when we profile again we find the parallel studio lists the hotspots and immediately crashes throwing the following error
Find the attached file for the dump.
This happens in few configurations only. The part of module that was threaded was low level functions which is invoked nearly 10,000 times (depending upon the configuration).
Every time the function is called, Threads are invoked using QueueUserWorkItem() that are finally suspended on a events using WaitForMultipleObjects() .
We get the correct O/P and expected performance too but profiling leads to a crash.
Can any one give some suggestions for the issue.