Errors and access violation (caused by old OpenGL version?)
I have an app that does 3D volume rendering with ActiViz.NET (a .NET wrapper for VTK). In certain conditions it gives errors and crashes with an access violation. I think the issue is triggered by an old version of OpenGL which leads to "wglChoosePixelFormatARB" (the function pointer itself) being null here: https://github.com/Kitware/VTK/blob/master/Rendering/OpenGL2/vtkWin32OpenGLRenderWindow.cxx#L582
I think VTK should handle this better instead of having an access violation. Maybe there is some workaround or maybe just test for a minimum supported version of OpenGL.
Background and details:
This only happens when using a specific Windows 7 machine and running via Remote Desktop. Using "glview" (http://realtech-vr.com/admin/glview), I figured out this machine supports OpenGL v4.6 with ARB extensions, but over Remote Desktop that changes to OpenGL 1.1 without ARB extensions. This behavior seems to be expected. See: https://www.opengl.org/discussion_boards/showthread.php/198132-OpenGL-and-Microsoft-Remote-Desktop
The first time the display frame for the 3D volume tries to render, a window titled "vtkOutputWindow" pops up and shows three errors. There is no exception, so I can't get a breakpoint where it is happening. If I freeze threads, it seems like this is happening inside vtkRenderWindow's render method, which I think is automatically called by VTK's RenderWindowControl.Render method.
When it does eventually render a loaded image, there is an access violation exception that seems to be referencing a zero-valued pointer.