[TC9.51 RC5] RC5 hangs if Drag&Drop an URL from Firefox

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

Moderators: sheep, Hacker, Stefan2, white

Post Reply
JOUBE
Power Member
Power Member
Posts: 638
Joined: 2004-07-08, 08:58 UTC

[TC9.51 RC5] RC5 hangs if Drag&Drop an URL from Firefox

Post by *JOUBE »

A real and serious bug (I never seen such a bug before within any public beta of the Tc/WinCmd):

RC5 hangs if Drag&Drop an URL from Firefox to a folder wthin the Tc.

Going back to RC4 everything works well.

This bug seems to me a reason to stop distributing the RC5 ("Murks inside").

JOUBE
Last edited by JOUBE on 2020-03-13, 17:58 UTC, edited 5 times in total.

User avatar
Horst.Epp
Power Member
Power Member
Posts: 3632
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: [TC9.51 RC5] RC5 hangs if Drag&Drop an URL from Firefox

Post by *Horst.Epp »

Confirmed
But the problem is using with Firefox.
Works fine with Chrome based Edge or Chrome
Tested with Firefox 74.0 x64
Windows 10 Home x64 November 2019 Update, Version 1909 (OS Build 18363.752)
Intel(R) Core(TM) i7-4770 CPU @ 3.40GH, 16GB RAM
TC 9.51 x64 / x86, Everything 1.4.1.972 (x64)

User avatar
petermad
Power Member
Power Member
Posts: 9488
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: [TC9.51 RC5] RC5 hangs if Drag&Drop an URL from Firefox

Post by *petermad »

Here it hangs about every second time I try with FireFox 75.0b3 64bit - but is it not just TC that hangs, also FireFox

It works fine with my other browsers. IE 11, Chrome, Opera, Safari, SeaMonkey.
License #524 (1994)
Danish Total Commander Translator
TC 9.5b10 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.960 (x64)
TC 3.0b16 on Android 6.0
Get: Extended Total Commander Menus | TC Languagebar | PHSM-Calendar

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39427
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC9.51 RC5] RC5 hangs if Drag&Drop an URL from Firefox

Post by *ghisler(Author) »

I have investigated this extensively during the last few days.
The bad news: It's a bug in Firefox.
The good news: There is a workaround.

Explanation:
There are two ways to receive files via Drag&Drop:
1. Synchronously (this method is used by Total Commander):
Windows calls the IDropTarget.Drop function in the receiving program. The receiver calls dataObject.GetData() to get the data, then functions depending on the type of data. In the case of Firefox, it passes a stream of data (IStream) to Total Commander, which then calls istream.Read() to read the data. Unfortunately Firefox hangs forever in this istream.Read() function.

2. Asynchronously (this method seems to be used by the Explorer):
Windows calls the IDropTarget.Drop function in the receiving program. The receiver calls IDataObjectAsyncCapability.GetAsyncMode() to check whether the data can be received asynchronously. If yes, the receiver creates a background thread and tells the sender via IDataObjectAsyncCapability.StartOperation() that it wants to receive the data in the background. Then it calls dataObject.GetData() and istream.Read() in the background.

Currently Firefox only works correctly when using method 2. Therefore I have added code to handle method 2 when the sender supports it, and it seems to work fine with Firefox.
Author of Total Commander
http://www.ghisler.com

JOUBE
Power Member
Power Member
Posts: 638
Joined: 2004-07-08, 08:58 UTC

Re: [TC9.51 RC5] RC5 hangs if Drag&Drop an URL from Firefox

Post by *JOUBE »

ghisler(Author) wrote:
2020-03-16, 11:22 UTC
It's a bug in Firefox.
No, No. Or: maybe ..
But because why Rc4 works well and Rc5 not? So it depends from TCs release ....

JOUBE

Babbo
Junior Member
Junior Member
Posts: 22
Joined: 2013-11-05, 18:16 UTC

Re: [TC9.51 RC5] RC5 hangs if Drag&Drop an URL from Firefox

