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. terminate called without an active exception
Qt 6.11 is out! See what's new in the release blog

terminate called without an active exception

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 2.6k Views
  • 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.
  • S Offline
    S Offline
    steven.hou
    wrote on last edited by steven.hou
    #1

    Hi, I am working on eglfs with qt-everywhere-opensource-src-5.9.7. I got a terminate error which can be simulated by a sample. It works fine on linuxfb. Is it a bug on eglfs?
    I find it crash at "if (!surface->surfaceHandle())" of makeCurrent in qtbase/src/gui/kernel/qopenglcontext.cpp.

    Here is the error message:
    pure virtual method called
    terminate called without an active exception
    Aborted

    Here is the sample code:
    #include <QApplication>
    #include <QtWidgets>

    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);

    QWidget *m_lpFirstTmpWindow;
    m_lpFirstTmpWindow = new QWidget();
    m_lpFirstTmpWindow->show();
    m_lpFirstTmpWindow->hide();
    
    QWidget *m_lpSecondTmpWindow;
    m_lpSecondTmpWindow = new QWidget();
    m_lpSecondTmpWindow->show();
    
    delete m_lpFirstTmpWindow;
    m_lpFirstTmpWindow = NULL;
    
    return a.exec();
    

    }

    1 Reply Last reply
    0
    • gde23G Offline
      gde23G Offline
      gde23
      wrote on last edited by
      #2

      You should use deleteLater() instead of delete for QWidgets which will delete them after the eventLoop is done.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        steven.hou
        wrote on last edited by
        #3

        Still error with deleteLater(). Maybe I have to keep the m_lpFirstTmpWindow. But I am confused why it works fine on linuxfb.

        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