Login Page - Create Account

Support Board


Date/Time: Tue, 15 Oct 2019 12:30:06 +0000



V1997 with custom studies has issue on windows 10

[2019-10-09 12:16:42]
ertrader - Posts: 219
Hi Support, here is a chart book that works on v1991 and crashes on v1997 Windows 10. It's a single chart, uses SC data, is in 64 bit mode and does not use OpenGL. Hangs after loading then crashes without a log.

It's a 6 range chart with numbers bars, unfinished business, Valto's support and resistance, EdgeZones and volatility trend indicator. The dll's have not changed for a couple months, just the SC version.
Date Time Of Last Edit: 2019-10-09 12:17:17
attachmentSupportResistance.Cht - Attached On 2019-10-09 12:15:17 UTC - Size: 67.83 KB - 11 views
[2019-10-09 14:26:59]
Sierra Chart Engineering - Posts: 77135
But we are not going to be able to reproduce any problem. We are not sure why there is an issue in newer versions with those custom studies. The developer of those custom studies needs to look at this. We just cannot get involved in this.

We are not aware of any changes which would affect custom studies and being that those custom studies easily could have a bug in them, we just cannot be spending the time debugging these things. And we do not have any ability to do so either.

The first thing they should do is recompile the custom studies for the current version and see if that makes any difference.

For complete information about all of this, refer to help topic 17:
Https://www.sierrachart.com/index.php?page=doc/helpdetails17.html
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. If possible please keep your questions brief and to the point. Please be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
Date Time Of Last Edit: 2019-10-09 14:28:58
[2019-10-09 16:58:34]
binaryduke - Posts: 185
We (emojitrading) have been examining the chartbooks of this user and user tommartin321 in relation to this thread and the issue logged here:
https://www.sierrachart.com/SupportBoard.php?ThreadID=46015

We have recompiled the relevant studies serving the chartbooks against v1997.

The issue in this thread seems to have disappeared as a result.

The chartbook in the other thread still causes problems. Debugging with Visual Studio attached to Sierra Chart implies that there is heap corruption occurring with Sierra Chart. We find this occurs consistently when the chartbook is closed. The VS debugger does not point to the custom study dll, but to the windows ntdll.dll (not that we are closed to the possibility of a bug within the custom study dll, however it has been working fine up until v1997).

The custom study uses persistent pointers to allocate and release dynamic memory as per the various ACSIL examples. At the last call to the function, the study checks for a non-null pointer, deletes the memory and clears the pointer as per the ACSIL examples.

Prior to recompiling against v1997 and using the VS debugger, Sierra Chart and Windows dlls (not the custom study dll) were causing errors on closing that seemed to relate to accessing an out of bounds index in an array of characters. There is nothing in the custom study that deals with arrays of characters and we are wondering whether this could relate in some way to the study ID numbering bug identified in v1996 perhaps when the study defaults (or chartbook parameters for studies) are being read/written? The pre-v1997 compiled version was compiled against v1928.

We've attached the output of the Visual Studio debugger. We would also be happy to supply Sierra Chart support with the custom study DLL if this helps investigate a potential bug within v1997. As I say, we are not closed to the idea that there is a bug within our code, however, the Visual Studio debugging process is not breaking at areas within the custom study's code.
imageScreen Shot 2019-10-09 at 17.36.58.png / V - Attached On 2019-10-09 16:58:18 UTC - Size: 790.15 KB - 28 views
[2019-10-09 17:17:57]
binaryduke - Posts: 185
Further to this, we believe this behaviour may relate to the issue outlined in v1996 here:
https://www.sierrachart.com/SupportBoard.php?ThreadID=45957

We provide various study collections of standard Sierra Chart studies (Numbers Bars, Daily OHLC, Numbers Bars Calculated Values) as part of our distribution. These are all set up to prompt whether existing studies should be deleted.

On v1997, we experienced the following:

