-
Notifications
You must be signed in to change notification settings - Fork 9k
Re-enable web-source icons in Stable and Preview builds #19137
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
Conversation
|
@DHowett this might be something I am doing wrong but I started seeing a crash for the commandHistory suggestion source after merging this. To repro: it usually triggered when I searched for something and then ctrl+backspace to clear the search. (Sometimes I had to do that a couple times). I couldn't repro it after commenting out this line
|
|
Strange! I would expect the earlier PR about PaletteItem composition/inheritance to be the culprit. I can't pull up the number now from my phone however. :) |
|
@e82eric if you enable Exceptions>Win32>WinRT Originate, you may find the first failure that leads to these log messages and the eventual catch. (If you enable it for process start-up you will also have to Continue through a few of them, because regrettably the Foundation.Collections module uses exception handling for flow control (TryLookup is just a try/catch around Lookup :p)) |
ahh, that is so good (this would have saved me so much time). Now I can see the exact stacktrace |
I have a feeling you are right that it is the PaletteItem one, I didn't property bisect the commits and jumped to the conclusion it was the icon one from looking at the commit messages. |
|
I am in way over my head as far as how xaml templates vs controls work (and c++ in general). But I "think" what is happening is the _resolvedIcon field was getting reused across instances and getting in a invalid state. I don't see the crash after removing the !_resolvedIcon (but doing that probably causes the icon to be resolved way more times than is intended). |
|
Hah, that was a last-minute throw-in too. I'll have a look tomorrow. Thank you for tracking it down :) |
|
The weird thing is, if it were null it should fail immediately after when it calls Icon (on this as T*). I suppose that only matters if Icon is implemented? If Icon is not implemented, the null pointer passes through harmlessly. But there's still something calling methods on a null PaletteItem 😱 |
|
@e82eric I can't reproduce this at the tip of your PR branch unfortunately! Even on Windows 10! |
|
just to double check were you testing with the scrollBack source or the commandHistory source. I had commented out the icon on the scrollBack source |
|
I tried to set up a scrollBack suggestion source. Let me try with command history. :) |
|
ahh that makes sense, if you uncomment this line it should repro with the scrollBack source also. |
|
Uh, the XAML bindings are attempting to set the ContentPresenter's content to the ContentPresenter. |
|
Okay, this is something we didn't really account for (but should have.) IconElements are UI elements. They can't be cached and moved between UI surfaces willy-nilly. The issue occurs when something with an icon changes physical position in the list due to filtering, and the IconElement has to get reparented to a new list item. |
|
great catch |

Disables a controversial part of #19044.
Refs #19075