Assert() dialog now being displayed



  • Hi,

    since I switched to visual studio 2012, I have a very annoying problem.

    Basically, when an assert is being triggered, the message box dialog doesn't get displayed. As the dialog isn't visible, I can't press "ignore" or "break" button, and therefore the application is stuck.

    I am using the standard VC++ "assert()" macro, which relies on "_wassert()" (same happens when using Q_ASSERT).

    Has anybody encountered the same issue ? (I am using Qt 5 RC1, but the same issue happens with 4.8.4).

    Thanks!



  • I should add that directly calling "__crtMessageBox" also produces the same results...



  • I have further investigated on this, and found out that this happens only for the message boxes shown after I have started my 3D window repaint timer:

    @ myTimer.setInterval(0);
    connect(&myTimer, SIGNAL(timeout()), this, SLOT(OnTimer()));
    myTimer.start();@

    If I don't start the time, then the problem doesn't occur...

    Digging further, it seems that __crtMessageBox() internally trigger the following messages handling function to be called:
    @LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp)@

    One of ther message in the queue is "WM_QT_SENDPOSTEDEVENTS", so "q->sendPostedEvents();" gets called, leading to "bool QEventDispatcherWin32::event(QEvent *e)" being called.

    In this method the "zero-timer" constantly posts an event in this function method:
    @QCoreApplication::postEvent(this, new QZeroTimerEvent(zte->timerId()));@

    This makes it enter in a kind of infinite event-processing loop (as "DefWindowProc(hwnd, message, wp, lp);" gets never called)... No idea how I can solve this...

    Below the callstack (Qt5 rc):
    !http://g.jaegy.free.fr/_divers/qt.jpg()!


  • Moderators

    Did you "file a bug report":https://bugreports.qt-project.org/ ?



  • Not yet, was first looking for an easy solution/workaround :)

    I will fill a report, however, I reported an issue some time ago and suggested a fix for it (https://bugreports.qt-project.org/browse/QTSOLBUG-157), however it has never been processed, so...



  • OK I filled a bug report with a simple reproducible case, let's see if it will be processed, fingers crossed :)

    https://bugreports.qt-project.org/browse/QTBUG-28513


Log in to reply
 

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