1. Open a new intraday chart.
2. Apply a study collection
3. Apply another study collection to add to these studies (not clearing the existing studies on the chart).
4. After checking the list of studies applied to the chart in the Studies window, the name for one of the studies was corrupted displaying oriental characters. Closing the study window resulted in Sierra Chart closing.
[2019-10-09 17:54:21]
Sierra Chart Engineering - Posts: 77135
We would also be happy to supply Sierra Chart support with the custom study DLL if this helps investigate a potential bug within v1997.
Yes provide us the files and we will test.

Regarding what is described in post #4 we cannot reproduce that. And also, the issue that you are linking to was definitively resolved:
https://www.sierrachart.com/SupportBoard.php?ThreadID=45957

It simply is not an issue in 1997. It could not be.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. If possible please keep your questions brief and to the point. Please be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
Date Time Of Last Edit: 2019-10-09 17:55:00
[2019-10-09 18:30:15]
binaryduke - Posts: 185
Please find relevant files attached.
Private File
Private File
[2019-10-10 02:31:29]
Sierra Chart Engineering - Posts: 77135
One thing we will say if users are still having a problem, even after recompiling the study for the current version, therefore it is 99% certain the problem is in your own code.

We will get to testing this as soon as we can.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. If possible please keep your questions brief and to the point. Please be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2019-10-10 08:42:53]
binaryduke - Posts: 185
Thank you. We will continue hunting from our side too with the relevant chartbooks. If our investigations find anything not in our own code that may help we will share the details here. If we resolve this from our side we'll advise here to to save your time. Likewise if you have any queries of ourselves or would like the dlls compiled with debugging symbols please get in touch directly.
[2019-10-12 11:19:10]
binaryduke - Posts: 185
We have undertaken further testing on this issue and attach another chartbook from an affected user. Our studies make use of dynamic memory allocation for vectors of structs and make use of sc.SetPersistentPointer. We have verified all of our code for memory allocation and deallocation which occurs in line with Sierra Chart's examples. We have also verified that no out of bounds vector indexes are being referenced.

What has been consistent in all cases has been heap corruption and two of the three affected chartbooks make use of a large number of charts including several with short timeframes (1 minute), a large number of days loaded relative to the chart timeframe (60 days) and multiple custom indicators with relatively loose parameters. Several charts include Numbers Bars. Charts also include thin instruments with missing price levels.

During the latest testing we have noticed this error from the standard Numbers Bars study on one of the affected chartbooks (screen dump attached):
Chart: NQZ9-CME [C] 1 Min #10 | Study: Numbers Bars | Exception occurred while calling study function. | 2019-10-12 11:06:30.809 *

We also notice from sierrachart.h that there are revised functions for SetPersistentSCString and SetPersistentSCStringForChartStudy as from v1988. Given we make use of sc.SetPersistentPointer we are wondering whether any changes to dynamic memory allocation as from v1988 could be the cause of the heap corruption.
Date Time Of Last Edit: 2019-10-12 11:26:47
imageScreen Shot 2019-10-12 at 12.09.47.png / V - Attached On 2019-10-12 11:17:55 UTC - Size: 378.7 KB - 18 views
Private File
[2019-10-12 11:39:50]
Sierra Chart Engineering - Posts: 77135
We also notice from sierrachart.h that there are revised functions for SetPersistentSCString and SetPersistentSCStringForChartStudy as from v1988.
There were new versions of these added but the existing ones were still maintained.

Given we make use of sc.SetPersistentPointer we are wondering whether any changes to dynamic memory allocation as from v1988 could be the cause of the heap corruption.
No.

This occurs because there has been a memory corruption which affected that study:
Chart: NQZ9-CME [C] 1 Min #10 | Study: Numbers Bars | Exception occurred while calling study function. | 2019-10-12 11:06:30.809 *
It is not the study itself which has a problem. It is something else related to the custom study.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. If possible please keep your questions brief and to the point. Please be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
Date Time Of Last Edit: 2019-10-12 11:55:17

To post a message in this thread, you need to login with your Sierra Chart account:

Login

Login Page - Create Account