Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exception - RemoveDrawObjects

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

    Exception - RemoveDrawObjects

    Occasionally, I see the following

    Caught exception: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
    at System.ThrowHelper.ThrowInvalidOperationException( ExceptionResource resource)
    at System.Collections.Generic.List`1.Enumerator.MoveN extRare()
    at NinjaTrader.Gui.Chart.ChartControl.RemoveAllDrawin gToolsFor(IChartObject chartObject)
    at NinjaTrader.Gui.NinjaScript.IndicatorRenderBase.Re moveDrawObjects()

    This is not generally reproducible. I normally see it when starting NT up from scratch and workspaces are loading. Once loaded, I will not see again while running.

    The indicator that uses this, always calls RemoveDrawObjects() to remove all drawings before adding the current set of drawings. This is done on bar close.

    This exception would seem to point to an internal NT issue.

    #2
    Hello aslane,

    Thank you for your post.

    Can you send us your log and trace files so we may look into this further?
    You can do this by going to the Control Center-> Help-> Email Support. Please list 'ATTN: Patrick H' in the subject line and reference this thread in the body of the email.

    Comment


      #3
      Similar issues here, non reproducible, comes and goes, with nothing in trace or log files except the error message mentioned.

      Comment


        #4
        I had been told this should be fixed in next version (8.0.3)

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        65 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        41 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        23 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        26 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        52 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X