Deadlock inside ZIP archive on external device

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Deadlock inside ZIP archive on external device

Post by *Slavic »

Total Commander has some problems working with the files on the external devices, like a connected Android phone or tablet. In most cases, however, it's simply a lack of functionality, which can be easily avoided, but sometimes it looks like a serious bug.

Let's place a ZIP archive in the device folder. For the illustration of this bug, we can create a file compress.zip (name does matter) on a PC, connect Android device with file transfer mode and copy this file to \\<Device_name>\Internal shared storage\Download\

Then try to open this archive in TC. Its content is shown in the file list, and compress.zip\*.* name is shown above as a path. But TC becomes literally trapped in the deadlock, we cannot return back by "..". We can only quit this list and re-enter the device by Alt+F1 or Alt+F2 or drop-down drive list. Sometimes TC is able to unpack (copy) files from archive to PC, but sometimes it doesn't work.

Now please note that the first letter of "compress.zip" is "c". This is a possible cause of the bug! If the archive begins from the letter, which is a letter of existing drive, like "a", "c" or "d", TC attempts to enter this archive using the internal ZIP packer and then becomes locked inside. Otherwise TC launches the Explorer by default, which copies the archive to the temporary folder on the PC and shows the content. But under the certain conditions, this default operation doesn't happen. Try to change the name compress.zip to depress.zip. Then you will see the drive letter "D" on the drive panel.

This bug happens more often if you press Enter, and less often if you double-click the archive name by mouse.
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48012
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Deadlock inside ZIP archive on external device

Post by *ghisler(Author) »

Then try to open this archive in TC. Its content is shown in the file list, and compress.zip\*.* name is shown above as a path.
I cannot reproduce this. Here, the zip is opened externally in Explorer. Tested on Windows 10.

Can you give me more details, please?
Author of Total Commander
https://www.ghisler.com
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Deadlock inside ZIP archive on external device

Post by *Slavic »

Can you give me more details, please?
Of course, I will try to do my best.

I checked this on Windows 10 too, it also happened, maybe less often than on Windows 8.1.
Used the file compress.zip:
https://drive.google.com/open?id=1TQjl3m2Pus2rZBov59KjJxK9gCaVKHnl
Screen is attached (my name is painted for privacy because it's a public resource).
https://prnt.sc/mmravw

How to reproduce (please use exactly these ZIP and directories, then you can try to change):
1) Connect an external device like my Pixel 3 and set USB file transfer mode.
2) Copy the attached file to \Download folder on the device.
3) Make sure that left panel shows the device \Download and right panel shows the PC folder with this ZIP.
4) Press Enter on the ZIP on the device.
- a) If TC opens the Explorer with content of ZIP archive, close it by Alt+F4.
- b) Press Enter again.
Eventually you will get something similar to my screenshot. For further testing, you can try to rename ZIP on the device, change the folder on the PC (the bug almost certainly will not be reproduced) etc.

P.S. Replaced the link to file (Google Drive isn't perfect, but allows to download anyway)
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48012
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Deadlock inside ZIP archive on external device

Post by *ghisler(Author) »

Thanks, I can reproduce it only immediately after uploading. When I disconnect and reconnect the device, it opens externally. Looks like some kind of bug in Android, interpreting the zip as a folder instead of a file.I don't think that there is anything I can do about it, but I will check it in detail in the debugger.
Author of Total Commander
https://www.ghisler.com
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Deadlock inside ZIP archive on external device

Post by *Slavic »

That's well, I don't have a debugger and could only guess what was going on.

Please consider whether this bug can be resolved in "natural" way, would it be better? I noticed that Explorer in fact opens a copy instead of original ZIP, which was first copied to the temporary directory on a PC. TC has essentially the same mechanic when it modifies the archives or uses the Lister to view one of the files inside ZIP, so could this approach be used here too? Then only additional operation will be needed, to correctly return from ".." inside the ZIP to its original place. And, of course, wiping the temporary place after quit (but it's already implemented).
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48012
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Deadlock inside ZIP archive on external device

Post by *ghisler(Author) »

This should be fixed in Total Commander 9.22 release candidate 1, please test it! The zip should always be opened externally now.
Author of Total Commander
https://www.ghisler.com
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Deadlock inside ZIP archive on external device

Post by *Slavic »

I carefully tested 9.22rc1 on Windows 8.1 and Windows 10 beta (18342.19h1) using two devices with Android 8.1 and 9.0. All attempts to open a ZIP file on the device resulted in opening its copy in Explorer. Previous weird behaviour in 9.21a is no longer reproduced.

I also noticed another anomaly in Windows 10: the device name in the drop-down list (like Alt+F1) is not refreshed after changing the device, it's also not possible to refresh this list manually (e.g. using Reread source), so accessing the newly connected device from TC is not possible, need to close TC and open it again (apparently it's a bug in Windows beta, I will check it later after a new beta or 19h1 release).

From my point, the bug in 9.21a has been fixed.
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48012
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Deadlock inside ZIP archive on external device

Post by *ghisler(Author) »

Thanks for confirming the fix!
I also noticed another anomaly in Windows 10: the device name in the drop-down list (like Alt+F1) is not refreshed after changing the device
I cannot confirm that. I tried with a device with Android 5, 6 and 8, respectively.

I have tested that with the last 2 official Windows 10 builds, 17134 (Spring 2018) and 17763 (Fall 2018).
Maybe it's a bug in your insider build.
Author of Total Commander
https://www.ghisler.com
Post Reply