Permanent Deletion dialogue opens in background when background processing is enabled for deletions

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
daniel_m
Posts: 199
Joined: 11 Apr 2010 11:47
Location: Windows 10 Pro 22H2, scaling 100%

Permanent Deletion dialogue opens in background when background processing is enabled for deletions

Post by daniel_m »

OMG, this one took a while to figure out! All the way back to 2010 and the change log for version v9.00.0021 :shock: :biggrin:

For a while now, when trying to delete a file/folder permanently, the deletion dialogue sometimes opened in the background. Copying settings from a fresh installation into my current XYplorer.ini piece by piece, I narrowed it down to lines 1081 and 1083. These correspond to FopInBackground=1, and BackgroundedFileOps with a value between 16 and 31 (16 >= X <= 31). Thanks to the old change log, I now know that the culprit is background processing for deletions.

On my PC, the dialogue for permanent deletions opened in the background only sporadically and in the foreground most of the times, which made it difficult to replicate. I found that running XYplorer in a VM made it very easy to observe the bug. I guess timing or a race condition happens only sporadically on a fast machine, but often on a slow machine or VM.


To reproduce:

1) Start XYplorer on a slow PC or inside a VM like VirtualBox
2) Enable Background Processing and apply it to Delete.
3) Right-click a file/folder, hold down the Shift key and click delete.

Remark: This is where speed becomes tricky. On my PC, it took me a while to trigger the bug with ~90% certainty. The trick was to have the mouse cursor close to the edge of the context menu in step 3), and to move the cursor to the right quickly after releasing the mouse button. Without this trick, the permanent deletion dialogue might spawn in the background a few times by chance, and when trying to replicate the behaviour, it works fine a hundred times in a row.


I tested v27.20.0703 x86 and v28.00.1209 x64 on Windows 10 Pro (running on my PC) and Windows 11 Pro (running in a VirtualBox VM). I guess it affects all versions since v9.00.0021. There is no difference between the custom and the native context menu.
XYplorer x64 (often the latest beta), Windows 10 Pro 22H2, 3840x2160 scaling 100%

admin
Site Admin
Posts: 65172
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Permanent Deletion dialogue opens in background when background processing is enabled for deletions

Post by admin »

Can you show a screenshot of the dialog you are talking about?

daniel_m
Posts: 199
Joined: 11 Apr 2010 11:47
Location: Windows 10 Pro 22H2, scaling 100%

Re: Permanent Deletion dialogue opens in background when background processing is enabled for deletions

Post by daniel_m »

It's this one:
del.png
del.png (25.96 KiB) Viewed 172 times
I also made an animated GIF showing what happens:
bug.gif
bug.gif (460.97 KiB) Viewed 172 times
XYplorer x64 (often the latest beta), Windows 10 Pro 22H2, 3840x2160 scaling 100%

admin
Site Admin
Posts: 65172
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Permanent Deletion dialogue opens in background when background processing is enabled for deletions

Post by admin »

I think it's a Windows peculiarity, or perhaps a bug. When the Ctrl or Shift key is held down, some dialog boxes end up underneath the current window. I've noticed this with many Windows versions over the years. Since the dialog box is owned by Windows, I can't modify this behavior. :|

daniel_m
Posts: 199
Joined: 11 Apr 2010 11:47
Location: Windows 10 Pro 22H2, scaling 100%

Re: Permanent Deletion dialogue opens in background when background processing is enabled for deletions

Post by daniel_m »

I see, damn. Damn Microsoft.

So, background processing does have nothing to do with it? Because Shift-deletion works without quirks without background processing.
XYplorer x64 (often the latest beta), Windows 10 Pro 22H2, 3840x2160 scaling 100%

admin
Site Admin
Posts: 65172
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Permanent Deletion dialogue opens in background when background processing is enabled for deletions

Post by admin »

You may see the same in foreground processing if you tick "Configuration | File Operations | File Operations | Miscellaneous | File operation progress dialog modeless".

Why don't you exclude Deletion from background processing? (Configuration | File Operations | File Operations | Background Processing | Apply to...)

daniel_m
Posts: 199
Joined: 11 Apr 2010 11:47
Location: Windows 10 Pro 22H2, scaling 100%

Re: Permanent Deletion dialogue opens in background when background processing is enabled for deletions

Post by daniel_m »

It doesn't happen very often, but I do occasionally delete folders with many thousands of files ... Android stuff is messy.
On an SSD we are talking seconds. On my NAS, deleting that many files can block XYplorer for several minutes. Yes, the dreaded network drives again :biggrin:
XYplorer x64 (often the latest beta), Windows 10 Pro 22H2, 3840x2160 scaling 100%

Post Reply