Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Assert() dialog now being displayed
Forum Updated to NodeBB v4.3 + New Features

Assert() dialog now being displayed

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 2.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gjaegy
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gjaegy
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gjaegy
        wrote on last edited by
        #3

        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()!

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • G Offline
            G Offline
            gjaegy
            wrote on last edited by
            #5

            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...

            1 Reply Last reply
            0
            • G Offline
              G Offline
              gjaegy
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved