Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object reference not set to an instance of an object. #3107

Closed
Nuklon opened this issue Nov 20, 2017 · 4 comments
Closed

Object reference not set to an instance of an object. #3107

Nuklon opened this issue Nov 20, 2017 · 4 comments
Assignees
Labels
Milestone

Comments

@Nuklon
Copy link
Contributor

Nuklon commented Nov 20, 2017

On Windows 10 latest build (not the preview), latest MahApps NuGet release. If I'm closing my application, this is sometimes thrown. The stacktrace is this:

   at MahApps.Metro.Behaviours.WindowsSettingBehaviour.CleanUp() in C:\projects\mahapps-metro\src\MahApps.Metro\MahApps.Metro.Shared\Behaviours\WindowsSettingBehaviour.cs:line 59
   at MahApps.Metro.Behaviours.WindowsSettingBehaviour.AssociatedObject_Closed(Object sender, EventArgs e) in C:\projects\mahapps-metro\src\MahApps.Metro\MahApps.Metro.Shared\Behaviours\WindowsSettingBehaviour.cs:line 30
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Window.OnClosed(EventArgs e)
   at System.Windows.Window.WmDestroy()
   at System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
@punker76
Copy link
Member

@Nuklon The latest stable or pre-release of MahApps? Can you post the version?

@Nuklon
Copy link
Contributor Author

Nuklon commented Nov 20, 2017

Sorry, missed it, 1.6.0.184. Seems to happen mostly when you click on the close button, with Alt+F4 it's rarer.

@punker76
Copy link
Member

@Nuklon Do you have other closed or closing events? Or maybe some overrides for OnClosing or OnClosed? Seems like the closed event in the behavior is called twice or with a delay.

@Nuklon
Copy link
Contributor Author

Nuklon commented Nov 21, 2017

No, nothing, there's Caliburn's OnDeactivate in the main view model, but that's it (which only gets called once, I checked).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants