I have dug a bit further on this after I noticed that the problem occurred more when the signal (actually, it seems any signal that uses Bars.DOM) is connected to a contract that can have a sudden flurry of updates, such as TYAU14 (US 10Y on CQG), or the E-mini. It is actually a fairly reliable way to provoke the crash, you don't have to do much more than print the DOM to Output.
This time, however, I have zipped up the MC.NET logs before terminating the application (why, incidentally, do they get removed on restart? Size?) and have found the following in them.
So...
Error in pop-up:
<<EXCEPTION>>
Code: 0xFFFFFFFFC000000D ( -1073741811 )
Continuable: 0x0000000000000000 ( 0 )
Description: An invalid parameter was passed to a service or function.
ErrorCode: 0xFFFFFFFFC000000D ( -1073741811 )
ExceptionType: 0x0000000000000000 ( 0 )
Module: C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.8387_none_08e793bfa83a89b5\MSVCR90.dll
Process: C:\Program Files\TS Support\MultiCharts .NET64\MultiCharts64.exe
Thread ID: 0x000000000000123C ( 4668 )
Time: 16.06.2014 - 10:55:42.998
In the Output window of the code editor I can see that this coincided with a flurry of DOM updates to TYAU14 (same DateTime on a couple dozen DOM changes), so this was another instance of this crash happening when there's a large volume of updates.
Then, I grepped the MC.NET logs for the timestamp of the error and found the following in
DOMDATAFuncs_Trace.txt:
[0x123C](16.06.2014 - 10:55:42.967)ASSERT "("_Myptr < ((_Myvec *)(this->_Getmycont()))->_Mylast", 0)" at Line 103 in C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\vector
...and the following in
DOMDATAFuncs_Error.txt (it's the same error, just more detailed):
-------------------------------------------------------------
<<ASSERT>>
Description: ("_Myptr < ((_Myvec *)(this->_Getmycont()))->_Mylast", 0)
File: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\vector
Function: std::_Vector_const_iterator<struct SCell,class std::allocator<struct SCell> >::operator *
Last Error: An attempt was made to reference a token that does not exist.
Last Error Code: 0x00000000000003F0 ( 1008 )
Line: 0x0000000000000067 ( 103 )
Process: C:\Program Files\TS Support\MultiCharts .NET64\MultiCharts64.exe
Thread ID: 0x000000000000123C ( 4668 )
Time: 16.06.2014 - 10:55:42.967
So it does look like there's some issues with the vector handling in the DOM object in MultiCharts64.exe itself. If you do look at line 103 of the
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\vector file, you'll see that it performs a call to _SCL_SECURE_VALIDATE_RANGE, which (I assume), checks that a vector iterator does point to somewhere within the vector, and this is what fails. This would make sense if it is the same vector that gets rapidly repopulated as the DOM updates flood in, and is at the same time being read from.
As a side note, are there plans to move MC to a more up-to-date version of the VC++? This digging made me realise that it's built against VC++9.0 and we are now up to VC++12.0. There's about five years of bugfixes there (including some, funnily enough, with range validation).
Please let me know what you find.
Thanks.