Nuclex.UserInterface crash

Jan 2, 2012 at 4:29 AM
Edited Jan 2, 2012 at 4:36 AM

It seems something in the Nuclex.UserInterface is throwing a NullReferenceException, namely something releated to ProcessKeyRelease.  Here's a picture of the crash:

It happens after a couple seconds of holding down any key and a mouse button at the same time.


Edit: Here's the relevant code.

guiInput = new Nuclex.Input.InputManager(Services, Window.Handle);
gui = new GuiManager(Services);

gui.DrawOrder = 1000;
Screen mainScreen = new Screen(ScreenWidth, ScreenHeight);
gui.Screen = mainScreen;
mainScreen.Desktop.Bounds = new UniRectangle(new UniVector(new UniScalar(0.1f, 0), new UniScalar(0.1f, 0)), new UniVector(new UniScalar(0.1f, 0), new UniScalar(0.1f, 0)));

    private void createDesktopControls(Screen mainScreen){
      // Button through which the user can quit the application
      Nuclex.UserInterface.Controls.Desktop.ButtonControl quitButton = new Nuclex.UserInterface.Controls.Desktop.ButtonControl();
      quitButton.Text = "Quit";
      quitButton.Bounds = new UniRectangle(
        new UniScalar(1.0f, -80.0f), new UniScalar(1.0f, -32.0f), 80, 32
      quitButton.Pressed += delegate(object sender, EventArgs arguments) { Exit(); };


Jan 5, 2012 at 12:54 AM

I am not seeing this behavior on my engine, which is using the Nuclex GUI. Maybe it's specific to something you've implemented? I have code very similar to what you posted though.

Jan 10, 2012 at 9:00 AM


There was a bug in Nuclex.UserInterface that could be reproduced holding down a key and closing a dialog with the mouse or similar. This sounds very much like it.

Could you try this with the current svn trunk builds?

You can find them on my CI server at