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

FancyZonesEditor crashes when trying to apply layout #1462

Closed
bjarte opened this issue Mar 5, 2020 · 20 comments
Closed

FancyZonesEditor crashes when trying to apply layout #1462

bjarte opened this issue Mar 5, 2020 · 20 comments
Labels
Area-Quality Stability, Performance, Etc. FancyZones-Editor Issue revolving the FancyZone Editor Issue-Bug Something isn't working Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-FancyZones Refers to the FancyZones PowerToy Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. Severity-High Bugs that we consider a blocking issue for release (crashes stuff outside of PT)

Comments

@bjarte
Copy link

bjarte commented Mar 5, 2020

Environment

Windows build number: 10.0.18363.693
PowerToys version: 0.15.1
PowerToy module for which you are reporting the bug (if applicable): FancyZones

Steps to reproduce

  1. Open PowerToys
  2. Select FancyZones
  3. Click on Edit zones
  4. Select a layout
  5. Click on Apply

Expected behavior

I expect the selected layout to be used.

Actual behavior

The editor crashes. See screenshot for error message.

Screenshots

image

@bjarte
Copy link
Author

bjarte commented Mar 5, 2020

This issue might be the same as #1451

I tried the solution suggested there, to do a full cleanup of PowerToys' settings. That did not help.

@bjarte bjarte changed the title FancyZones not working at all in 0.15.1 FancyZonesEditor crashes when trying to apply layout Mar 5, 2020
@enricogior
Copy link
Contributor

enricogior commented Mar 5, 2020

Hi @bjarte
thank you for reporting the issue. Given the repro steps this seems a different problem compared to #1451
Can you check the Event Viewer (under Windows Logs -> Application) to see if there is a call stack for this crash?

@bjarte
Copy link
Author

bjarte commented Mar 5, 2020

Hi @bjarte
thank you for reporting the issue. Given the repro steps this seems a different problem compared to #1451
Can you check the Event Viewer (under Windows Logs -> Application) to see if there is a call stack for this crash?

Everything mentioned in #1451 is true for me as well, FancyZones doesn't work at all. I'll check Event Viewer.

@bjarte
Copy link
Author

bjarte commented Mar 5, 2020

Event Viewer:

Application: FancyZonesEditor.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.IOException
   at System.IO.__Error.WinIOError(Int32, System.String)
   at System.IO.FileStream.Init(System.String, System.IO.FileMode, System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32, System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String, Boolean, Boolean, Boolean)
   at System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare)
   at FancyZonesEditor.Models.LayoutModel.Apply(System.Windows.Int32Rect[])
   at FancyZonesEditor.MainWindow.Apply_Click(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
   at System.Windows.UIElement.OnMouseUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
   at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Application.RunDispatcher(System.Object)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at FancyZonesEditor.App.Main()

@enricogior
Copy link
Contributor

@bjarte
the crash happens when the editor is trying to write to the temp dir.
Can you please open the Command Prompt and run:

echo %TMP%

It should show the current location of the TMP dir.

@bjarte
Copy link
Author

bjarte commented Mar 6, 2020

C:\Users\bjarte.aune.olsen>echo %TMP%
C:\Users\BJARTE~1.OLS\AppData\Local\Temp

@crutkas crutkas added Area-Quality Stability, Performance, Etc. FancyZones-Editor Issue revolving the FancyZone Editor Issue-Bug Something isn't working Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-FancyZones Refers to the FancyZones PowerToy Severity-High Bugs that we consider a blocking issue for release (crashes stuff outside of PT) labels Mar 6, 2020
@enricogior
Copy link
Contributor

Hi @bjarte
thanks for posting the result, there's nothing wrong there, so next step would be to try a private build.

I've attached the private build that has a possible fix and if the fix doesn't work it should show a detail error description. Be aware that this is not a signed build, it's OK if you prefer not to install it.
If you want to install it, you have to uninstall 0.15.1 first (the private build has the same version number).
Thank you.

PowerToysSetup-0.15.1-x64-notsigned.zip

@bjarte
Copy link
Author

bjarte commented Mar 6, 2020

Thanks for following up. I uninstalled PowerToys and installed it using the unsigned installer.

Unfortunately, the program still crashes when applying a layout.

I can see some extra debug information in Event Viewer. Which do you need?

Fault bucket 2142448759413749593, type 5
Event Name: CLR20r3
Response: Not available
Cab Id: 0

Problem signature:
P1: FancyZonesEditor.exe
P2: 0.15.1.0
P3: 5e621a04
P4: mscorlib
P5: 4.8.4150.0
P6: 5e176ed9
P7: 1693
P8: 1d8
P9: System.IO.IOException
P10:

Attached files:
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER5BA9.tmp.mdmp
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER5CD3.tmp.WERInternalMetadata.xml
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER5CF3.tmp.xml
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER5CF1.tmp.csv
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER5D12.tmp.txt

These files may be available here:
\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_FancyZonesEditor_b6279629d7fe1ff5522692512b5608271c56eea_f0901b84_424856f7-cc22-4c66-9459-0304ad627c1a

Analysis symbol:
Rechecking for solution: 0
Report Id: feaf3346-9adb-4750-92f3-41fdac246c3b
Report Status: 268435456
Hashed bucket: 7b8b317178523ab40dbb81cba6553759
Cab Guid: 0

@enricogior
Copy link
Contributor

Unfortunately, the program still crashes when applying a layout.

Let me double check if I built it correctly, since it should catch the exception and not crash.

@enricogior
Copy link
Contributor

I've checked and the version I've sent you is the correct one.

Can you zip and upload this file?
C:\ProgramData\Microsoft\Windows\WER\Temp\WER5BA9.tmp.mdmp

Also, is there another Event like the first one you sent yesterday?

@bjarte
Copy link
Author

bjarte commented Mar 6, 2020

I get these messages in Event Viewer:

image

Content of Error 1:

Application:` FancyZonesEditor.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.IOException
   at System.IO.__Error.WinIOError(Int32, System.String)
   at System.IO.FileStream.Init(System.String, System.IO.FileMode, System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32, System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String, Boolean, Boolean, Boolean)
   at System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare)
   at FancyZonesEditor.Models.LayoutModel.SerializeDeletedCustomZoneSets()
   at FancyZonesEditor.MainWindow.OnClosing(System.Object, System.EventArgs)
   at System.ComponentModel.CancelEventHandler.Invoke(System.Object, System.ComponentModel.CancelEventArgs)
   at System.Windows.Window.OnClosing(System.ComponentModel.CancelEventArgs)
   at MahApps.Metro.Controls.MetroWindow+<OnClosing>d__266.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Application.RunDispatcher(System.Object)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at FancyZonesEditor.App.Main()

Content of error 2:

Faulting application name: FancyZonesEditor.exe, version: 0.15.1.0, time stamp: 0x5e621a04
Faulting module name: KERNELBASE.dll, version: 10.0.18362.693, time stamp: 0xf1894a25
Exception code: 0xe0434352
Fault offset: 0x000000000003a859
Faulting process id: 0x29f8
Faulting application start time: 0x01d5f3ae24a87ca0
Faulting application path: C:\Program Files\PowerToys\modules\FancyZonesEditor.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: 9215c3c2-b951-418a-8930-c8e58f15b44d
Faulting package full name: 
Faulting package-relative application ID: 

Content of warning:

Fault bucket 2142448759413749593, type 5
Event Name: CLR20r3
Response: Not available
Cab Id: 0

Problem signature:
P1: FancyZonesEditor.exe
P2: 0.15.1.0
P3: 5e621a04
P4: mscorlib
P5: 4.8.4150.0
P6: 5e176ed9
P7: 1693
P8: 1d8
P9: System.IO.IOException
P10: 

Attached files:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER8AF.tmp.mdmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERB01.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERB22.tmp.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERB20.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERB6F.tmp.txt

These files may be available here:
\\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_FancyZonesEditor_b6279629d7fe1ff5522692512b5608271c56eea_f0901b84_e7e1df11-d6e9-43ab-bd57-6e8db13bfda1

Analysis symbol: 
Rechecking for solution: 0
Report Id: 9215c3c2-b951-418a-8930-c8e58f15b44d
Report Status: 268435456
Hashed bucket: 7b8b317178523ab40dbb81cba6553759
Cab Guid: 0

@bjarte
Copy link
Author

bjarte commented Mar 6, 2020

None of the files linked to from the warning actually exist, I'm afraid, so I cannot send you the mdmp file. C:\ProgramData\Microsoft\Windows\WER\Temp is empty.

The only link that works, is the last one "These files may be available here:".

This link leads to this file:
Report.zip

@enricogior
Copy link
Contributor

I get these messages in Event Viewer:

Thanks, that should be enough for the next iteration of fixes.

@enricogior
Copy link
Contributor

OK, problem found, I'll let you know when we have the fix ready. Thanks.

@bjarte
Copy link
Author

bjarte commented Mar 6, 2020

Thanks for looking into it!

@enricogior
Copy link
Contributor

@bjarte
the first private build fixed one issue but there was one more, let's see if this is a complete fix.
Thanks.

PowerToysSetup-0.15.1-x64-notsigned-v2.zip

@bjarte
Copy link
Author

bjarte commented Mar 6, 2020

Thanks! Now it seems to be working. I have tried applying the default layouts and have created a few custom layouts and applied those without any problems.

@enricogior
Copy link
Contributor

Great!
Thank you for the time spent helping!
Hopefully we will have an official 0.15.2 soon.

@crutkas crutkas added the Status-In progress This issue or work-item is under development label Mar 6, 2020
@enricogior enricogior added Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed Status-In progress This issue or work-item is under development labels Mar 9, 2020
@enricogior
Copy link
Contributor

Fix available in v0.15.2

@bjarte
Copy link
Author

bjarte commented Mar 10, 2020

Fix available in v0.15.2

Great, nice job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Quality Stability, Performance, Etc. FancyZones-Editor Issue revolving the FancyZone Editor Issue-Bug Something isn't working Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-FancyZones Refers to the FancyZones PowerToy Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. Severity-High Bugs that we consider a blocking issue for release (crashes stuff outside of PT)
Projects
None yet
Development

No branches or pull requests

3 participants