Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-87325

QGStreamerVideoWidget may cause stack overflow on destruction

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 5.12.8
    • Multimedia
    • Linux Ubuntu 20.04 LTS.

    Description

      QGStreamerVideoWidget catches the WinIdChange event, but ~QWidget() will also send this (setting the WinId to 0). The event handler then calls QWidget::winId() which calls QWidget::createWinId() which calls winId() and so, in my case 68342 times until we run out of stack and the program terminates.

      This does NOT happen when app.quit() is called. But it happens if I close the X window using 'close' or press the 'x' button. 

      It may be a QWidget problem as well. Should winId() call createWinId() if we are calling from ~QWidget()?  "if (data->winid == 0 && d->data->in_destructor) return 0; " 

      Or QGstreamerVideoWidget should ignore this event when QApplicationPrivate::is_app_closing is true.

      Attachments

        1. main.cpp
          0.7 kB
        2. Makefile
          0.5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            timblechmann tim blechmann
            ara Arnoud Rattink
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes