-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Manually initialize the warnings vector to prevent a crash on launch #8995
Conversation
@DHowett INTERESTING, the bot did not transfer the z*Service-Consider labels, headsup |
Thanks for the h/u. What the heck did spellbot drink? |
@@ -2410,7 +2410,7 @@ namespace winrt::TerminalApp::implementation | |||
IVectorView<Profile> profiles, | |||
IMapView<winrt::hstring, ColorScheme> schemes) | |||
{ | |||
IVector<SettingsLoadWarnings> warnings; | |||
IVector<SettingsLoadWarnings> warnings{ winrt::single_threaded_vector<SettingsLoadWarnings>() }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hate that we're heap allocating a thing that in most instances will not be used at all, but it fixes a bug and I cannot die on the hill of purity.
Hello @DHowett! Because this pull request has the Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 8 hours, a condition that will be fulfilled in about 7 hours 56 minutes. No worries though, I will be back when the time is right! 😉 p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this is the only place we did this. Good to know haha.
…8995) ## Summary of the Pull Request Oops, winrt `IVector`s need to be manually initialized, when default-constructed `std::vector`s didn't. Simple oversight. ## PR Checklist * [x] Closes #8986 * [x] I work here * [x] A test would be great but ain't nobody got time for that. * [n/a] Requires documentation to be updated ## Validation Steps Performed Ran the terminal with ```json "schemes" : [ {} ] ``` First the crash repro'd, now it doesn't. (cherry picked from commit 9d71fa8)
…8995) ## Summary of the Pull Request Oops, winrt `IVector`s need to be manually initialized, when default-constructed `std::vector`s didn't. Simple oversight. ## PR Checklist * [x] Closes #8986 * [x] I work here * [x] A test would be great but ain't nobody got time for that. * [n/a] Requires documentation to be updated ## Validation Steps Performed Ran the terminal with ```json "schemes" : [ {} ] ``` First the crash repro'd, now it doesn't. (cherry picked from commit 9d71fa8)
🎉 Handy links: |
🎉 Handy links: |
Summary of the Pull Request
Oops, winrt
IVector
s need to be manually initialized, when default-constructedstd::vector
s didn't. Simple oversight.PR Checklist
Validation Steps Performed
Ran the terminal with
"schemes" : [ {} ]
First the crash repro'd, now it doesn't.