ErrorCode: 0xFFFFFFFFC000000D ( -1073741811 )

Questions about MultiCharts .NET and user contributed studies.
mt99
Posts: 18
Joined: 24 Mar 2014
Has thanked: 1 time
Been thanked: 1 time

ErrorCode: 0xFFFFFFFFC000000D ( -1073741811 )

Postby mt99 » 15 Jun 2014

Hi,

I keep experiencing a strange exception that forces me to terminate and restart MC, which is not ideal as I have a signal operating live at the time.

The symptom is simple: a pop-up saying that an error has occurred that requires developer attention and offering me to send a report (which I have a number of times). The text in the error box is as follows:
<<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: 0x0000000000001094 ( 4244 )
Time: 16.06.2014 - 00:03:36.513

This (or similar) problem has already been seen by a MC user previously (see https://www.multicharts.com/discussion/viewtopic.php?f=1&t=43360#p95599) but sadly the resolution has not been posted.

In my case, clicking "Skip" results in an identical pop-up appearing immediately, so I can never get rid of it without clicking "terminate" and restarting MC. After the pop-up appears, my signal, which runs on two (or more) charts simultaneously, keeps getting recalculated (it writes its own log, so I can see that happening) but the DOM available to it stops being updated from the point of the appearance of the pop-up. This is a pretty dangerous situation.

Has anyone else come across the same behaviour, and/or has found the reason or the solution to this?

Thanks.

mt99
Posts: 18
Joined: 24 Mar 2014
Has thanked: 1 time
Been thanked: 1 time

Re: ErrorCode: 0xFFFFFFFFC000000D ( -1073741811 )

Postby mt99 » 16 Jun 2014

Also, the same issue seems to have occurred in this ticket: https://www.multicharts.com/discussion/viewtopic.php?f=1&t=9110. Although it occurred in TradingServer.exe, the error code and the DLL where it occured are the same.

There's a comment there (https://www.multicharts.com/discussion/viewtopic.php?f=1&t=9110#p43119) that indicates that this was a confirmed problem. No solution, or confirmation that a fix has been made (that thread actualy refers to MC 7.0, not MC.NET) has been posted though.

mt99
Posts: 18
Joined: 24 Mar 2014
Has thanked: 1 time
Been thanked: 1 time

Re: ErrorCode: 0xFFFFFFFFC000000D ( -1073741811 )

Postby mt99 » 16 Jun 2014

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.
These users thanked the author mt99 for the post:
JoshM

User avatar
Henry MultiСharts
Posts: 9041
Joined: 25 Aug 2011
Has thanked: 1247 times
Been thanked: 2898 times

Re: ErrorCode: 0xFFFFFFFFC000000D ( -1073741811 )

Postby Henry MultiСharts » 17 Jun 2014

Hello mt99,

What exact version and build number of MultiCharts are you running? (in MultiCharts go to Help tab-> About)
Please specify your PC name (right click on My Computer->Properties->Computer name) so that I can find the dumps you have uploaded.

mt99
Posts: 18
Joined: 24 Mar 2014
Has thanked: 1 time
Been thanked: 1 time

Re: ErrorCode: 0xFFFFFFFFC000000D ( -1073741811 )

Postby mt99 » 17 Jun 2014

Hi,

Thanks for your reply.

I'm using MultiCharts .NET64 Version 8.8 Release (Build 9191)

PC name is WIN-55JCIP0LNI4.

User avatar
Henry MultiСharts
Posts: 9041
Joined: 25 Aug 2011
Has thanked: 1247 times
Been thanked: 2898 times

Re: ErrorCode: 0xFFFFFFFFC000000D ( -1073741811 )

Postby Henry MultiСharts » 18 Jun 2014

mt99, we were unable to replicate this behavior on our end. Please send me (support@multicharts.com) the following information for further investigation:
- workspace you are using;
- in QuoteManager select the symbol you are using, make a right click on it->Export data->Export instrument (without data). Send me the Qmd export file for analysis;
- in PowerLanguage editor->File->Export->export the studies you are using in the workspaces you are providing. Send me the study export file.

Please download and unzip MC dumper to your PC:
https://dl.dropboxusercontent.com/u/279 ... Dumper.zip

When the error appears again do the following:
Please do not close any error or MultiCharts windows when the error appears.
Keep MC running and the error window open.

Start MC_Dumper gui.exe
In MC Dumper window please select the version of MultiCharts you are having problem with in “Product for Dumps selector”.

Please keep in mind that MultiCharts, MultiCharts64, MultiCharts .Net, MultiCharts .Net 64, MultiCharts .Net SE, MultiCharts .Net SE 64 are all different products and the one you are having problem with right now must be selected to collect the required information.

Do not change any other options.
Press Make Dumps.
It will collect all info required for analysis and zip it into the file.
Please send me this file and we will analyze it.
Create an additional screenshot of the error and send it to me.

If the file size is >10 mb please upload it to any file sharing hosting and send me the download link.

mt99
Posts: 18
Joined: 24 Mar 2014
Has thanked: 1 time
Been thanked: 1 time

Re: ErrorCode: 0xFFFFFFFFC000000D ( -1073741811 )

Postby mt99 » 18 Jun 2014

Will do, thanks.

mt99
Posts: 18
Joined: 24 Mar 2014
Has thanked: 1 time
Been thanked: 1 time

Re: ErrorCode: 0xFFFFFFFFC000000D ( -1073741811 )

Postby mt99 » 19 Jun 2014

I have now sent in the dumps as requested. Please confirm receipt.

Thanks.

User avatar
Henry MultiСharts
Posts: 9041
Joined: 25 Aug 2011
Has thanked: 1247 times
Been thanked: 2898 times

Re: ErrorCode: 0xFFFFFFFFC000000D ( -1073741811 )

Postby Henry MultiСharts » 20 Jun 2014

Hello mt99,

I have received the dumps and forwarded this case to our engineers. I will get back to you once I have any updates.

User avatar
Henry MultiСharts
Posts: 9041
Joined: 25 Aug 2011
Has thanked: 1247 times
Been thanked: 2898 times

Re: ErrorCode: 0xFFFFFFFFC000000D ( -1073741811 )

Postby Henry MultiСharts » 20 Jun 2014

mt99, this issue has been confirmed. The fix is targeted to MultiCharts .NET 9.0 Beta2.

User avatar
Henry MultiСharts
Posts: 9041
Joined: 25 Aug 2011
Has thanked: 1247 times
Been thanked: 2898 times

Re: ErrorCode: 0xFFFFFFFFC000000D ( -1073741811 )

Postby Henry MultiСharts » 24 Jun 2014

Our further analysis has shown that your study is using the data loader and in the event handling function it refers to the fields and properties of the study object. Per IDataLoader guide:
https://www.multicharts.com/trading-soft ... DataLoader ) :
LoadDataCallback - is a delegate with the following signature: public delegate void LoadDataCallback(IDataLoaderResult Result);
It is used to call back the data request results. This function is called in a separate thread, different from one where BeginLoadData is called.

It means in order to resolve this issue you need to implement threadsafe access to study fields from different threads.

User avatar
Henry MultiСharts
Posts: 9041
Joined: 25 Aug 2011
Has thanked: 1247 times
Been thanked: 2898 times

Re: ErrorCode: 0xFFFFFFFFC000000D ( -1073741811 )

Postby Henry MultiСharts » 01 Jul 2014

Update: That is not possible to access the properties and methods of one thread from different threads. They can be accessed only from the calculation thread. A better notification regarding the error will be added in MultiCharts .NET 9.0 Beta 2.

mt99
Posts: 18
Joined: 24 Mar 2014
Has thanked: 1 time
Been thanked: 1 time

Re: ErrorCode: 0xFFFFFFFFC000000D ( -1073741811 )

Postby mt99 » 11 Jul 2014

Just to clarify, is Output also a study variable that must not be used in BeginLoadData callbacks?

User avatar
Henry MultiСharts
Posts: 9041
Joined: 25 Aug 2011
Has thanked: 1247 times
Been thanked: 2898 times

Re: ErrorCode: 0xFFFFFFFFC000000D ( -1073741811 )

Postby Henry MultiСharts » 11 Jul 2014

mt99 wrote:Just to clarify, is Output also a study variable that must not be used in BeginLoadData callbacks?
No, there should be no problem with it.


Return to “MultiCharts .NET”