NULL_CLASS_PTR_READ from PublicTerminalCore.dll!TerminalIsSelectionActive #18987

Closed
opened 2026-01-31 06:30:30 +00:00 by claunia · 4 comments
Owner

Originally created by @javierdlg on GitHub (Nov 29, 2022).

Originally assigned to: @carlos-zamora on GitHub.

Windows Terminal version

1.15.2210.6001

Windows build number

10.0.19044.2251

Other Software

Visual Studio 2022 v.17.5.33103.201

Steps to reproduce

Currently unknown, but the dumps show the user selecting some text and Visual Studio crashing due to an AccessViolationException.

You can find more information in the Watson cabs:
https://watsonportal.microsoft.com/Failure?FailureSearchText=32503620-0791-0795-1eff-dc016b5e23e9&MaxRows=100

Internal bug ticket:
Bug 1676887: [Watson] crash64: NULL_CLASS_PTR_READ_c0000005_PublicTerminalCore.dll!TerminalIsSelectionActive

Version of VS showing this issue:
https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/1639645
(Go to Build and Install tab for download link)

Expected Behavior

No response

Actual Behavior

Visual Studio crashes when text is selected

Originally created by @javierdlg on GitHub (Nov 29, 2022). Originally assigned to: @carlos-zamora on GitHub. ### Windows Terminal version 1.15.2210.6001 ### Windows build number 10.0.19044.2251 ### Other Software Visual Studio 2022 v.17.5.33103.201 ### Steps to reproduce Currently unknown, but the dumps show the user selecting some text and Visual Studio crashing due to an AccessViolationException. You can find more information in the Watson cabs: https://watsonportal.microsoft.com/Failure?FailureSearchText=32503620-0791-0795-1eff-dc016b5e23e9&MaxRows=100 Internal bug ticket: [Bug 1676887](https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1676887): [Watson] crash64: NULL_CLASS_PTR_READ_c0000005_PublicTerminalCore.dll!TerminalIsSelectionActive Version of VS showing this issue: https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/1639645 (Go to Build and Install tab for download link) ### Expected Behavior _No response_ ### Actual Behavior Visual Studio crashes when text is selected
Author
Owner

@zadjii-msft commented on GitHub (Nov 30, 2022):

I can't get at the dumps on this machine, but the blamed stack frame is in

f2eed92345/src/cascadia/PublicTerminalCore/HwndTerminal.cpp (L609-L614)

There's no guards there. There probably should be, but also, in what scenario is there ever a null publicTerminal, or a null publicTerminal->_terminal? I'm pretty sure there shouldn't be...

@zadjii-msft commented on GitHub (Nov 30, 2022): I can't get at the dumps on this machine, but the blamed stack frame is in https://github.com/microsoft/terminal/blob/f2eed92345f86424d0c0e54839626a19643f0e9c/src/cascadia/PublicTerminalCore/HwndTerminal.cpp#L609-L614 There's no guards there. There probably should be, but also, in what scenario is there ever a null `publicTerminal`, or a null `publicTerminal->_terminal`? I'm pretty sure there shouldn't be...
Author
Owner

@zadjii-msft commented on GitHub (Dec 1, 2022):

image

0b 00000077`7a8fd4c0 00007ffb`8c358530     ntdll!KiUserExceptionDispatch+0x2e [minkernel\ntos\rtl\amd64\trampoln.asm @ 755] 
0c 00000077`7a8fdc68 00007ffb`a75ce837     PublicTerminalCore!TerminalIsSelectionActive [C:\a\_work\1\s\src\cascadia\PublicTerminalCore\HwndTerminal.cpp @ 610] 
0d 00000077`7a8fdc70 00007ffb`a75ce774     0x00007ffb`a75ce837
0e 00000077`7a8fdd20 00007ffb`a75ce677     0x00007ffb`a75ce774
0f 00000077`7a8fdd50 00007ffb`8a86e417     0x00007ffb`a75ce677
...

well, that's... not what I'd expect

@zadjii-msft commented on GitHub (Dec 1, 2022): ![image](https://user-images.githubusercontent.com/18356694/205143305-c95ea8d7-2343-417c-b1bf-8bcd9bc8afa7.png) ``` 0b 00000077`7a8fd4c0 00007ffb`8c358530 ntdll!KiUserExceptionDispatch+0x2e [minkernel\ntos\rtl\amd64\trampoln.asm @ 755] 0c 00000077`7a8fdc68 00007ffb`a75ce837 PublicTerminalCore!TerminalIsSelectionActive [C:\a\_work\1\s\src\cascadia\PublicTerminalCore\HwndTerminal.cpp @ 610] 0d 00000077`7a8fdc70 00007ffb`a75ce774 0x00007ffb`a75ce837 0e 00000077`7a8fdd20 00007ffb`a75ce677 0x00007ffb`a75ce774 0f 00000077`7a8fdd50 00007ffb`8a86e417 0x00007ffb`a75ce677 ... ``` well, that's... not what I'd expect
Author
Owner

@ghost commented on GitHub (Jan 24, 2023):

:tada:This issue was addressed in #14678, which has now been successfully released as Windows Terminal v1.16.1023 (10231 and 10232).🎉

Handy links:

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

@ghost commented on GitHub (Jan 24, 2023):

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

Handy links:

@ghost commented on GitHub (Jan 24, 2023): :tada:This issue was addressed in #14678, which has now been successfully released as `Windows Terminal Preview v1.17.1023`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.17.1023) * [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#18987