Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

RC2 crashes. Bug in NinjaScript Editor

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

    RC2 crashes. Bug in NinjaScript Editor

    I was ironically trying to type the phrase "throw new Exception..." into a line in a new strategy, using NinjaScript Editor when NT (64bit) crashed.
    Here is the final line in the log file
    2016-10-19 16:58:54:106|0|4|Unhandled exception: Unable to cast object of type 'ActiproSoftware.Text.Languages.DotNet.Ast.Impleme ntation.QualifiedName' to type 'ActiproSoftware.Text.Languages.DotNet.Ast.Impleme ntation.Expression'.
    I am unable to reproduce the error, and dont particularly want to try.
    On restarting NT I had to re-enter the code for the new strategy, and got no problem. So its probably an obscure bug in the ActiproSoftware SyntaxEditor which I assume you are using.
    The point is that an exception raised in ActiproSoftware SyntaxEditor should not cause the whole of NT to crash. NT developers need to add some kind of try-catch wrapper around ActiproSoftware SyntaxEditor so if it throws an exception the problem is contained inside the NinjaScript Editor window.

    Here's the end of the trace file
    2016-10-19 16:58:54:076 *************** unhandled exception trapped ***************
    2016-10-19 16:58:54:076 Unable to cast object of type 'ActiproSoftware.Text.Languages.DotNet.Ast.Impleme ntation.QualifiedName' to type 'ActiproSoftware.Text.Languages.DotNet.Ast.Impleme ntation.Expression'.
    2016-10-19 16:58:54:106 System.InvalidCastException: Unable to cast object of type 'ActiproSoftware.Text.Languages.DotNet.Ast.Impleme ntation.QualifiedName' to type 'ActiproSoftware.Text.Languages.DotNet.Ast.Impleme ntation.Expression'.
    at #hSc.#ySc.#BWc(#iSc #3Bf, IAstNodeMatchCollection #5T)
    at #hSc.#ySc.#rWc(#iSc #3Bf, IAstNodeMatchCollection #5T)
    at #hSc.#zSc.CreateNode(IAstNodeMatchCollection #5T)
    at #hSc.#6Sc.#1Xc(EbnfProduction #ZVc, Int32 #fd)
    at #hSc.#WSc.#nXc(IParserState #Zb, #6Sc #6Sc, IDebugger #SBf)
    at #hSc.#WSc.Parse(IParserState #Zb, #6Sc #6Sc)
    at ActiproSoftware.Text.Parsing.LLParser.Implementati on.LLParserBase.Parse(IParseRequest request)
    at ActiproSoftware.Text.Parsing.Implementation.Thread edParseRequestDispatcher.#0Yc.#nXc(IParseRequest #FMc)
    at ActiproSoftware.Text.Parsing.Implementation.Thread edParseRequestDispatcher.#0Yc.#56c()
    at System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    Last edited by DaveE; 10-19-2016, 10:40 AM. Reason: added trace

    #2
    Thank you, DaveE.

    You are correct, we use ActiPro. Can you provide the code that triggered that event?

    Comment


      #3
      Can you provide the code that triggered that event?
      No this was lost when NT crashed. I was probably using either backspace or left navigation key at the point when Actipro triggered an exception.
      I suspect the bug may be due to a certain navigation sequence rather than just a fixed code structure.

      I am not expecting NT to spend time trying to fix a bug in Actipro. I am just asking for any exception from Actipro to be handled by the wrapping NT code in the NinjaScript Editor form, so it does not bring down the whole of NT.

      Here's an example of the behaviour of a fix that I would consider acceptable:
      If NT wrapper receives exception from Actipro, and the wrapper does not know how to silently solve the problem, then:
      NT wrapper logs the error and shows a MessageBox something like "Actipro error means this code editing session cannot continue. Do you want to save the current text?".
      Then NT closes the NinjaScript Editor form (after processing user response).

      Effect:
      The rest of NT is unaffected and user can re-open the Editor and continue. Hopefully the Actipro bug will not re-surface (since the user is unlikely to use the same navigation sequence).

      Comment


        #4
        I will forward your request to development.

        Comment


          #5
          FYI I just got the same problem again. My workaround until this is fixed will be "stop using NinjaScript Editor"
          Here's the end of the trace (looks about the same as before)
          2016-10-28 19:09:16:114 *************** unhandled exception trapped ***************
          2016-10-28 19:09:16:114 Unable to cast object of type 'ActiproSoftware.Text.Languages.DotNet.Ast.Impleme ntation.QualifiedName' to type 'ActiproSoftware.Text.Languages.DotNet.Ast.Impleme ntation.Expression'.
          2016-10-28 19:09:16:144 System.InvalidCastException: Unable to cast object of type 'ActiproSoftware.Text.Languages.DotNet.Ast.Impleme ntation.QualifiedName' to type 'ActiproSoftware.Text.Languages.DotNet.Ast.Impleme ntation.Expression'.
          at #hSc.#ySc.#BWc(#iSc #3Bf, IAstNodeMatchCollection #5T)
          at #hSc.#ySc.#rWc(#iSc #3Bf, IAstNodeMatchCollection #5T)
          at #hSc.#zSc.CreateNode(IAstNodeMatchCollection #5T)
          at #hSc.#6Sc.#1Xc(EbnfProduction #ZVc, Int32 #fd)
          at #hSc.#WSc.#nXc(IParserState #Zb, #6Sc #6Sc, IDebugger #SBf)
          at #hSc.#WSc.Parse(IParserState #Zb, #6Sc #6Sc)
          at ActiproSoftware.Text.Parsing.LLParser.Implementati on.LLParserBase.Parse(IParseRequest request)
          at ActiproSoftware.Text.Parsing.Implementation.Thread edParseRequestDispatcher.#0Yc.#nXc(IParseRequest #FMc)
          at ActiproSoftware.Text.Parsing.Implementation.Thread edParseRequestDispatcher.#0Yc.#56c()
          at System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
          at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
          at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
          at System.Threading.ThreadHelper.ThreadStart()

          Comment


            #6
            Hi Dave.

            Just wanted to let you know we this issue is on our radar. We're working with actipro but without being able to reproduce - a solution is not so easy as you proposed.

            Are there any EventViewer Application Log Event at the time of the crash you can provide? If so, please highlight those entires-> right click -> save selected events -> Save as type "Text" and either upload to this forum or email to platformsupport[at]ninjatrader[dot]com

            Thanks
            MatthewNinjaTrader Product Management

            Comment


              #7
              As an update, we are working with ActiPro on this behavior still. The parties responsible for identifying and resolve this behavior have requested:

              - The file which was edited
              - Details on what editing actions had been performed

              If anyone experiencing this issue can provide those details, it would be very helpful in allowing us to isolate these bugs.

              Thanks
              MatthewNinjaTrader Product Management

              Comment


                #8
                - The file which was edited
                This is lost each time due to the crash. I assume if the exception from Actipro was handled by NT better (see my suggestion in post 3) this file could be preserved in future releases of NT.

                Details on what editing actions had been performed
                I was probably using backspace at the time of both crashes (probably after making a typo due to typing too fast). Perhaps Actipro has a speed limit.

                Comment


                  #9
                  Originally posted by DaveE View Post
                  This is lost each time due to the crash. I assume if the exception from Actipro was handled by NT better (see my suggestion in post 3) this file could be preserved in future releases of NT.


                  I was probably using backspace at the time of both crashes (probably after making a typo due to typing too fast). Perhaps Actipro has a speed limit.
                  To clarify, the entire file is lost?

                  We understand that the crash prevents you from saving, but the previous file should still be on the system. If you are seeing otherwise, that is something we were not aware of.

                  We've discussed your consideration with the parties involved however, it just is not a possibility. They have noted they need the exact text that triggered the exception as wall as the details around what was being edited. Again, I understand that the exact text cannot be recalled from the system since you do not have a chance to save it, but if it can be recalled through your memory, it can be helpful in helping us isolate this behavior with between our software and this 3rd party.

                  It was also noted in our conversations that there are several factors in reproducing, such as the speed you are typing and the editor parses that info, or typing in a certain text area. This in itself will make it difficult to reproduce, but if you can provide us the general details, including the file and where and what you were typing, our QA can try to work through various scenarios to try and reproduce it.
                  MatthewNinjaTrader Product Management

                  Comment


                    #10
                    the entire file is lost?
                    Yes.
                    If you create a new strategy in NinjaScript Editor by right clicking Strategies, select New Strategy, give it a new name (say StratNew) then click Generate. This does not create a file.
                    Now type as much code as you like, then right click the tab, select Close Tab, select Save Changes "No".
                    Result: You will see there is no StratNew file in the strategies folder.
                    So if ActiPro crashes while adding code to a new strategy (before user does explicit Save or Compile) there never was a "previous file" on disk.

                    where and what you were typing
                    In both cases I had NinjaScript Editor window maximized.
                    I dont have a photographic memory but the first time this crash happened (post 1), I was probably working towards creating the file attached to this post and was probably using backspace somewhere around the word Exception.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by PaulMohn, Today, 03:49 AM
                    0 responses
                    5 views
                    0 likes
                    Last Post PaulMohn  
                    Started by inanazsocial, Today, 01:15 AM
                    1 response
                    8 views
                    0 likes
                    Last Post NinjaTrader_Jason  
                    Started by rocketman7, Today, 02:12 AM
                    0 responses
                    10 views
                    0 likes
                    Last Post rocketman7  
                    Started by dustydbayer, Today, 01:59 AM
                    0 responses
                    2 views
                    0 likes
                    Last Post dustydbayer  
                    Started by trilliantrader, 04-18-2024, 08:16 AM
                    5 responses
                    23 views
                    0 likes
                    Last Post trilliantrader  
                    Working...
                    X