Login Page - Create Account

Support Board


Date/Time: Mon, 13 May 2024 16:48:07 +0000



read access violation and heap corruption using SetStudyPersistentIntFromChart()

View Count: 674

[2017-07-05 22:35:53]
DabbaDo - Posts: 146
Perhaps I'm doing something wrong here, but I haven't found examples for using SetStudyPersistentIntFromChart() and I'm stuck.
Attached is a simple chartbook with two studies, one "driving" the other.
It works for a few times, but repeatedly changing the "Master" length in the study input dialog and hitting "Apply" eventually gives me a crash in the debugger, sometimes a heap crash and sometimes a read access violation.

Cheers,
Dale

V1580
attachmentSetStudyPersistentDemo.cpp - Attached On 2017-07-05 22:33:58 UTC - Size: 2.13 KB - 255 views
attachmentSetStudyPersistentDemoAvg.cpp - Attached On 2017-07-05 22:34:19 UTC - Size: 2.41 KB - 229 views
attachmentDebug.cht - Attached On 2017-07-05 22:34:31 UTC - Size: 39.74 KB - 220 views
[2017-07-05 22:57:40]
Sierra Chart Engineering - Posts: 104368
We will look into this. There potentially is a problem we did not consider in this particular case.
Sierra Chart Support - Engineering Level

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

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2017-07-06 17:09:48]
Sierra Chart Engineering - Posts: 104368
We cannot reproduce any problem and we need specific instructions to reproduce it. Really you need to provide us an example which does not use new and delete because that is complicating it and could be where the problem is.
Sierra Chart Support - Engineering Level

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

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2017-07-06 17:10:10
[2017-07-06 17:15:06]
Sierra Chart Engineering - Posts: 104368
When using new and delete, the main thing is to make sure the pointer is not used after it has been deleted and that it is not deleted twice. And that the pointer is not used by any other instance of the study.

And sc.FreeDLL must be set to 0.
Sierra Chart Support - Engineering Level

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

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account