Drag and Drop file into text editor not working

Things you’d like to miss in the future...
highend
Posts: 13313
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Drag and Drop file into text editor not working

Post by highend »

That explains it (ST = 64-bit).

Look at Don's posting:
Yes, I noted that the new version does not fix dropping onto 64-bit Notepad under Win8.1.
So it seems to affect all / more than Notepad, when they are running as 64-bit applications

If you use the 32-bit version of ST it should work.
I don't think ST is started with admin permissions (how do I check that?)
Task Manager (CTRL + SHIFT + ESC). It shows "(32 Bit)" after the name of the app (under tab: Processes)
One of my scripts helped you out? Please donate via Paypal

Luigi
Posts: 56
Joined: 01 Sep 2011 00:41

Re: Drag and Drop file into text editor not working

Post by Luigi »

I have the same problem. (Windows 8.1 64-bit)

I downloaded 17.80.0012 (latest beta released today)

I can't drag a file to Sublime Text from XYplorer because I use 64-bit version of Sublime Text,
same for 64-bit Notepad.

Drag/drop works with Notepad++ 32-bit

I use "Standard shell drag and drop" (it's checked)

Stretto
Posts: 108
Joined: 30 Jan 2012 06:43

Re: Drag and Drop file into text editor not working

Post by Stretto »

Having same problem with sumatra PDF and xyplorer 18.2 and 18.6(after upgrade). Windows Explorer works fine. Tried standard shell drag and drop and not. Tried as admin and not.

Sumatra PDF is 64-bit while xyplorer is 32-bit, possibly the reason. Running 32-bit sumatra lets it work. I have no idea why it should matter. Maybe xyplorer can write a small 64-bit utility addon and detect the architecture of the app and if it is 64-bit it can use the add to provide the drag and drop info? Or, better yet, just create a 64-bit xyplorer.

jupe
Posts: 2794
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Drag and Drop file into text editor not working

Post by jupe »

Stretto wrote:Running 32-bit sumatra lets it work. I have no idea why it should matter. Maybe xyplorer can write a small 64-bit utility addon and detect the architecture of the app and if it is 64-bit it can use the add to provide the drag and drop info? Or, better yet, just create a 64-bit xyplorer.
I believe this is due to a Windows bug, see the below link for more info. Your options are, either get SumatraPDF to implement a workaround on their end, use 32bit Sumatra, configure portable file associations to meet your needs etc. but x64 XYplorer isn't going to happen (at least in the foreseeable future) due to the limitations of the language it was created in.

https://stackoverflow.com/questions/396 ... -to-64-bit

Stretto
Posts: 108
Joined: 30 Jan 2012 06:43

Re: Drag and Drop file into text editor not working

Post by Stretto »

There is another option, as I mentioned. Xyplorer can implement a bridge that does the proper manipulation. It should not be that difficult to do and it will allow it to work with a wide variety of applications. To say that sumatra should be fixed is wrong. Sumatra isn't used as a utility to drag things from it, Xyplorer is. Hence it is the burden of xyplorer to function properly(ultimately, windows, of course, but xyplorer is the one that loses in the end if it doesn't step up).

Xyplorer32->XyplorerDnDbridge64->64-bit app. The bridge could probably be coded up in a day or two if not quicker.

as a quick fix though, following your link:

editbin /HIGHENTROPYVA:NO sumatrapdf.exe

will allow dnd to work.

Thanks.

lahma
Posts: 2
Joined: 16 Oct 2018 14:35

Re: Drag and Drop file into text editor not working

Post by lahma »

So, is this something the developers simply are not interested in implementing/fixing? Its not like this is an uncommon issue encountered only in rare edge cases or uncommon software. Allow me to provide an example. FYI, I'm running Windows 10 x64 (v1709).

Open:
"%windir%\system32\cmd.exe" (64-bit cmd prompt)
Open:
"%windir%\SysWOW64\cmd.exe" (32-bit cmd prompt)

Now, open Windows file explorer and navigate to any directory you wish and pick a random file. Now, drag and drop that file onto both of the open command prompts, and you will see that the path of that file appears on the command line (on both the 32-bit and 64-bit versions). Now, try to drag and drop any file from within XYplorer onto both of the open command prompts, and you will see that it does NOT work on the 32-bit OR 64-bit command prompt.

Surely drag-and-drop from XYplorer should work with one of the most basic and essential of Windows' built in utilities, right? If the developers do not agree, and this is not something that is planned to be fixed, can they at least provide a logical reason as to why they are not going to fix this problem? I appreciate all the hard work and wonderful features put into XYplorer, but this has been an issue for a very long time now, and it would be great to see it fixed. Thanks.

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

