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. Crash when copying QOpenGLFunctions Core objects

Crash when copying QOpenGLFunctions Core objects

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 573 Views 1 Watching
  • 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.
  • N Offline
    N Offline
    Niels Dekker
    wrote on last edited by Niels Dekker
    #1

    A colleague of mine here at LKEB (LUMC) encountered an access violation when destructing objects of a class, derived from an QOpenGLFunctions Core class, in Qt 5.5.1. Now it appears that even the following simple code crashes, as I tested in Qt 5.11.1:

    #include <QOpenGLFunctions_4_5_Core>
    
    void CopyCoreObjects()
    {
    	{
    		QOpenGLFunctions_4_5_Core coreObject1;
    		{
    			QOpenGLFunctions_4_5_Core coreObject2 = coreObject1;
    
    		}  // OK, calls ~QOpenGLFunctions_4_5_Core().
    
    	} // Crash!
    }
    

    Is this a known issue? We would suggest preventing accidental copying QOpenGLFunctions Core objects by marking the copy-constructor and the assignment-operator with C++11 "= delete".

    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      I would say you're right. Please create a bug report so it can be fixed.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • N Offline
        N Offline
        Niels Dekker
        wrote on last edited by
        #3

        @Christian-Ehrlicher said in Crash when copying QOpenGLFunctions Core objects:

        I would say you're right. Please create a bug report so it can be fixed.

        Thanks Christian! I just submitted the bug report: https://bugreports.qt.io/browse/QTBUG-71422

        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