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

QGStreamerVideoWidget may cause stack overflow on destruction

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P1: Critical
    • Resolution: Unresolved
    • Affects Version/s: 5.12.8
    • Fix Version/s: None
    • Component/s: Multimedia
    • Labels:
      None
    • Environment:
      Linux Ubuntu 20.04 LTS.
    • Platform/s:
      Linux/X11

      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

            Assignee:
            valentyn.doroshchuk Valentyn Doroshchuk
            Reporter:
            ara Arnoud Rattink
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes