Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix NRE when tooltip closing(#381) #2167
I'm not sure this is the right fix, this might just be supressing the symptoms and leave the bug unfixed.
I'd like to get the problem getting looked at closer before suppressing it with a seemlingly redundant check. If the method is reentrant there might be more that needs to be done to make sure the logic executes correctly. For example you might want to make sure not to call
In either case it definitely needs adding a comment (preferrably after debugging and understanding whats happening here), otherwise you are at risk that someone removes the seemingly redundant
As you said, this method is re-entered during processing. I recognized this and created this pull request.
Your suggestion will be a re-implementation of this method, so I want someone to do it in another pull request. I'm doing it if I can, but I'm not yet familiar with the WPF code.
This PR is intended to correct a small part of WPF that has been stable for a long time. There is only one revision.
I agree that comments are needed. I will add a comment.
As you can see, I am not good at English. I will give you a little time.
The problem with your fix is that it still will raise the event twice, so while it may not crash anymore you haven't fixed the problem of
I don't think a reimplementation will be necessary, but I didn't debug it so I can't tell for sure. The problem with doing it in another PR is that if there is too much time between fixing the crash people may start accidentally depending on the broken event order and then it'll be too late to fix the event. The WPF project isn't exactly seeing a lot of action so I want to make sure this is fixed correctly while its impossible for people to depend on the reentrant event ordering.
That doesn't mean you have to do the other fix, I just want to bring it to the attention of the WPF team.