Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ownership and crashes.

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

    Ownership and crashes.

    One problem I'm having is the simple Draw.TextFixed method. In OnBarUpdate() I am trying to assign alternate colors to a Draw.TextFixed string from some predefined color variables. If I refresh (F5) the chart, 75% of the time I get an ownership error. The other times it works fine. NT8 crashed on me yesterday and twice today when rapidly refreshing the chart to get the indicator to render properly or at all. Once today I un-commented one line of code and F5'ed the chart and it crashed. Attached is some of the error messages from the log including the crash error.

    Dan
    Attached Files
    eDanny
    NinjaTrader Ecosystem Vendor - Integrity Traders

    #2
    Hello,

    Please see this thread for whats likely going on: http://www.ninjatrader.com/support/f...ghlight=freeze

    Comment


      #3
      Hi Brett, I read that thread when it was active. All the brushes that do not change were already frozen. This one brush was defined with the other variables and assigned a new color from one of the frozen brushes as code dictates in OnBarUpdate(). I have now fozen this brush in State.Configure and clone it and change the color of the clone in OnBarUpdate() but I still get the OnRender() error 2/3rd the times I F5 the chart (along with the 'Object reference not set to an instance of an object.' error). Seems it makes no difference.
      eDanny
      NinjaTrader Ecosystem Vendor - Integrity Traders

      Comment


        #4
        Ah I see, I just saw the threading issue in the log and thought that was the issue.

        To be clear object reference not set and the ownership error likely are two different issues then.

        Can you send me a version of the code via skype or brett.barrett [at] ninjatrader [dot] com and I can take a quick look.
        Last edited by NinjaTrader_Brett; 06-10-2015, 07:46 PM.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by leojimenezp, 04-20-2024, 05:49 PM
        4 responses
        47 views
        0 likes
        Last Post leojimenezp  
        Started by nicthe, Today, 09:24 AM
        1 response
        5 views
        0 likes
        Last Post nicthe
        by nicthe
         
        Started by samish18, Today, 10:13 AM
        0 responses
        6 views
        0 likes
        Last Post samish18  
        Started by kenz987, Yesterday, 10:20 AM
        2 responses
        13 views
        0 likes
        Last Post kenz987
        by kenz987
         
        Started by nicthe, 08-23-2023, 07:53 AM
        7 responses
        197 views
        0 likes
        Last Post nicthe
        by nicthe
         
        Working...
        X