Login Page - Create Account

Support Board


Date/Time: Tue, 22 Apr 2025 03:27:50 +0000



Post From: Potential Bug: Backtesting chart replay causes crash when passing s_SCPositionData

[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
imageScreenshot 2025-02-13 182257.png / V - Attached On 2025-02-14 12:54:48 UTC - Size: 110.8 KB - 38 views