Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Froze Script Editor

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

    Froze Script Editor

    I got a strange situation while working on a NinjaScript program that uses OnMarketData/Depth. Within those overrides were classes that were no initialized.


    In the output window I got an error stating the class was not initialized "
    Error on calling 'OnMarketDepth' method on bar 7977: Object reference not set to an instance of an object." and then the box below popped up. I started to simply "IGNORE" this box maybe 10 times, then the editor Froze.

    Most of the rest of the system was responsive, it was in Playback mode.
    Attached Files

    #2
    This could be a bug in our code or a bug in your code (If I understand you right and your working with OnMarketData handlers)

    Essentially it means you tried to unsubscribe an event handler but it didn't exist if I'm reading the error correctly.

    Lets start here->

    You working with any event handlers in your code?

    Can you reproduce the problem?
    BrettNinjaTrader Product Management

    Comment


      #3
      I wrote a quick Strategy & indicator that produces the error shown in #1. This might help you find the exception. This seems like an awfully deep catch which messed up something. deep in the initialization.
      Attached Files

      Comment


        #4
        This will be fixed with NT8B2, issue #8181. Thanks for reporting.

        On your script (in case it's not clear); the problem was exhibited by a coding bug where you did not instantiate 'm_dummyClassNotInitialized' before calling 'm_dummyClassNotInitialized.Failed()'

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        669 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        378 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        580 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X