QMutex on Qt 5.7.0
I try to recompile an application developed on Qt 5.5.0 on new Qt 5.7.0, the first problem that compiler has shown is that QMutex include miss (but Qt 5.5.0 doesn't give me this problem).
After i have added QMutex include and all compile, but when application is closed, it seems that qmutex is not destroyed and i receive an exception .
Are there different Handling on QMutex on Qt 5.5.0 and Qt 5.7.0 ?
Its hard to imagine huge changes as its same uses cases still.
What exception is shown?
After the exception is thrown interrupt the debugger (if not done automatically) and post the stack trace here. As far as I know there are no changes in the mutex implementation between the mentioned Qt versions.
I have observed that in QT 5.5.0 i have the print "QMutex: destroying locked mutex" when i close application in QT 5.7.0 i have exception instead and no print
i suspect the some problem, but my question is why the same project in QT5.5.0 closes itself graceful?
why the same project in QT5.5.0 closes itself graceful
It doesn't close gracefully, you get a fat warning from Qt. Why it works no one can tell you. Closing the application while a mutex is locked falls into the "undefined behavior" section, thus it may work (as with Qt 5.5) or it may not (as with Qt 5.7).
why the same project in QT5.5.0 closes itself graceful?
It was not graceful. You must make sure that your program unlocks all mutexes before quitting.
Destroying a locked mutex leads to undefined behaviour. So, your program didn't crash in Qt 5.5.0 only because you were "lucky".
See the code and documentation at https://code.woboq.org/qt5/qtbase/src/corelib/thread/qmutex.cpp.html#188 -- The warning about undefined behaviour is supposed to be documented at http://doc.qt.io/qt-5/qmutex.html but it seems to be missing.