-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 - ToolTipService.GetBetweenShowDelay ArgumentNullException #4048
Comments
Please link the relevant issue. My guess is they didn't fix the problem in all cases. You'll need to get the WPF team to fix the bug. Closing as not something I can fix, same code works in .Net 4.x |
Looks like dotnet/wpf#4623 introduced the bug. |
@amaitland The same what I read but it still happend. I made a Ticket by the WPF Team .. but i need a workaround to avoid this problem until they fix it. it happens now with .Net 6 .. the app was .Net 5 and it runs without problems! |
The PR doesn't fix the bug, it is the cause of the bug.
Please post a link back here for reference.
You may need to revert to .Net 5.0 until this is fixed. If the WPF team can provide a workaround then this issue can be reopened.
Rollback to .Net 5 until this is fixed would be the option I'd be considering. |
Issue dotnet/wpf#6319 |
Another report of this With this new information it might be worth trying to temp remove the |
@amaitland |
- Override the OnTooltipTextChanged method to customise display of browser tooltip Related to issue #4048
The problem still exists, they haven't merged the fix yet. There are still three open The demo provided in dotnet/wpf#7002 changed to target From what I can gather they've also introduced the bug into |
- Can set initial show delay in xaml via existing ToolTipService e.g. ToolTipService.InitialShowDelay="100" - If InitialShowDelay = 0 then no timer is used and ToolTip is immediately shown - Previous delay was 500ms, new delay is the .Net default (typically 1000ms) Related to issue #4048
Starting in version Something like the following will open the tooltip directly without using the internal class ChromiumWebBrowserEx : ChromiumWebBrowser
{
protected override void OnTooltipTextChanged(string oldValue, string newValue)
{
if(string.IsNullOrEmpty(oldValue) && string.IsNullOrEmpty(newValue))
{
return;
}
OpenOrCloseToolTip(newValue);
}
} |
PR #4389 will add a means to configure the delay before the tooltip opens, when merged you'll also be able to set the delay to |
So we have been getting this crash at least 30 times per day. We have a WPF application that hosts the CefSharp Chromium browser. So after a bit of fiddling around I was able to fix this crash within our code by attaching to the "ToolTipOpening" event and setting "e.Handled" to true.
This is our setup:
Not sure why it works but thought it might help others. |
Bug Report
The App (Process) terminate. This bug was known and i read it will be solved with .Net 6.0.3.
Now i installed the .Net 6.0.3 but it still terminate the app. See please the exception below.
BTW: I don't use any Tooltip in my App and i deactivated the tooltip in the browser
What version of the product are you using?
What architecture x86 or x64?
x64
What version of .Net?
.Net 6.0.3
On what operating system?
Win10
Are you using
WinForms
,WPF
orOffScreen
?WPF
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Please provide any additional information below.
Application: Project.exe
CoreCLR Version: 6.0.322.12309
.NET Version: 6.0.3
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentNullException: Value cannot be null. (Parameter 'element')
at System.Windows.Controls.ToolTipService.GetBetweenShowDelay(DependencyObject element)
at System.Windows.Controls.PopupControlService.CloseToolTip(ToolTip tooltip)
at System.Windows.Controls.PopupControlService.OnPostProcessInput(Object sender, ProcessInputEventArgs e)
at System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(Tuple`2 postProcessInput, ProcessInputEventArgs processInputEventArgs)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.MouseDevice.Synchronize()
at System.Windows.Input.MouseDevice.ChangeMouseCapture(IInputElement mouseCapture, IMouseInputProvider providerCapture, CaptureMode captureMode, Int32 timestamp)
at System.Windows.Input.MouseDevice.Capture(IInputElement element, CaptureMode captureMode)
at CefSharp.Wpf.ChromiumWebBrowser.OnMouseDown(MouseButtonEventArgs e) in C:\projects\cefsharp\CefSharp.Wpf\ChromiumWebBrowser.cs:line 2239
at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run()
at Application.Desktop.App.Main()
The text was updated successfully, but these errors were encountered: