bmerrison's picture

Hang on initialization in Windows with libX11.dll

Project:The Open Toolkit library
Category:bug report

I'm a new OpenTK user and tried to get the Game.cs file from the Samples folder working. I am on Windows 7 64-bit, using Visual Studio 2010. The problem I had was that the program would just hang as soon as I started it: no window was created (except the console one).

I eventually tracked the problem through a bunch of static initialization and found that the hang was happened when the OpenTK.Platform.X11.API() static constructor called the XInitThreads function from libX11.dll. Although I don't generally run X in Windows, I found that I did in fact have a libX11.dll on my system, as part of an application that I have in my PATH (when I want to run this application I run Xming). Removing this application from my PATH fixed the problem, but this isn't ideal as I have it there for a reason!

I realise that this is a very obscure problem and probably won't affect many people, but my (uneducated) guess is that it's probably a reasonably simple fix? Not that I'm qualified to suggest what should be changed!


Comment viewing options

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


Version:1.0-2010-10-06» 1.1.0-2013-12-15
Status:open» closed

This issue should be fixed in OpenTK 1.1 beta3. X11 is only initialized if running on Linux or if explicitly requested via Toolkit.Init(ToolkitOptions).

Please file a bug report at if you can still reproduce this.