I developed a share service for publishing on Telegram.
This share service runs fines when used in the code (in a strategy or an indicator) and NinjaTrader alerts.
However, when I want to Share a Tab Content (via right click on the chart -> Share -> tab content) if fails stating: "Unhandled exception: Object reference not set to an instance of an object.
I debugged the code using Visual studio 2019, and placed different breakpoints in the code to try to catch where the error is happening. Found nothing:
The code goes to:
- OnStateChanged() the state is State.SetDefault
- Share service constructor
- CopyTo(NinjaScript ninjaScript) ninjaScript is not null
- OnStateChange() the state is State.SetDefault again
- Share Service constructor
- CopyTo(NinjaScript ninjaScript) ninjaScript is not null
- Icon (get)
Then the error arise.
Do you have an idea of what could happen ?

Comment