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

terminate called without an active exception

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 1.9k 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 7 May 2021, 06:30 last edited by steven.hou 5 Jul 2021, 06:38
    #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
    • G Offline
      G Offline
      gde23
      wrote on 7 May 2021, 08:16 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 8 May 2021, 08:16 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

        3/3

        8 May 2021, 08:16

        • Login

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