Since I'm developing a rather feature-rich custom indicator, my suspicion has naturally been a resource (concurrency) conflict that I may not have been properly managing.
Using Visual Studio the error is always:
The program '.[..]NinjaTrader.exe' has exited with code -2147483645 (0x80000003).
There is no exception being raised or error logged to the NT trace or log files.
That said, I think I may have figured out the cause...
After removing the _Workspaces.xml file and all my workspaces, I started over and re-created 4 test workspaces, carefully building up the number of chart tabs and enabling various features of my indicator. As I followed this process, I would periodically close NT and restart it... all workspaces would open fine... no crashes....looked to be very stable.
While I'm normally in a process of writing and debugging code, this time I made sure I did not have my typical NinjaScript Editor open in any saved workspace. However, I did have a NinjaScript Output window open in one saved workspace... my indicator logs various trace information which is useful to watch print.
I then opened a NinjaScript Output window for each of my other workspaces, saved them, closed NT and restarted. NT crashed immediately when attempting to open the workspaces. It reliably crashed each time I attempted a restart.
I then removed the _Workspaces.xml file, restarted NT and (successfully) opened one workspace. When I attempted to open a second workspace, NT crashed. At this point, I again removed the _Workspaces.xml file, restarted NT and (successfully) re-opened the first workspace. I then removed its NinjaScript Output window, saved the workspace, then (successfully) opened a second workspace, removed its NinjaScript Output window, saved the workspace, and repeated this for all but 1 of the 4 workspaces. I closed NT, restarted NT, and it now reliably restarts each time (again). Only 1 workspaces has an open NinjaScript Output window.
In hindsight, when I first encountered this issue, I'm pretty certain not only did I have a NinjaScript Output window open in each workspace, but often had a NinjaScript Editor open as well. I have not yet conducted a similar test where instead of having a NinjaScript Output window open in each workspace, I have a NinjaScript Editor window open in each workspace... TBD.
Comment