bmerrison's picture

Hang on initialization in Windows with libX11.dll

Project:The Open Toolkit library
Version:1.0-2010-10-06
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:open
Description

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!