You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, this is an extreme case but nonetheless it's a bug and it should be fixed.
If you keep on opening and closing a modal using shortcuts, Files will eventually crash.
We could fix this using RichCommands.
I suggest adding a property (maybe private bool isReady?) which tells whether the command is ready to be executed (it would be true only if the modal has been closed). We would read this property when evaluating IsExecutable. We should apply it to all the command which open modals in Files.
The crash probably happens because we try to open the modal while it's being closed
Steps To Reproduce
Select a file
Hit Delete key
Instantly hit Esc
Hit Delete again
Repeat until it crashes
Requirements
Fix crash that occurs when opening and closing modals quickly
First of all, if we need a quick fix we can add a try-catch in the ShowAsync() of each modal.
In my opinion, to fix the bug we should do as above in the report (introduce an isReady property). This property would be set to false at the beginning of ExecuteAsync() and then to true at the end. I was thinking of creating a "Wrapper" function to reduce code duplication. What are your thoughts?
Description
First, this is an extreme case but nonetheless it's a bug and it should be fixed.
If you keep on opening and closing a modal using shortcuts, Files will eventually crash.
We could fix this using RichCommands.
I suggest adding a property (maybe
private bool isReady
?) which tells whether the command is ready to be executed (it would betrue
only if the modal has been closed). We would read this property when evaluatingIsExecutable
. We should apply it to all the command which open modals in Files.The crash probably happens because we try to open the modal while it's being closed
Steps To Reproduce
Delete
keyEsc
Delete
againRequirements
Files Version
Files Preview 2.4.54.0
Windows Version
10.0.22621.1413
Log file
debug.log
The text was updated successfully, but these errors were encountered: