Debug log
47111791 OnRender - start
47111791 OnRender - end
47111791 OnRender - start
47111791 OnRender - end
47111791 OnRender - start
47111791 STATE: Terminated 8.152 sec
Indicator 'MyIndicator': Error on calling 'OnRender' method on bar 0: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
6963748 STATE: SetDefaults
6963748 OnRenderTargetChanged - creating graphics
No other errors before this one in OnRender
I used lock(obj) {} in OnStateChange() and in OnRender() and this helped solve issue.
I suppose OnStateChange and OnRender executed in different threads and they are not sync on termination.
I still had exceptions when on multi tabs chart. I suppose it happened more often on slow PCs. Exceptions have been listed here
http://ninjatrader.com/support/forum...348#post482348
Comment