Support Board
Date/Time: Mon, 21 Apr 2025 23:36:09 +0000
Potential Bug: Backtesting chart replay causes crash when passing s_SCPositionData
View Count: 185
[2025-02-14 12:57:34] |
barucho - Posts: 13 |
Summary: Sierra Chart crashes with a "Buffer is too small" error (corecrt_internal_string_templates.h) during high-speed Chart Replay backtesting in sim accounts when using sc.GetTradePosition. The issue is linked to SCString Symbol and TradeAccount in s_SCPositionData. Reproduction: Run a study calling sc.GetTradePosition frequently. Use Chart Replay at high speed in a sim account. Crash occurs with "Buffer is too small" error. Workaround: Set positionData.Symbol = ""; and positionData.TradeAccount = ""; after sc.GetTradePosition to avoid crash. Suspected Cause: Potential buffer or corrupt string issue in sc.GetTradePosition or SCString handling during rapid backtesting. The issue occurs when passing the s_SCPositionData instance to functions that cause a copy. In particular, with the Symbol and/or TradeAccount strings. Version & System Info: Sierra Chart Version: 2739 64-bit OS: Windows 11 |
![]() |
[2025-02-14 14:30:57] |
Sierra_Chart Engineering - Posts: 19290 |
This does not make any sense to us. It does not matter the speed of the replay . That is totally irrelevant. We would never be able to reproduce such a problem and we do not know the actual cause of the issue. There would have to be a problem within your own custom study causing a problem. 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, use the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2025-02-14 14:31:07
|
[2025-02-14 17:47:00] |
User719512 - Posts: 309 |
I have seen strange exceptions under the debugger (very rarely) in the Sierra SCString class. In my case, strings were being assigned in SetDefaults for inputs. But no solid repro for me. I have always been able to continue, and Sierra loads charts as expected. Also sounds like you are causing a copy of the s_SCPositionData struct and not passing by const reference. (guessing here) Are you modifying this data? If you share the most trimmed down study code that can reliably repro this, I will compile it locally and run it on my machine to see if I get similar results. You can DM me directly if you want so we don't have to clog up the support board. |
To post a message in this thread, you need to log in with your Sierra Chart account: