ME3Tweaks / LegendaryExplorer

Editor toolset for Mass Effect Trilogy and Mass Effect Legendary Edition
https://me3tweaks.com
GNU General Public License v3.0
125 stars 28 forks source link

Application crashes when you abort closing application #386

Closed Mgamerz closed 1 year ago

Mgamerz commented 1 year ago

Please fill out the following form in its entirety.

The more information you provide, the easier it will be for us to reproduce the issue.

Describe the bug When you have an unsaved package open in a tool, and close the LEX main window, it tries to close all windows. The dialog asking if you want to actually close this unsaved package opens, but it doesn't matter what option you pick, LEX will close regardless. It's not because it's ignoring the result, but it's not aborting the termination of the app, and it's causing it to actually crash instead. To the user this still looks normal.

To Reproduce Be specific. Reports must include tool names, filenames, export numbers and more so that we can reproduce the issue. Do not use generic "use any file" or "any tool". Be specific. If specific reproducible steps are not included, we may simply close the issue as not reproducible.

Open a package file, make some changes without saving, then close the LEX main window. Choose to not close the unsaved opened window. The application throws an exception and dies.

Expected behavior The application should not close when you tell it not to. This likely means we need to change how the main window closing logic works, to enumerate children windows and close them, then terminate the app, rather than having WPF terminate everything, as I don't know if it can be interrupted.

Screenshots and files used to replicate this If applicable, add screenshots to help explain your problem.

N/A

Version information: Please include both the date and version number that is located on the top right side of the main window. This information is required.

6.3 Nightly 07/11/2023

Stack trace If you see an error dialog with a details or copy button, please post the details here.

See Visual Studio

Other information Add any other context about the problem here.

N/A