VirtualBox

Ticket #9198 (new defect)

Opened 3 years ago

Last modified 5 months ago

Standard QT QPainter class doesn't work with GL in linux guests!

Reported by: d.jurin Owned by:
Priority: critical Component: 3D support
Version: VirtualBox 4.0.10 Keywords: QPainterGLIssue
Cc: Guest type: Linux
Host type: other

Description (last modified by michael) (diff)

Standard QT QPainter class doesn't work with GL!

For example this code leads to crash: void GLWidget::paintEvent(QPaintEvent *event){

QPainter painter(this);

}

Error Message: Vertex shader for simpleShaderProg (MainVertexShader & PositionOnlyVertexShader) failed to compile Fragment shader for simpleShaderProg (MainFragmentShader & ShockingPinkSrcFragmentShader) failed to compile QGLShaderProgram: shader programs are not supported Segmentation fault

You can meet this problem also with the standard QT openGL Examples:

/usr/lib64/qt4/examples/opengl/2dpainting ( http://doc.qt.nokia.com/latest/opengl-2dpainting.html) /usr/lib64/qt4/examples/opengl/overpainting ( http://doc.qt.nokia.com/latest/opengl-overpainting.html)

and some others that use QPainter class with GL context.

So I am using openSuse x64 guests with latest VB 4.0.10 and latest GA under Windows 7 x86 host. I have tested this problem on openSuse 11.3, 11.4, 12.1ms2 guests with different QT versions 4.6, 4.7, 4.8, but without success, the same problem everywhere. But on openSuse x86 11.1 guest with QT 4.3 it partially works! Please note, that the problem does not occur at all on linux hosts, so under any non virtualized openSuse with any QT version QPainter class is working fine with GL.

I am developing QT GL visualization program and I need put some text over my 3d, but I am not able to do it since this issue!

Thanks in advance!

Change History

comment:1 Changed 2 years ago by skyfish

I can confirm this bug is still present in VirtualBox 4.1.8 running on Macbook Pro (OS X 10.7.3) with an Intel HD Graphics 3000. The Guest is an Ubuntu 11.10 with Guest Additions 3d graphics enabled:

$ sudo lsmod |grep -i vid
vboxvideo              12575  2 
drm                   236290  3 vboxvideo
$ uname -a
Linux lyra 3.0.0-15-generic #26-Ubuntu SMP Fri Jan 20 17:23:00 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

The following python code is sufficient to trigger the bug (Qt version 4.7.3, PyQt4 version 4.8.5):

$ python
Python 2.7.2+ (default, Oct  4 2011, 20:06:09) 
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt4 import QtGui, QtOpenGL
>>> import sys
>>> app = QtGui.QApplication(sys.argv)
>>> gv = QtGui.QGraphicsView(QtGui.QGraphicsScene())
>>> gv.setViewport(QtOpenGL.QGLWidget())
>>> gv.show()
>>> Vertex shader for simpleShaderProg (MainVertexShader & PositionOnlyVertexShader) failed to compile
Fragment shader for simpleShaderProg (MainFragmentShader & ShockingPinkSrcFragmentShader) failed to compile
QGLShaderProgram: shader programs are not supported 
Segmentation fault
$ 

This makes VirtualBox unusable for our application, as OpenGL support is a requirement in the Linux build.

comment:2 Changed 5 months ago by michael

  • Description modified (diff)

So far unable to reproduce the crash, but I see the following in the output after the "setViewport" with "LIBGL_DEBUG=1" set:

libGL error: core dri or dri2 extension not found
libGL error: failed to load driver: vboxvideo
libGL error: failed to load driver: vboxvideo

So it would bear investigating where that comes from.

Last edited 5 months ago by michael (previous) (diff)
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use