Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unhandled Exception while editing/compling scripts

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

    Unhandled Exception while editing/compling scripts

    Hi,

    I am experiencing again full NT6beta11 crashes while editing and complinga scipt. This time the exception is a System.NullReferenceException - see below for call stack copy.

    After every crashI lose all my workspace settings and NT brings up the installer at restart. I have to set up all my charts again when I restart NT (but database seems to be intact). I wish there were a "Save Workspace as ..." menu item with the corresponding "Load Workspace ..." in the File menu or wherever. It would save a lot of time...

    I had so far about 5-6 full crashes with the same error message today. Don't know what I am doing wrong...

    TIA for help.

    Peter



    Copy of Exception text:

    ************** Exception Text **************
    System.NullReferenceException: Object reference not set to an instance of an object.
    at SourceGrid2.Selection.OnCellLostFocus(CellLostFocu sEventArgs e)
    at SourceGrid2.Selection.Focus(Position pCellToSetFocus)
    at SourceGrid2.Cells.Real.Cell.LeaveFocus()
    at SourceGrid2.Grid.RemoveCell(Int32 row, Int32 col)
    at SourceGrid2.Grid.m_Rows_RowsAdded(Object sender, IndexRangeEventArgs e)
    at SourceGrid2.IndexRangeEventHandler.Invoke(Object sender, IndexRangeEventArgs e)
    at SourceGrid2.RowInfo.RowInfoCollection.OnRowsAdded( IndexRangeEventArgs e)
    at SourceGrid2.RowInfo.RowInfoCollection.InsertRange( Int32 p_StartIndex, Int32 p_Count)
    at SourceGrid2.RowInfo.RowInfoCollection.Insert(Int32 p_Index)
    at NinjaTrader.Gui.Grid.NTGrid.InsertRow(Int32 rowIndex)
    at NinjaTrader.Gui.Grid.NTGrid.AppendRows(Int32 rows)
    at NinjaTrader.Code.Editor.set_CompilerResults(Compil erResults value)
    at NinjaTrader.Code.Editor.Compile()
    at NinjaTrader.Code.Editor.OnToolbarClick(Object sender, EventArgs e)
    at System.Windows.Forms.ToolStripItem.RaiseEvent(Obje ct key, EventArgs e)
    at System.Windows.Forms.ToolStripButton.OnClick(Event Args e)
    at System.Windows.Forms.ToolStripItem.HandleClick(Eve ntArgs e)
    at System.Windows.Forms.ToolStripItem.HandleMouseUp(M ouseEventArgs e)
    at System.Windows.Forms.ToolStripItem.FireEventIntera ctive(EventArgs e, ToolStripItemEventType met)
    at System.Windows.Forms.ToolStripItem.FireEvent(Event Args e, ToolStripItemEventType met)
    at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEven tArgs mea)
    at System.Windows.Forms.Control.WmMouseUp(Message&amp ; m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
    at System.Windows.Forms.ToolStrip.WndProc(Message&amp ; m)
    at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)





    #2
    imported post

    Please provide detailed steps in order to reproduce.

    Thanks

    Comment


      #3
      imported post

      Sorry, Dierk, it isvery hardto give more details. It happens apparently at random times. I add something (a single line) to a working script, hit compile and 99 of 100times it works (gives either a compile error if I made a mistakeor compiles fine). But every now and then - I can't figure exactly what conditions tiggers this - I get the unhandled exeption error and NT6 crash. When I restart and compile the same unchanged script, there is usually a simple compile error (such as a typo in a variable name and the misspelled name was unknown, or a double to int cast has to be made explicit - these are the last two compile errors I remember that came up immediately after the crash.) butnowI getjust the compile error without crash.

      The pattern is (about 1 out of 100 times):

      Compile -> Crash -> Restart NT -> Compile SAME script without changes -> no crash but showing a simple compile time error which is quickly fixed.

      It is very hard to reproduce, but it happend today about 5-6 times.

      cheers

      Peter

      PS: I turned off 'Inliny Syntax Checking', but that didn't help.


      Comment


        #4
        imported post

        Is it related to a particular strategy or can you reproduce with "any" strategy?

        Comment


          #5
          imported post

          I didn't try with *every* strategy, but I know for sure it happened with 2 very different ones (both my 'dubious' creations, not the ones shipped with NT).

          I made a screenshot from when it happened about the 3rd time earlier today. I don't remember exactly what the compilation error was at this particular recompile. They are always different...

          I try to take better notes when it happens again...

          cheers

          Peter

          PS: smells a bit like a threading issue - happens at random times in apparently random contexts...?


          Attached Files

          Comment


            #6
            imported post

            This is a different one, than reported below. I neither saw that before. However, I just added some code which should prevent this from happening.

            Comment


              #7
              imported post

              Thanks,

              Peter


              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by PaulMohn, Today, 05:00 AM
              0 responses
              6 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