Sepidar's picture

Strange NullReferenceException


I am writing a program, running on many different machines. The program uses a control that is derived from GLControl. In a few of machines which program runs on them, OpenTK raises a NullReferenceException. I believe this exception is machine dependent, because the code works fine on the machines exact same condition.

The buggy code is located in the constructor of the form. I read a thread here and tried to solve the problem with:

            dummyGraphics = OpenTK.Graphics.GraphicsContext.CreateDummyContext();

but now CreateDummyContext raises the exception. My version of OpenTK is

How should I solve this problem?

Thank you in advance for your help


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
AndyKorth's picture

Which platforms does it work on, and which platforms have trouble?

I believe none of the GLControl examples ever worked on my Mac.