Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 21:02:51 +0000



Format function crashes SC

View Count: 578

[2018-03-13 02:02:07]
User44130 - Posts: 23
Using the below piece of code causes SC to shutdown (accidentally omitting "f" or other format letter after "%") as a result of buffer overflow. Couldn't locate this error for a long time as it's hidden from compiler in SC proprietary function. First time see this type of fault causing SC to close. Building error handling code for this function might be a good idea as it is must be used pretty frequently.

SCString MsgLog;

MsgLog.Format("Max Size Limit! CurrBSAv: % BSAvLmt: %f BSMax: %d ", CurrBSAv, BSAvLmt, BSMax);
sc.AddMessageToLog(MsgLog,0);
[2018-03-13 03:26:51]
Sierra Chart Engineering - Posts: 104368
This function unless used properly really can cause problems. There is no practical solution from our side. You must use it safely.
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: 2018-03-13 03:33:00

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

Login

Login Page - Create Account