Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 18:53:52 +0000



Using function: sc.SetPersistentSCStringForChartStudy() crashes SC

View Count: 643

[2019-09-13 20:12:45]
@sstfrederik - Posts: 403
Hi,

Can you check the sc.SetPersistentSCStringForChartStudy() function. When I use it it crashes SC.

Frederik
[2019-09-16 10:51:00]
Sierra Chart Engineering - Posts: 104368
You need to check your own code for a problem. That function has no problems. And we cannot reproduce any issue with it either.

But we do observe, that the implementation is not as efficient as it should be and we will correct that by not passing copies of the string.
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
[2019-09-16 12:10:17]
@sstfrederik - Posts: 403
Run the below code and let me know if you can reproduce the problem.

SCSFExport scsf_Receiving_SCString(SCStudyInterfaceRef sc)
{
  if (sc.SetDefaults)
  {
    // Set the configuration and defaults

    sc.GraphName = "Receiving SCString";

    sc.StudyDescription = "Receiving SCString";

    sc.AutoLoop = 0;
    return;
  }

  SCString& SomeString = sc.GetPersistentSCString(0);
  
  // Do data processing

  if (sc.UpdateStartIndex == 0 && sc.IsFullRecalculation)
  {
    sc.AddMessageToLog(SomeString,1);
  }
}

SCSFExport scsf_Sending_SCString(SCStudyInterfaceRef sc)
{
  
  SCInputRef ChartStudyReference = sc.Input[0];
  
  if (sc.SetDefaults)
  {
    // Set the configuration and defaults

    sc.GraphName = "Sending SCString";

    sc.StudyDescription = "Sending SCString";
    
    ChartStudyReference.Name = "Chart Study Reference";
    ChartStudyReference.SetChartStudyValues(1, 0);
    
    sc.CalculationPrecedence = LOW_PREC_LEVEL;
    
    sc.AutoLoop = 0;
    return;
  }
  
  // Do data processing

  if (sc.UpdateStartIndex == 0 && sc.IsFullRecalculation)
  {
    sc.SetPersistentSCStringForChartStudy(ChartStudyReference.GetChartNumber(),ChartStudyReference.GetStudyID(),0,"This is a test string");
  }
}

[2019-09-16 12:29:01]
Sierra Chart Engineering - Posts: 104368
Would be doubtful we would encounter a problem. We suspect we know what the problem is.

Most likely it is just simply a small compatibility issue between the different compilers with passing of class parameters as copies in function calls. This will be resolved in the next release.
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: 2019-09-16 12:29:25
[2019-09-16 12:40:46]
@sstfrederik - Posts: 403
I run SC 1987 and this is example code remote build showing a v1977 dll. It will crash and I know you will fix it. Would appreciate an update in this thread which release this is fixed. Thanks.

Frederik
[2019-09-16 13:26:28]
Sierra Chart Engineering - Posts: 104368
It will be in version 1988 coming out later today.
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