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

ArgumentNullException in ToolTipService.GetBetweenShowDelay #8600

Closed
lindexi opened this issue Dec 25, 2023 · 2 comments · Fixed by dotnet-campus/dotnetCampus.CustomWpf#27
Closed

Comments

@lindexi
Copy link
Member

lindexi commented Dec 25, 2023

Description

The stacktrace:

System.ArgumentNullException: Value cannot be null. (Parameter 'element')
   in int ToolTipService.GetBetweenShowDelay(DependencyObject element)
   in void PopupControlService.CloseToolTip(ToolTip tooltip)
   in void PopupControlService.OnPostProcessInput(object sender, ProcessInputEventArgs e)
   in void InputManager.RaiseProcessInputEventHandlers(Tuple<ProcessInputEventHandler, Delegate[]> postProcessInput, ProcessInputEventArgs processInputEventArgs)
   in bool InputManager.ProcessStagingArea()
   in bool InputManager.ProcessInput(InputEventArgs input)
   in void MouseDevice.Synchronize()
   in void MouseDevice.ChangeMouseCapture(IInputElement mouseCapture, IMouseInputProvider providerCapture, CaptureMode captureMode, int timestamp)
   in bool MouseDevice.Capture(IInputElement element, CaptureMode captureMode)
   in bool UIElement.CaptureMouse()

Reproduction Steps

Be looking for...

Expected behavior

Work well

Actual behavior

Throw exception

Regression?

No response

Known Workarounds

No response

Impact

No response

Configuration

No response

Other information

No response

@lindexi
Copy link
Member Author

lindexi commented Dec 25, 2023

Duplicate of #6319

@lindexi
Copy link
Member Author

lindexi commented Dec 25, 2023

I'm concerned that the fix for #7417 may not have completely resolved the issue. The reason being, I noticed no changes when I cherry-picked the changes from #7417 into my code branch. Please refer to dotnet-campus/dotnetCampus.CustomWpf#27. This implies that my code has already incorporated the fix. However, I'm still receiving the same exception message.

Upon reviewing the code, I found that the ToolTip parameter in the PopupControlService.CloseToolTip method comes from a _currentToolTip field. This suggests that it's indeed possible to get a null Owner during the MouseDevice.Capture process.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant