Advanced Question : Crash after hours of running my multithreaded application



  • I have this very very annoying and hard to trace crash that happens after 20 hours of running my application. I have this multithreaded application that that controls some mechanical linear stages and image acquisition. Now for some reason, after around 20 hours of running my application it crashes. In my app logs I can see a "QMutexPrivate::QMutexPrivate: Cannot create event" error, and a windows application error pops up saying "The instruction at 0x****** referenced memory at 0x*******. The memory could not be written".

    It's a very hard crash to trace given that it takes long time to replicate. Is there a system specific memory even that happens after long hours that can cause an app to crash ? This crash is driving me crazy !


  • Moderators

    hard to tell ... show the stack trace please.
    Maybe you have a memory leak and fill up the memory?



  • Will post it next time it crashes. It's really puzzling, the software perfectly for hours and hours, and suddenly after almost 20 hours it simply crashes. The only thing unusual I notices was that the memory page faults as reported by "process explorer" is large.


  • Moderators

    then look out as i said for memory leaks.
    There are several tools for the major platforms out there to identify memory leaks.



  • No, definitely no. That's the first thing I monitored closely, I am acquiring larget set of images from the camera at 15fps, you will be able to notice any memory leak easily. Close to the crashing time, the memory usuage is almost the same as when the software started.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.