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

Editor exception

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

    Editor exception

    I was using the editor and typed in NinjaTrader. and as I pressed the . there was an exception. This is the call stack:

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.Reflection.ReflectionTypeLoadException: One or more of the types in the assembly unable to load.
    at System.Reflection.Module.GetTypesInternal(StackCra wlMark& stackMark)
    at System.Reflection.Assembly.GetTypes()
    at ActiproSoftware.SyntaxEditor.IntelliPromptMemberLi st.GetItemReflectionForAssemblyNamespacesAndTypes( Assembly[] assemblies, IntelliPromptNamespaceAndTypeFlags[] flags, StringCollection namespaceNames, Type mustInheritFrom, Boolean ignoreCase)
    at ActiproSoftware.SyntaxEditor.IntelliPromptMemberLi st.AddReflectionForAssemblyNamespacesAndTypes(Asse mbly[] assemblies, IntelliPromptNamespaceAndTypeFlags[] flags, StringCollection namespaceNames, Type mustInheritFrom, Boolean ignoreCase)
    at NinjaTrader.Gui.Code.Editor.OnTrigger(Object sender, TriggerEventArgs e)
    at ActiproSoftware.SyntaxEditor.SyntaxEditor.OnTrigge r(TriggerEventArgs e)
    at ActiproSoftware.SyntaxEditor.SyntaxEditor._1(Edito rView , Keys , Char , Boolean )
    at ActiproSoftware.SyntaxEditor.SyntaxEditor.OnKeyPre ss(KeyPressEventArgs e)
    at System.Windows.Forms.Control.ProcessKeyEventArgs(M essage& m)
    at System.Windows.Forms.Control.ProcessKeyMessage(Mes sage& m)
    at System.Windows.Forms.Control.WmKeyChar(Message&amp ; m)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
    at ActiproSoftware.SyntaxEditor.SyntaxEditor.WndProc( Message& m)
    at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
    at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    #2
    imported post

    I can not reproduce here.

    1) What release are you running on?
    2) Please
    - terminate NT
    - remove <install>\bin\Custom\NinjaTrader.Custom.d ll
    - start NT
    - pull up any custom or system indicator file
    - right click -> compile
    - try again typign in "NinjaTrader."

    Comment


      #3
      imported post

      That fixed it - thanks.

      After I posted that I discovered that it was happening will all packages and not just the NinjaTrader package so must have been something to do with the first time that I ran that version of Ninja.

      I'm running the most recent version that could be downloaded as of yesterday (3/17).

      Comment


        #4
        imported post

        Thanks. So it was 5.1.1000.1.

        What version had you installed before?

        Comment


          #5
          imported post

          Yes 5.1.1000.1

          Previously installed was one of the betas that included Ninja Script - I can't remember which one.

          Comment


            #6
            imported post

            Thanks for feedback.

            Comment


              #7
              Exception caused by ActiproSoftware

              For both NT 6.5.1000.14 and NT 7.0.0.5

              When you open an indicator with the NT editor and then quickly turn the mouse wheel to scroll down the code of an indicator, this may cause an exception. (This happens before any modification of the code, just looking at the indicator). I have observed this problem regularly for all versions of NT 6.5. and also NT 7. Restart of NT solves the issue, next time I turn the mouse wheel slowly.....

              Please find below excerpt from the trace file of today relating to the exception:

              2009-12-06 16:34:39:031 in OnUnhandledThreadException
              2009-12-06 16:34:39:093 ********* exception trapped *********
              2009-12-06 16:34:39:093 Die Auflistung wurde geändert. Der Enumerationsvorgang kann möglicherweise nicht ausgeführt werden.
              2009-12-06 16:34:39:093 bei System.Collections.Hashtable.HashtableEnumerator.M oveNext()
              bei d.a(IDomType[] A_0, String A_1, DomBindingFlags A_2)
              bei ActiproSoftware.SyntaxEditor.Addons.DotNet.Dom.Dot NetProjectResolver.GetMember(IDomType contextType, IDomType targetType, String name, DomBindingFlags flags)
              bei ActiproSoftware.SyntaxEditor.Addons.CSharp.CSharpC ontext.a(Document A_0, CompilationUnit A_1, DotNetProjectResolver A_2)
              bei ActiproSoftware.SyntaxEditor.Addons.CSharp.CSharpC ontext.GetContextAtOffset(Document document, Int32 offset, CompilationUnit compilationUnit, DotNetProjectResolver projectResolver)
              bei ActiproSoftware.SyntaxEditor.Addons.CSharp.CSharpS yntaxLanguage.GetContext(SyntaxEditor syntaxEditor, Int32 offset, Boolean beforeOffset, Boolean forParameterInfo)
              bei ActiproSoftware.SyntaxEditor.Addons.DotNet.Dom.Dot NetSyntaxLanguage.a(DotNetLanguage A_0, SyntaxEditor A_1, Int32& A_2)
              bei ActiproSoftware.SyntaxEditor.Addons.CSharp.CSharpS yntaxLanguage.OnSyntaxEditorViewMouseHover(SyntaxE ditor syntaxEditor, EditorViewMouseEventArgs e)
              bei ActiproSoftware.SyntaxEditor.SyntaxLanguage.a(Synt axEditor A_0, EditorViewMouseEventArgs A_1)
              bei ActiproSoftware.SyntaxEditor.SyntaxEditor.b(Editor ViewMouseEventArgs A_0)
              bei ActiproSoftware.SyntaxEditor.EditorView.OnMouseHov er(MouseEventArgs e)
              bei ActiproSoftware.WinUICore.UIElement.ActiproSoftwar e.WinUICore.IInputElement.RaiseMouseHoverEvent(Mou seEventArgs e)
              bei ActiproSoftware.WinUICore.UIControl.OnMouseHover(E ventArgs e)
              bei System.Windows.Forms.Control.WmMouseHover(Message& m)
              bei System.Windows.Forms.Control.WndProc(Message& m)
              bei System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
              bei ActiproSoftware.SyntaxEditor.SyntaxEditor.WndProc( Message& m)
              bei System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
              bei System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
              bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

              Did not post it for NT 7, because it is a minor bug, but maybe you could check with ActiproSoftware the reasons for this.

              Comment


                #8
                Sorry, I could not reproduce on latest NT7B5. I started scrolling mouse wheel right after double clicking on the indicator file in the indicator dialog. Works no problem here.

                Comment


                  #9
                  Thankyou for answering, Dierk. This does not happen every time, but it only causes exceptions from time to time.

                  I just tried 5 times and could not reprocude it either. But I know it will happen again.

                  Comment


                    #10
                    FYI.
                    My NT editor has caused a crash in NT twice during the las few days.
                    NT version: 8.0.19.1 64-bit .

                    Today with the error message:
                    Unhandled exception: Unable to cast object of type ActiproSoftware.Text.Languages.DotNet.Ast.Implemen tation.QualifiedName to type ActiproSoftware.Text.Languages.DotNet.Ast.Implemen tation.Expression.

                    The day before yesterday with the error message:
                    Unhandled exception: Index was out of range. Must be non-negative and less than the size of the collection.
                    Parameter name: index
                    Unhandled exception: Exception has been thrown by the target of an invocation.

                    /poseidon_sthlm

                    Comment


                      #11
                      Hello poseidon_sthlm,

                      We can only investigate issues seen with the current version of the platform.

                      Please update to the latest version from the link below, and then please set up only what is necessary to reproduce the exception.



                      As this thread is for NinjaTrader 7 and is extremely old, please open a new thread in the NinjaTrader8 forums including a screenshot that shows what is necessary to reproduce the exception in the Strategy Builder. If you have encountered this exception with the NinjaScript Editor, please include copy of the source code file that has only what is necessary to encounter the exception.

                      NinjaScript source code is included in the Documents\NinjaTrader 8\bin\Custom\ folder. You may look in the Indicators or Strategies folder to find the CS file for the script in question and then add it to a zip file to share on the forums.

                      If you need further direction on how to open a new thread, please see the Forum FAQ - https://ninjatrader.com/support/forum/help

                      We look forward to assisting.
                      JimNinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by sidlercom80, 10-28-2023, 08:49 AM
                      168 responses
                      2,262 views
                      0 likes
                      Last Post sidlercom80  
                      Started by Barry Milan, Yesterday, 10:35 PM
                      3 responses
                      10 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by WeyldFalcon, 12-10-2020, 06:48 PM
                      14 responses
                      1,429 views
                      0 likes
                      Last Post Handclap0241  
                      Started by DJ888, 04-16-2024, 06:09 PM
                      2 responses
                      9 views
                      0 likes
                      Last Post DJ888
                      by DJ888
                       
                      Started by jeronymite, 04-12-2024, 04:26 PM
                      3 responses
                      41 views
                      0 likes
                      Last Post jeronymite  
                      Working...
                      X