Dragging a tab from Visual Studio Code onto Windows Terminal causes it to crash. #10853

Closed
opened 2026-01-31 02:32:01 +00:00 by claunia · 5 comments
Owner

Originally created by @bhelyer on GitHub (Oct 2, 2020).

Environment

Windows build number: Microsoft Windows NT 10.0.19041.0
Windows Terminal version (if applicable): 1.3.2651.0
VS Code: 1.49.2

Steps to reproduce

  1. Open Windows terminal (Powershell or Cmd, doesn't seem to matter)
  2. Open Visual Studio Code
  3. Drag the 'Welcome' tab (or any other) onto Windows Terminal

(Note that this occured because I missed when using VS Code, not because I thought it would do something meaningful.)

Expected behavior

Nothing, or an error to be generated. I don't rightly know what VS Code sends out when you drag a tab, I'm just expecting Windows Terminal not to crash.

Actual behavior

Windows Terminal closes, taking all my tabs with it as punishment for my failure to accurately use a mouse.

Originally created by @bhelyer on GitHub (Oct 2, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Microsoft Windows NT 10.0.19041.0 Windows Terminal version (if applicable): 1.3.2651.0 VS Code: 1.49.2 ``` # Steps to reproduce 1. Open Windows terminal (Powershell or Cmd, doesn't seem to matter) 2. Open Visual Studio Code 3. Drag the 'Welcome' tab (or any other) onto Windows Terminal (Note that this occured because I missed when using VS Code, not because I thought it would do something meaningful.) # Expected behavior Nothing, or an error to be generated. I don't rightly know what VS Code sends out when you drag a tab, I'm just expecting Windows Terminal not to crash. # Actual behavior Windows Terminal closes, taking all my tabs with it as punishment for my failure to accurately use a mouse.
Author
Owner

@DHowett commented on GitHub (Oct 2, 2020):

Whoa, that's wild. That's totally unexpected.

@DHowett commented on GitHub (Oct 2, 2020): Whoa, that's _wild_. That's totally unexpected.
Author
Owner

@DHowett commented on GitHub (Oct 2, 2020):

Looks like VSCode generates a malformed clipboard/drop object; we should be more resilient.

The WinRT DataItems API is failing when we ask "give us the files you said were dropped on me" here (2852):

4a114971f9/src/cascadia/TerminalControl/TermControl.cpp (L2850-L2853)

@DHowett commented on GitHub (Oct 2, 2020): Looks like VSCode generates a malformed clipboard/drop object; we should be more resilient. The WinRT DataItems API is failing when we ask "give us the files you said were dropped on me" here (2852): https://github.com/microsoft/terminal/blob/4a114971f966be4d85113bf160a9a4603a62fc02/src/cascadia/TerminalControl/TermControl.cpp#L2850-L2853
Author
Owner

@skyline75489 commented on GitHub (Oct 19, 2020):

I can easily reproduce this. And it is easy to fix the crash by simply catching it. But I kinda want it to work and haven't figured out a way to do so.

For reference, both Edge and Firefox handles the tab dropping from VSCode as a file URI (file://something). Surprisely explorer.exe handles it as an actual file and will paste it to the current directory.

A side note: Should we also support ApplicationLInk and WebLink? Then you can drag and drop an URL from browser and it will be pasted into the terminal. I've tested it and it works pretty well.

@skyline75489 commented on GitHub (Oct 19, 2020): I can easily reproduce this. And it is easy to fix the crash by simply catching it. But I kinda want it to *work* and haven't figured out a way to do so. For reference, both Edge and Firefox handles the tab dropping from VSCode as a file URI (file://something). Surprisely `explorer.exe` handles it as an *actual* file and will paste it to the current directory. A side note: Should we also support `ApplicationLInk` and `WebLink`? Then you can drag and drop an URL from browser and it will be pasted into the terminal. I've tested it and it works pretty well.
Author
Owner

@ghost commented on GitHub (Jan 28, 2021):

:tada:This issue was addressed in #8461, which has now been successfully released as Windows Terminal v1.5.10271.0.🎉

Handy links:

@ghost commented on GitHub (Jan 28, 2021): :tada:This issue was addressed in #8461, which has now been successfully released as `Windows Terminal v1.5.10271.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.5.10271.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@ghost commented on GitHub (Jan 28, 2021):

:tada:This issue was addressed in #8461, which has now been successfully released as Windows Terminal Preview v1.6.10272.0.🎉

Handy links:

@ghost commented on GitHub (Jan 28, 2021): :tada:This issue was addressed in #8461, which has now been successfully released as `Windows Terminal Preview v1.6.10272.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.6.10272.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10853