Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Tons of unhandled exceptions in nt

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

    Tons of unhandled exceptions in nt

    I tried to catch whatever unhandled exceptions were there in NT, with this code (from inside my addon):

    Code:
        ...
        AppDomain.CurrentDomain.FirstChanceException += HandleUnhandledException;
       ...
    
    public static bool inCatchAllLoop = false;
    public static void HandleUnhandledException(object  sender, object e)
            {
                if (!inCatchAllLoop)
                {
                    inCatchAllLoop = true;
                    var finalStr = "";
                    if (e is UnhandledExceptionEventAr gs)
                        finalStr = ((UnhandledExceptio nEventArgs)e).ExceptionObject.ToString();
                    else if (e is System.Runtime.Excep tionServices.FirstChanceExceptionEventArgs)
                        finalStr = ((System.Runtime.Ex ceptionServices.FirstChanceExceptionEventArgs)e).E xception.ToString();
                    else
                        finalStr = e.ToString();
    
                     try{
                        System.IO.File.Append("..myTempFile",  finalStr );
                    }
                    catch(Exception ex2){ }
                    inCatchAllLoop = false;  
                }
            }

    There has been tons of unhandled exceptions cought (though, 90% of them were just same error repeated 100's of times, like "coulndt find file Ninjatrader.Gui.Serializers... etc." )

    Could you debug NT app and fix all unhandled exceptions that live within NT (without other addons being a reason).

    #2
    Hello ttodua,

    Thank you for your post.

    If you are reporting a specific issue with NinjaTrader, we are happy to look into it following the steps needed to reproduce an issue. Subscribing to the FirstChanceException event may not mean that you are hitting an actual issue at all. We would suggest using the log tab of the Control Center to identify exceptions that may be an actual issue.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Well, I understand, however I see such occasions:

      Code:
      •System.IO.FileNotFoundException: Could not load file or assembly 'NinjaTrader.Gui.XmlSerializers, Version=8.0.23.2, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
      File name: 'NinjaTrader.Gui.XmlSerializers, Version=8.0.23.2, Culture=neutral, PublicKeyToken=null'
      at System.Reflection.RuntimeAssembly._nLoad(AssemblyN ame fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
      at System.Reflection.RuntimeAssembly.InternalLoadAsse mblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
      for years, NT team was ignorant for developers requests, and what was 7 years ago, that is still today.
      There are tons of cases, when in NT, we just get this:
      Click image for larger version  Name:	KSNxd1b.png Views:	0 Size:	4.8 KB ID:	1162059
      Click image for larger version

Name:	lRj6ae0.png
Views:	132
Size:	8.3 KB
ID:	1162060

      without any further info or trace detail to be available (i.e. show more details or whatever button in that NT error message).
      thats why it is necessary to waste hours to develop custom error-catcher.
      Yes, NT could have developer more helpful things for developers, but as is..

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by PaulMohn, Today, 05:00 AM
      0 responses
      8 views
      0 likes
      Last Post PaulMohn  
      Started by ZenCortexAuCost, Today, 04:24 AM
      0 responses
      6 views
      0 likes
      Last Post ZenCortexAuCost  
      Started by ZenCortexAuCost, Today, 04:22 AM
      0 responses
      3 views
      0 likes
      Last Post ZenCortexAuCost  
      Started by SantoshXX, Today, 03:09 AM
      0 responses
      16 views
      0 likes
      Last Post SantoshXX  
      Started by DanielTynera, Today, 01:14 AM
      0 responses
      5 views
      0 likes
      Last Post DanielTynera  
      Working...
      X