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. Unexpected/Uncalled Deferred Delete Event of QObject

Unexpected/Uncalled Deferred Delete Event of QObject

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.1k 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.
  • G Offline
    G Offline
    GenericUsername
    wrote on last edited by
    #1

    Hello everyone,

    we are having trouble with a deferred delete event which gets called on one of our QObjects and we can't get the source/reasoning for this event to be called. The problem seems to be related to rendering OpenGL content.

    Our software is using QtQuick (5.4) for the GUI and C++ for business logic. As we need to display 3D models and interact with them we use OpenGL to draw these models inside our GUI. Our implementation is derived from this example, so we are rendering our OpenGL content to a texture which is then displayed via a QtQuickItem.

    The problem is that sometimes the current instance of our rendering class (which does solely the rendering of the OpenGL content) gets destroyed by an deferred delete event. We currently have no clue where this event is originated, as we have neither a single deleteLater() call in our program nor do we use any destructive calls on that object ourselves. This delete event seems to be triggered somewhere in the Qt framework and seems to be related to the OpenGL rendering as it gets mainly called when switching views or when the GUI has to do heavy rendering (i.e. redrawing a calender control consisting of lots of rectangles multiple times a second when a user tries to switch months extremely fast).

    Callstack (the class SceneRendererScanSection gets "accidently" destroyed - the destructors of its base classes get of coarse also called)
    http://fs2.directupload.net/images/150401/zvkukvj4.png

    The questions I have in this regard are:

    • Are there any known issues with the way of integrating custom OpenGL context in a QtQuick GUI the way linked above in the example which would explain such a behaviour?

    • Is there a way to find out exactly what and why this deferred delete event has been triggered (and how to prevent it)?

    Thanks in advance for any input trying to narrow down the problem.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      What did you do differently from the example ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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