View Full Version : Why would QGL2PaintEngineEx crash on ensureActive

7th May 2014, 23:02
This is somewhat of a vague question but I am curious why in a core dump, I would see a crash after QGL2PaintEngineEx::createState and on the call to QGL2PaintEngineEx ensureActive function. We have a QGraphicsScene/View that is rendered using a QGLWidget and we override the drawbackground and render using opengl between a beginNative/endNative call with QPainter. We have QGraphicsItems being added to the scene on top of the scene (Not all of them QGraphicsItems but some are regular widgets e.g. QLabel added to the scene as a QGraphicsProxyWidget). I am not certain as to how this scenario can happen and would appreciate any insight into why this might happen. My initial thought was somehow we were calling a paintEvent when we shouldn't (say in a different thread) but luckily that was proven wrong. My next thought is that somehow the QGraphicsItems are trying to be drawn to the scene when a rendering update happens in the QGraphicsView??? I am hoping for some push in the correct direction.

Thanks for any ideas!!