Skip to content

System.NullReferenceException: Object reference not set to an instance of an object. #481

Description

@Vaizarr

Describe the bug
FancyVM crashes with the following error:

System.NullReferenceException: Object reference not set to an instance of an object.
   at FancyWM.TilingService.CanPullUp()
   at FancyWM.MainWindow.GetAvailableActions()+MoveNext()
   at FancyWM.MainWindow.GetContextHintsExtraContent()
   at FancyWM.MainWindow.ShowWaitingForActionToast(Boolean showContextHints, CancellationToken cancellationToken)
   at FancyWM.MainWindow.<>c__DisplayClass67_1.<<OnCmdSequenceBegin>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at FancyWM.Utilities.Dispatchers.<>c__DisplayClass4_0.<RethrowOnDispatcher>b__0()
   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)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   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)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at FancyWM.Startup.AppMain(String[] args)
   at FancyWM.Startup.Main(String[] args)
   at FancyWM.GUI.Program.Main(String[] args)

To Reproduce
Steps to reproduce the behavior:

  1. Open a window, for example Windows Explorer.
  2. Press the hotkey to wrap the window in a vertical panel.
  3. Using the mouse, assign it to a horizontal panel so the window occupies 25% of the available space, with three empty spaces.
  4. Press the float hotkey to remove the window from that position.
  5. Press the float hotkey again.
  6. FancyWM crashes with the reported error.

Expected behavior
I expected the window to return to its previous configuration when pressing the float hotkey again. (Or perhaps back to tiling if the panel config is discarded without content).

Desktop (please complete the following information):

  • OS: Microsoft Windows NT 10.0.26100.0
  • FancyWM Version: 2.19.0.0

Additional context
The issue is reproducible and has been verified with multiple different applications.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions