question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(ToolTip ) System.ArgumentNullException: Value cannot be null. (Parameter 'element')

See original GitHub issue
  • .NET Core Version: 6.0.3
  • Windows version: Win10
  • Does the bug reproduce also in WPF for .NET Framework 4.8?: Repros on .NET 4.8.1 only.
  • Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc…)?: No

Problem description: App Crash … the Problem should be resolved but it comes again and again.

BTW: I don’t use any Tooltip in my App, regardless the problem come again and again during the working!

Actual behavior:

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()

Expected behavior: App should not be crashed

How could i solve the Problem fastly ?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:56 (15 by maintainers)

github_iconTop GitHub Comments

5reactions
fresche-gavincommented, Oct 14, 2022

Many of our customers are experiencing this exception (and exact same call stack) as well. Not sure if this helps, but just thought I’d add what we have found:

  • Our application is .Net Framework 4.8 (not .Net 6.0)
  • Our application also uses CefSharp (a fairly old version: 75.1.143.0)
  • All users who have reported the crash have been on Windows 11

Steps to replicate:

  • Hover over a CEF (browser) button until a tooltip shows
  • Wait for 5 seconds or so and move to another button and wait again for another tooltip
  • It usually crashes at this point (sometimes need to repeat the above steps a few times)

Our devs were unable to replicate this on a Windows 10 development machine (with just the .Net 4.8 framework installed), But if they downloaded and installed .Net 4.8.1, they CAN reproduce it with the same application (not rebuilt) fairly easily.

In Windows 10 (with .Net 4.8), after waiting sufficiently long enough, the tooltip auto-disappears. After installing .Net Framework 4.8.1, we noticed the tooltip does not auto-disappear.

We have tried various combinations of the Switch.UseLegacyToolTipDisplay and related settings mentioned in the article in the previous post, but with no success.

It’s a little embarrassing as we have no way to trap the exception, and some users are getting this exception many times a day.

2reactions
czdietrichcommented, Nov 23, 2022

If I understood correctly, they can already reproduce the issue and have a fix for it. But unfortunately, there is no new information since.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dot Net 6 - ToolTips Sometimes Throw Exceptions Due To ...
(Parameter 'element') System.ArgumentNullException: Value cannot be null. (Parameter 'element') at System.Windows.Controls.ToolTipService.
Read more >
ArgumentNullException: Value cannot be null. (Parameter ' ...
ArgumentNullException : Value cannot be null. (Parameter 'items'). The error code is reported in two lines Select in View. Please help me.
Read more >
Value cannot be null. (Parameter 'name')
When passing XField parameters with "null" value to TreeList component, it throws "ArgumentNullException: Value cannot be null.
Read more >
Android Linker ArgumentNullException XALNK7003
Common.targets(5,5): Error XALNK7003: System.ArgumentNullException: Value cannot be null. Parameter name: declaringType at Mono.Cecil.Mixin.
Read more >
XDDS:19D4A596 - Value cannot be null - Parameter name
Error Id: XDDS:19D4A596 Exception: System.Reflection.TargetInvocationException Exception has been thrown by the target of an invocation. at Citrix.Console.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found