Ticket #3194 (assigned)

Opened 9 years ago

Last modified 5 years ago

Segmentation fault whe showing instrument

Reported by: Andrei Savici Owned by: Roman Tolchenov
Priority: major Milestone: Backlog
Component: MantidPlot Keywords:
Cc: Blocked By:
Blocking: Tester:

Description

I was running Mantid version 1.29.12480 (Friday 10 Jun 2011) on RHEL6 vis ssh. I loaded a file, then clicked show instrument. I get segmentation fault. The output is pasted below. First line (QLayout ...) happens when I start MantidPlot. Loading is correct. The same file works with the latest stable release of Mantid. If I run the same thing from the terminal, I get no image of the detector banks (only axes), the same error messages, but no segmentation fault.

QLayout: Attempting to add QLayout "" to QWidget "", which already has a layout
Load-[Notice] Load started
LoadInstrument-[Warning] Trying fallback /tmp/SEQUOIA_Definition.vtp
Load-[Notice] Load successful, Duration 4.13 seconds
Object::connect: No such slot InstrumentWindowRenderTab::selectBinButtonClicked()
Vertex shader for simpleShaderProg (MainVertexShader & PositionOnlyVertexShader) failed to compile
Fragment shader for simpleShaderProg (MainFragmentShader & ShockingPinkSrcFragmentShader) failed to compile
Errors linking simple shader: "" 
Vertex shader for blitShaderProg (MainWithTexCoordsVertexShader & UntransformedPositionVertexShader) failed to compile
Fragment shader for blitShaderProg (MainFragmentShader & ImageSrcFragmentShader) failed to compile
Errors linking blit shader: "" 
Warning: "" failed to compile! 
Segmentation fault (core dumped)

Change History

comment:1 Changed 9 years ago by Nick Draper

  • Status changed from new to assigned
  • Owner set to Roman Tolchenov

Any ideas Roman?

comment:2 Changed 9 years ago by Roman Tolchenov

(In [12685]) Trying to resolve the disappearing detectors issue. re #3194

comment:3 Changed 9 years ago by Roman Tolchenov

  • Status changed from assigned to accepted

comment:4 Changed 9 years ago by Roman Tolchenov

  • Status changed from accepted to verify
  • Resolution set to fixed

The detectors can be seen

comment:5 Changed 9 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:6 Changed 9 years ago by Martyn Gigg

  • Status changed from verifying to closed

Tested with a variety of instruments and the detectors were present and there were no crashes.

I do get a message printed to the console: "Unrecognised OpenGL version", but this maybe to do with the non-standard drivers on this machine.

comment:7 Changed 9 years ago by Janik Zikovsky

  • Status changed from closed to reopened
  • Resolution fixed deleted

Unfortunately, this error is back.

I can quite reliably reproduce this error on TOPAZ and SEQUOIA at sns, through SSH only. Showing ANY instrument does this:

  • The instrument window shows up and a properly rendered instrument is visible.
  • A few seconds pass
  • Segfault!
Vertex shader for simpleShaderProg (MainVertexShader & PositionOnlyVertexShader) failed to compile
Fragment shader for simpleShaderProg (MainFragmentShader & ShockingPinkSrcFragmentShader) failed to compile
Errors linking simple shader: "" 
Vertex shader for blitShaderProg (MainWithTexCoordsVertexShader & UntransformedPositionVertexShader) failed to compile
Fragment shader for blitShaderProg (MainFragmentShader & ImageSrcFragmentShader) failed to compile
Errors linking blit shader: "" 
Warning: "" failed to compile! 
Segmentation fault (core dumped)

This is critical as most of our analysis machines are RHEL6.

comment:8 Changed 9 years ago by Janik Zikovsky

On Russell's computer (built debug), RHEL6 via SSH:

QGLShader: could not create shader 
Vertex shader for simpleShaderProg (MainVertexShader & PositionOnlyVertexShader) failed to compile
QGLShader: could not create shader 
Fragment shader for simpleShaderProg (MainFragmentShader & ShockingPinkSrcFragmentShader) failed to compile
QGLShaderProgram: could not create shader program 
Errors linking simple shader: "" 
QGLShader: could not create shader 
Vertex shader for blitShaderProg (MainWithTexCoordsVertexShader & UntransformedPositionVertexShader) failed to compile
QGLShader: could not create shader 
Fragment shader for blitShaderProg (MainFragmentShader & ImageSrcFragmentShader) failed to compile
QGLShaderProgram: could not create shader program 
Errors linking blit shader: "" 
QGLShader: could not create shader 

comment:9 Changed 9 years ago by Russell Taylor

  • Milestone changed from Iteration 29 to Iteration 33
  • Tester Martyn Gigg deleted

Moving this ticket up as the problem still exists. Here's what it says now for me (ssh from my rhel6 box to outback2). The text is slightly different to last time:

Vertex shader for simpleShaderProg (MainVertexShader & PositionOnlyVertexShader) failed to compile
Fragment shader for simpleShaderProg (MainFragmentShader & ShockingPinkSrcFragmentShader) failed to compile
Errors linking simple shader: "" 
Vertex shader for blitShaderProg (MainWithTexCoordsVertexShader & UntransformedPositionVertexShader) failed to compile
Fragment shader for blitShaderProg (MainFragmentShader & ImageSrcFragmentShader) failed to compile
Errors linking blit shader: "" 
Warning: "" failed to compile! 
Segmentation fault (core dumped)

comment:10 Changed 9 years ago by Roman Tolchenov

Can it be a video driver problem?

comment:11 Changed 9 years ago by Roman Tolchenov

  • Status changed from reopened to accepted

comment:12 Changed 9 years ago by Roman Tolchenov

Re #3194. Trying to guess what causes the problem.

The suspicion is that it is mixing openGL and QPainter.

Changeset: 984235ed67aaad0c1166bba89f6956453e5ea14f

comment:13 Changed 9 years ago by Russell Taylor

Sorry, the last change didn't help but it was in the right file. Here's a stack trace:

#0  0x00000032964687cd in QGLEngineShaderManager::useCorrectShaderProg() () from /usr/lib64/libQtOpenGL.so.4
#1  0x000000329646ea32 in ?? () from /usr/lib64/libQtOpenGL.so.4
#2  0x0000003296470f65 in ?? () from /usr/lib64/libQtOpenGL.so.4
#3  0x00000032964714b3 in QGL2PaintEngineEx::drawImage(QRectF const&, QImage const&, QRectF const&, QFlags<Qt::ImageConversionFlag>) () from /usr/lib64/libQtOpenGL.so.4
#4  0x000000328dadbb37 in QPaintEngineEx::drawImage(QPointF const&, QImage const&) () from /usr/lib64/libQtGui.so.4
#5  0x000000328daedb3f in QPainter::drawImage(QPointF const&, QImage const&) () from /usr/lib64/libQtGui.so.4
#6  0x000000000080c555 in QPainter::drawImage (this=0x7fffffffc630, x=0, y=0, image=..., sx=0, sy=0, sw=-1, sh=-1, flags=...) at /usr/include/QtGui/qpainter.h:894
#7  0x0000000000a2464d in ProjectionSurface::draw (this=0x3dce000, widget=0x3b06f50, picking=false)
    at /home/tr9/Mantid/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/ProjectionSurface.cpp:149
#8  0x0000000000a24153 in ProjectionSurface::draw (this=0x3dce000, widget=0x3b06f50)
    at /home/tr9/Mantid/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/ProjectionSurface.cpp:89
#9  0x0000000000a14b5a in MantidGLWidget::paintEvent (this=0x3b06f50, event=0x7fffffffd0d0)
    at /home/tr9/Mantid/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/MantidGLWidget.cpp:157
#10 0x000000328d9f565a in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#11 0x0000003296428271 in QGLWidget::event(QEvent*) () from /usr/lib64/libQtOpenGL.so.4
#12 0x000000328d9aaa0c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#13 0x000000328d9b09db in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#14 0x0000000000974a1f in MantidApplication::notify (this=0x7fffffffdf40, receiver=0x3b06f50, event=0x7fffffffd0d0)
    at /home/tr9/Mantid/Code/Mantid/MantidPlot/src/Mantid/MantidApplication.cpp:24
#15 0x000000327e9579fc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#16 0x000000328d9fd22c in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4
#17 0x000000328db9e90c in QWidgetPrivate::repaint_sys(QRegion const&) () from /usr/lib64/libQtGui.so.4
#18 0x000000328da161aa in ?? () from /usr/lib64/libQtGui.so.4
#19 0x000000328da21287 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/libQtGui.so.4

comment:14 Changed 9 years ago by Russell Taylor

  • Priority changed from blocker to major
  • Component changed from Mantid to MantidPlot

Doing a search on some of the text that comes before the crash (comment 8) turns up quite a lot. For example: http://developer.qt.nokia.com/forums/viewthread/12146

Seems like it might be a Qt bug, in which case the options may well be:

(a) Hope that they fix it, or
(b) Stop using QGLWidget

comment:15 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.1 to Release 2.2

Moved at end of release 2.1

comment:16 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.2 to Release 2.3

Moved at the end of release 2.2

comment:17 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.3 to Release 2.4

moved to Release 2.4

comment:18 Changed 8 years ago by Russell Taylor

I wonder if the answer to this is the new option to not use OpenGL (see #5625)? However, I can't test this as you can't get to the option to switch it off from outside the instrument window - by which time it's too late!

comment:19 Changed 8 years ago by Russell Taylor

Setting MantidOptions.InstrumentView.UseOpenGL=Off does turn out to be a way to avoid this crash when starting the instrument window, though you can still cause a crash by trying to switch to the 3D view. Still, this is better than nothing.

comment:20 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.4 to Release 2.5

Moved at the code freeze for release 2.4

comment:21 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 2.5 to Release 2.6

Moved to r2.6 at the end of r2.5

comment:22 Changed 7 years ago by Nick Draper

  • Status changed from accepted to assigned

comment:23 Changed 7 years ago by Nick Draper

  • Status changed from assigned to new

comment:24 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 2.6 to Backlog

Moved to backlog at the code freeze for R2.6

comment:25 Changed 7 years ago by Nick Draper

  • Status changed from new to assigned

Bulk move to assigned at the introduction of the triage step

comment:26 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 4041

Note: See TracTickets for help on using tickets.