Skip to content

Bug: Opening and closing modals quickly may lead to a crash #11804

Closed
@ferrariofilippo

Description

@ferrariofilippo

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 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

  1. Select a file
  2. Hit Delete key
  3. Instantly hit Esc
  4. Hit Delete again
  5. Repeat until it crashes

Requirements

  • Fix crash that occurs when opening and closing modals quickly

Files Version

Files Preview 2.4.54.0

Windows Version

10.0.22621.1413

Log file

debug.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions