MantisBT - VTK
View Issue Details
0007710VTK(No Category)public2008-09-19 14:592016-08-12 09:55
Sean McBride 
Kitware Robot 
normalcrashalways
closedmoved 
Mac OS XMac OS X10.5
 
 
0007710: VTK crashes when no OpenGL context can be created; should fail gracefully.
In vtkCocoaRenderWindow::CreateGLContext() the attribute NSOpenGLPFAAccelerated is used when creating the pixel format. However, when this code is used on a headless Mac (one with no monitor connected, like a server), the pixel format will be nil, which will in turn creates a nil OpenGL context. Indeed, on a headless Mac the hardware renderer isn't available.

We're not looking for VTK to work in this situation, we'd just like that it does not crash.

The problem seems that the code assumes the context will never be nil. If the context is nil, VTK will crash later on. With no context, it is not valid to call OpenGL APIs like glGetString(), yet VTK does exactly this.

#0 0x91752150 in strlen
#1 0x9178dde5 in sscanf
#2 0x00dac160 in vtkOpenGLExtensionManager::ReadOpenGLExtensions at vtkOpenGLExtensionManager.cxx:479
#3 0x00dad463 in vtkOpenGLExtensionManager::Update at vtkOpenGLExtensionManager.cxx:140
#4 0x00dad13d in vtkOpenGLExtensionManager::ExtensionSupported at vtkOpenGLExtensionManager.cxx:147
#5 0x00dc6bc0 in vtkOpenGLRenderWindow::OpenGLInit at vtkOpenGLRenderWindow.cxx:230
#6 0x00df1ba5 in vtkCocoaRenderWindow::CreateAWindow at vtkCocoaRenderWindow.mm:577
#7 0x00df005c in vtkCocoaRenderWindow::Initialize at vtkCocoaRenderWindow.mm:645
#8 0x00dee51c in vtkCocoaRenderWindow::Start at vtkCocoaRenderWindow.mm:168
0000009 0x00ded91c in vtkCocoaRenderWindowInteractor::Initialize at vtkCocoaRenderWindowInteractor.mm:331


1) Boot a Mac without a monitor connected to it.
2) Connect to that mac with screen sharing or other remote access.
3) Run any program that uses VTK.
4) Crash.
No tags attached.
Issue History
2008-09-19 14:59Sean McBrideNew Issue
2008-09-19 14:59Sean McBrideStatusbacklog => tabled
2008-09-19 14:59Sean McBrideAssigned To => François Bertel
2010-09-07 13:46François BertelAssigned ToFrançois Bertel =>
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2016-08-12 09:55Kitware RobotNote Added: 0037017
2016-08-12 09:55Kitware RobotStatusexpired => closed
2016-08-12 09:55Kitware RobotResolutionopen => moved
2016-08-12 09:55Kitware RobotAssigned To => Kitware Robot

Notes
(0037017)
Kitware Robot   
2016-08-12 09:55   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.