Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

System.ArgumentNullException: Value cannot be null. Parameter name: handler

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    System.ArgumentNullException: Value cannot be null. Parameter name: handler

    Hello,

    sometimes during the day I get an error message of an unhandled exception as soon as I activate one of my charts. If I close the message window and activate the same chart again it repeats but only for this one chart.

    Click image for larger version

Name:	image.png
Views:	363
Size:	3.3 KB
ID:	1289014

    The only speciality of this chart in my opinion is that is contains two data series of the same instrument (Range + Min Bars).

    If I interpret the trace entries correctly the message comes from Windows somehow:

    Code:
    2024-01-31 09:50:38:901 *************** unhandled exception trapped ***************
    2024-01-31 09:50:38:901 Value cannot be null.
    Parameter name: handler
    2024-01-31 09:50:38:901 System.ArgumentNullException: Value cannot be null.
    Parameter name: handler
    at System.Windows.EventRoute.Add(Object target, Delegate handler, Boolean handledEventsToo)
    at System.Windows.UIElement.AddToEventRoute(EventRout e route, RoutedEventArgs e)
    at System.Windows.UIElement.BuildRouteHelper(Dependen cyObject e, EventRoute route, RoutedEventArgs args)
    at System.Windows.UIElement.RaiseEventImpl(Dependency Object sender, RoutedEventArgs args)
    at System.Windows.UIElement.RaiseTrustedEvent(RoutedE ventArgs args)
    at System.Windows.Input.InputManager.ProcessStagingAr ea()
    at System.Windows.Input.InputManager.ProcessInput(Inp utEventArgs input)
    at System.Windows.Input.InputProviderSite.ReportInput (InputReport inputReport)
    at System.Windows.Interop.HwndMouseInputProvider.Repo rtInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
    at System.Windows.Interop.HwndMouseInputProvider.Filt erMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at System.Windows.Interop.HwndSource.InputFilterMessa ge(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.Internal RealCall(Delegate callback, Object args, Int32 numArgs)
    at System.Windows.Threading.ExceptionWrapper.TryCatch When(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
    2024-01-31 09:51:07:139 *************** unhandled exception trapped ***************
    2024-01-31 09:51:07:139 Value cannot be null.
    Parameter name: handler
    2024-01-31 09:51:07:139 System.ArgumentNullException: Value cannot be null.
    Parameter name: handler
    at System.Windows.EventRoute.Add(Object target, Delegate handler, Boolean handledEventsToo)
    at System.Windows.UIElement.AddToEventRoute(EventRout e route, RoutedEventArgs e)
    at System.Windows.UIElement.BuildRouteHelper(Dependen cyObject e, EventRoute route, RoutedEventArgs args)
    at System.Windows.UIElement.RaiseEventImpl(Dependency Object sender, RoutedEventArgs args)
    at System.Windows.UIElement.RaiseTrustedEvent(RoutedE ventArgs args)
    at System.Windows.Input.InputManager.ProcessStagingAr ea()
    at System.Windows.Input.InputManager.ProcessInput(Inp utEventArgs input)
    at System.Windows.Input.InputProviderSite.ReportInput (InputReport inputReport)
    at System.Windows.Interop.HwndMouseInputProvider.Repo rtInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
    at System.Windows.Interop.HwndMouseInputProvider.Filt erMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at System.Windows.Interop.HwndSource.InputFilterMessa ge(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.Internal RealCall(Delegate callback, Object args, Int32 numArgs)
    at System.Windows.Threading.ExceptionWrapper.TryCatch When(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
    2024-01-31 09:53:30:531 Shutting down NinjaTrader​
    What could be the problem here and how can I avoid it?

    Many thanks
    Last edited by Joerg; 01-31-2024, 04:34 AM.

    #2
    Hello Joerg,

    Thanks for your post.

    Please write in to support[at]ninjatrader[dot]com with a brief description of the behavior you are reporting and attach your Log and Trace files to the email by following the steps below so we may investigate this matter further.

    In the subject of your email include ATTN: Brandon H and in the body of the email include a link to this forum post.

    Follow the steps below to manually attach your log and trace files to your email.
    • Open your NinjaTrader folder under, "Documents" (sometimes called, "My Documents")
    • Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
    • Send the 2 compressed folders as attachments to this email.
    • Once complete, you can delete these compressed folders.
    We look forward to assisting further.​
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      What was the resolution?

      Exact same messages in the trace file.
      Happens on any keystroke - like Ctrl. No indicators on chart.


      Code:
      2025-03-27 11:31:40:420 *************** unhandled exception trapped ***************
      2025-03-27 11:31:40:420 Value cannot be null.
      Parameter name: handler
      2025-03-27 11:31:40:420 System.ArgumentNullException: Value cannot be null.
      Parameter name: handler
         at System.Windows.EventRoute.Add(Object target, Delegate handler, Boolean handledEventsToo)
         at System.Windows.UIElement.AddToEventRoute(EventRoute route, RoutedEventArgs e)
         at System.Windows.UIElement.BuildRouteHelper(DependencyObject e, EventRoute route, RoutedEventArgs args)
         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.InputManager.ProcessInput(InputEventArgs input)
         at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
         at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
         at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
         at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
         at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
         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)​

      Comment


        #4
        Hello Joerg,


        Thank you for posting on the NinjaTrader forums.


        Please use the aforementioned instructions to submit your request to clientservices@ninjatrader[dot]com



        Thank you in advance.

        Comment


          #5
          Was there a resolution to the previous issue?

          Comment


            #6
            Hello Bidder,


            I'm not able to see what the outcome was but our Technical Support team can assist further if you submit your files.


            Thanks!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            60 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            39 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            21 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            23 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            51 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X