Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WPF] Add TermCore null checks to HwndTerminal #14678

Merged
2 commits merged into from
Jan 13, 2023
Merged

Conversation

carlos-zamora
Copy link
Member

@carlos-zamora carlos-zamora commented Jan 13, 2023

#14461 is caused by a null pointer exception in TerminalIsSelectionActive(). Since this reveals that it is possible to enter a state where _terminal is null, I've gone ahead and added null-checks throughout the code to make it more stable.

Closes #14461

Validation Steps Performed

Ran locally. Still works.

@carlos-zamora carlos-zamora added this to the Terminal v1.17 milestone Jan 13, 2023
@ghost ghost added Area-WPFControl Things related to the WPF version of the TermControl Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news. labels Jan 13, 2023
Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yikes, there's like 100 different kinds of error checking in this file! thanks for dealing with them all!

@DHowett DHowett added this to To Cherry Pick in 1.16 Servicing Pipeline via automation Jan 13, 2023
@DHowett DHowett added this to To Cherry Pick in 1.15 Servicing Pipeline via automation Jan 13, 2023
Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is exhaustive, thanks.

@DHowett
Copy link
Member

DHowett commented Jan 13, 2023

@msftbot merge this in 1 minute

@ghost ghost added the AutoMerge Marked for automatic merge by the bot when requirements are met label Jan 13, 2023
@ghost
Copy link

ghost commented Jan 13, 2023

Hello @DHowett!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I won't merge this pull request until after the UTC date Fri, 13 Jan 2023 23:02:27 GMT, which is in 1 minute

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

@ghost ghost merged commit dc6d82e into main Jan 13, 2023
@ghost ghost deleted the dev/cazamor/wpf-null-checks branch January 13, 2023 23:03
@DHowett DHowett moved this from To Cherry Pick to Cherry Picked in 1.16 Servicing Pipeline Jan 20, 2023
DHowett pushed a commit that referenced this pull request Jan 20, 2023
Closes #14461

Ran locally. Still works.

(cherry picked from commit dc6d82e)
Service-Card-Id: 87602014
Service-Version: 1.16
@ghost
Copy link

ghost commented Jan 24, 2023

🎉Windows Terminal v1.16.1023 (10231 and 10232) has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented Jan 24, 2023

🎉Windows Terminal Preview v1.17.1023 has been released which incorporates this pull request.:tada:

Handy links:

@DHowett DHowett moved this from Cherry Picked to Shipped in 1.16 Servicing Pipeline Jan 24, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-WPFControl Things related to the WPF version of the TermControl AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

NULL_CLASS_PTR_READ from PublicTerminalCore.dll!TerminalIsSelectionActive
3 participants