0

I'm having a RealTime application which displays on my Qt User Interface a value every second, without any problem. After around 4 minutes of displays, The project crashes and My project is heading to the following section in the file mlock.c

void __cdecl _unlock (
    int locknum
    )
{
    /*
     * leave the critical section.
     */

    LeaveCriticalSection( _locktable[locknum].lock );
}

Any idea what would be the problem and how to solve it?

Shall I call it a memory limit? In that case, there is no way to make it work for more than 4 minutes?

I shall find the provenance of the problem: it's written:

Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

Edit: If my main.cpp is as below:

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
ex4 w;
w.show();
return a.exec();
}

and all of my vectors are declared in ex4.cpp file. Do we consider that my vectors are global?

4

1 回答 1

0

能多发点代码吗?如果您使用线程,则可能是多线程问题,或者内存不足。

于 2013-06-24T07:20:04.357 回答