Re: Drag and Drop file into text editor not working

Post by admin »

It's a known issue that dragging from 32-bit to 64-bit apps stopped working with Win8 and still does not work in Win10. Common opinion seems to be that it's a Windows bug. That means it might never be fixed.

But I'm really surprised that it does not work with the 32-bit cmd prompt (other 32-bit targets work. e.g. notepad). But I can confirm it does not, and it does not with all 32-bit apps I tested. So again, it's not an XYplorer issue but a Windows issue.

There is nothing I can do. :|

lahma
Posts: 2
Joined: 16 Oct 2018 14:35

Re: Drag and Drop file into text editor not working

Post by lahma »

While I agree that the Windows 10 implementation does indeed seem to be a bug, there are at least a couple of ways to work around the issue, and at least 1 of them appears to be a reasonable solutions that does not require disabling (or reducing entropy of) ASLR. Some relevant links if you're interested:

https://stackoverflow.com/questions/396 ... -to-64-bit
https://github.com/rizonesoft/Notepad3/issues/192
https://github.com/zufuliu/notepad2/com ... 10559f875e

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

Re: Drag and Drop file into text editor not working

Post by admin »

I know those pages. Looks like non-trivial hacks to me. Which one you think is reasonable?

Stretto
Posts: 108
Joined: 30 Jan 2012 06:43

Re: Drag and Drop file into text editor not working

Post by Stretto »

admin wrote: 20 Oct 2018 18:43 I know those pages. Looks like non-trivial hacks to me. Which one you think is reasonable?
I don't understand why you just don't make an 64x delegate process.

It should be very simple to do and requires no hacks.

1. XY launches 64x delegate process and passes it the files to dnd and the window to which it is meant for.
2. The 64x delegate process:

a. Simply does DND in 64-bit land

----

32-bit -> 32-bit : success
64-bit -> 64-bit : success
64-bit -> 32-bit : success
32-bit -> 64-bit : fail <-- Precisely the zone that Xyplorer falls in!

So, you don't have to rewrite a full blown 64x XYplorer to fix the problem! just write a stop that delegates/bridges/adapts.

You can easily write small utility to do this! In fact, you could just copy and paste some of your DND code and use that. It might take a few days to get everything to work but their are also demo apps online(I've done it before, it's not hard, and if it's not hard for me then it's not hard for you).

By doing it this way no one will be the wiser and everything will just work. Since DND is basically one way you don't have to have some complex communications channel.

There might be a few little kinks along the way but it should otherwise be pretty straight forward.

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

Re: Drag and Drop file into text editor not working

Post by admin »

Yes, pretty much the same way we take with the 64-bit context menu. But I cannot do it myself. I'm just a VB man. But if you can do it, be my guest! :tup: (Although I still think it's a Windows bug that MS should fix, damn it.)

Moy
Posts: 8
Joined: 29 May 2018 13:19

Re: Drag and Drop file into text editor not working

Post by Moy »

Oh.. Just to say this problem happens in my computer as well.
Windows 10 64-bit, XYplorer 19.30 - I don't know if it's 32 bit or 64 bit, actually I didn't find an "64 bit version of XY" in the website.

And FYI, in some programs when I try to drag a file many times, it could success sometime. Which makes me much more confused :veryconfused:
Test.gif
Test.gif (70.21 KiB) Viewed 1821 times
In the Gif I'm dragging a video from XY to REAPER (64 bit).

-

HOWEVER, when I try to drag a text file into Sublime text, it never success. :shock:

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

Re: Drag and Drop file into text editor not working

Post by admin »

Thanks for the info. That's indeed confusing.

Moy
Posts: 8
Joined: 29 May 2018 13:19

Re: Drag and Drop file into text editor not working

Post by Moy »

admin wrote: 06 Nov 2018 08:31 Thanks for the info. That's indeed confusing.
Hi I found a strange thing and I think maybe it's the KEY to solve the drag problem!

Firstly, see this gif:
XY-Drag-Problem.gif
XY-Drag-Problem.gif (103.62 KiB) Viewed 1717 times
Under these condition, the drag problem is probably happen:
1. Select multi files.
2. Open the Preview Pane.

When close the Preview Pane, dragging behavior became normal :appl:

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

Re: Drag and Drop file into text editor not working

Post by admin »

Interesting indeed! Does this affect all file types (also images and texts ...) or only MP4?

Post Reply