Permanent Deletion dialogue opens in background when background processing is enabled for deletions
Posted: 08 Dec 2025 00:38
OMG, this one took a while to figure out! All the way back to 2010 and the change log for version v9.00.0021
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.
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.