Post by *Babbo »

Exactly the same thing here with Win 10 Pro (admin), TC 9.5 64bit and started after the update to FF 74.0 (also 64bit): drag & drop a link, TC freezes, shut TC down via task-manager, there is a 0-byte-link, drag and drop again, confirm overwrite and done.

Occasionally, TC does not freeze, but also produces an empty link. In that case TC has to be closed and re-opened, then one can successfully proceed as above.

And, agreed, I'm not so sure that this is a FF-exclusive bug. Especially, since drag and drop from FF to the Explorer never fails.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39427
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC9.51 RC5] RC5 hangs if Drag&Drop an URL from Firefox

Post by *ghisler(Author) »

But because why Rc4 works well and Rc5 not?
Here it happened also with TC 9.22a, and I got reports from other users who had it in this version.
It's a timing problem: Firefox seems to try to create the lnk file data in time for the drop, but sometimes it's too slow and hangs. You can try dragging the same link a second time when it was hanging, then it usually works.
Author of Total Commander
http://www.ghisler.com

User avatar
petermad
Power Member
Power Member
Posts: 9488
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: [TC9.51 RC5] RC5 hangs if Drag&Drop an URL from Firefox

Post by *petermad »

history.txt wrote:15.03.20 Fixed: Main window hanging when dragging URLs from Firefox to it. Reason: Firefox doesn't support synchronous drop -> implement asynchronous drop (32/64)
So far I have not experienced any problems when dragging URL from Firefox 75.0b5 64bit to TC 9.51 RC6 64bit :-)
License #524 (1994)
Danish Total Commander Translator
TC 9.5b10 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.960 (x64)
TC 3.0b16 on Android 6.0
Get: Extended Total Commander Menus | TC Languagebar | PHSM-Calendar

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39427
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC9.51 RC5] RC5 hangs if Drag&Drop an URL from Firefox

Post by *ghisler(Author) »

Nice to hear that! Could you also try dragging files to Total Commander RC6 32-bit, please?
Author of Total Commander
http://www.ghisler.com

JOUBE
Power Member
Power Member
Posts: 638
Joined: 2004-07-08, 08:58 UTC

Re: [TC9.51 RC5] RC5 hangs if Drag&Drop an URL from Firefox

Post by *JOUBE »

ghisler(Author) wrote:
2020-03-17, 20:53 UTC
But because why Rc4 works well and Rc5 not?
Here it happened also with TC 9.22a
Ok, thanks.This is an important explanation. Without this explanation, my confidence in the TC (from TC9.51 RC5 on) would have decreased.

JOUBE
Last edited by JOUBE on 2020-03-19, 10:44 UTC, edited 1 time in total.

JOUBE
Power Member
Power Member
Posts: 638
Joined: 2004-07-08, 08:58 UTC

Re: [TC9.51 RC5] RC5 hangs if Drag&Drop an URL from Firefox

Post by *JOUBE »

ghisler(Author) wrote:
2020-03-19, 09:58 UTC
Nice to hear that! Could you also try dragging files to Total Commander RC6 32-bit, please?
Works well.

JOUBE

User avatar
petermad
Power Member
Power Member
Posts: 9488
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: [TC9.51 RC5] RC5 hangs if Drag&Drop an URL from Firefox

Post by *petermad »

ghisler(Author) wrote:
2020-03-19, 09:58 UTC
Nice to hear that! Could you also try dragging files to Total Commander RC6 32-bit, please?
No problems either (Windows 7)
License #524 (1994)
Danish Total Commander Translator
TC 9.5b10 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.960 (x64)
TC 3.0b16 on Android 6.0
Get: Extended Total Commander Menus | TC Languagebar | PHSM-Calendar

Babbo
Junior Member
Junior Member
Posts: 22
Joined: 2013-11-05, 18:16 UTC

Re: [TC9.51 RC5] RC5 hangs if Drag&Drop an URL from Firefox

Post by *Babbo »

Thank you for the fix in tc951x64_rc6!

Post Reply