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

requesting ShareOpenGLContexts conflicts with OpenGL context > 2.1 on mac

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.0 RC
    • 5.5.0
    • QPA
    • None
    • mac book pro 2014, qt5.5, mac os 10.10.4
    • macOS

    Description

      for certain reason, we need to create shared opengl context,

      so we set QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);

      then we request opengl 4.0 context

      QSurfaceFormat format;
      format.setMajorVersion( 4 );
      format.setMinorVersion( 0 );
      format.setProfile( QSurfaceFormat::CoreProfile );

      but Qt will crash in qt's cocoa plugin:

      0	objc_msgSend	objc_msgSend		0x7fff89e630dd	
      1	QCocoaGLContext::QCocoaGLContext(QSurfaceFormat const&, QPlatformOpenGLContext *, QVariant const&)	QCocoaGLContext::QCocoaGLContext(QSurfaceFormat const&, QPlatformOpenGLContext*, QVariant const&)		0x1041df088	
      2	QCocoaIntegration::createPlatformOpenGLContext(QOpenGLContext *) const	QCocoaIntegration::createPlatformOpenGLContext(QOpenGLContext*) const		0x10419b073	
      3	QOpenGLContext::create()	QOpenGLContext::create()		0x10073b79b	
      4	QWidgetPrivate::shareContext() const	QWidgetPrivate::shareContext() const		0x10007fc5c	
      5	QOpenGLWidgetPrivate::initialize()	QOpenGLWidgetPrivate::initialize()		0x1000a04de	
      6	QOpenGLWidget::resizeEvent(QResizeEvent *)	QOpenGLWidget::resizeEvent(QResizeEvent*)		0x1000a158c	
      7	QWidget::event(QEvent *)	QWidget::event(QEvent*)		0x10007b342	
      8	QApplicationPrivate::notify_helper(QObject *, QEvent *)	QApplicationPrivate::notify_helper(QObject*, QEvent*)		0x10003c6fb	
      9	QApplication::notify(QObject *, QEvent *)	QApplication::notify(QObject*, QEvent*)		0x10003fade	
      10	QCoreApplication::notifyInternal(QObject *, QEvent *)	QCoreApplication::notifyInternal(QObject*, QEvent*)		0x100e8e1b3	
      11	QWidgetPrivate::sendPendingMoveAndResizeEvents(bool, bool)	QWidgetPrivate::sendPendingMoveAndResizeEvents(bool, bool)		0x100073eb7	
      12	QWidgetPrivate::show_helper()	QWidgetPrivate::show_helper()		0x100079bda	
      13	QWidget::setVisible(bool)	QWidget::setVisible(bool)		0x10007a833	
      14	QWidgetPrivate::showChildren(bool)	QWidgetPrivate::showChildren(bool)		0x100079fd0	
      15	QWidgetPrivate::show_helper()	QWidgetPrivate::show_helper()		0x100079bfc	
      16	QWidget::setVisible(bool)	QWidget::setVisible(bool)		0x10007a833	
      17	QWidgetPrivate::showChildren(bool)	QWidgetPrivate::showChildren(bool)		0x100079fd0	
      18	QWidgetPrivate::show_helper()	QWidgetPrivate::show_helper()		0x100079bfc	
      19	QWidget::setVisible(bool)	QWidget::setVisible(bool)		0x10007a833	
      20	main	main.cpp	16	0x100002fcb	
      21	start	start		0x100002f14	
      

      Please see the attachment for a simple repro program

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            billconan shi yan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes