Nuclex.UserInterface crash

Jan 2, 2012 at 5:29 AM
Edited Jan 2, 2012 at 5: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: http://www4.picturepush.com/photo/a/7264077/img/Picture-Box/crash.png

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);
Components.Add(guiInput);
Components.Add(gui);

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)));
createDesktopControls(gui.Screen);

    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(); };
      mainScreen.Desktop.Children.Add(quitButton);

    }

Jan 5, 2012 at 1: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.

Coordinator
Jan 10, 2012 at 10:00 AM

Hi!

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 https://devel.nuclex.org/jenkins/job/Nuclex%20Foundation%20%28~Release%29/