Support Board
Date/Time: Thu, 16 Jan 2025 05:47:44 +0000
Using two StorageBlocks
View Count: 790
[2017-10-09 17:18:52] |
User44130 - Posts: 23 |
I use the following two functions with sc.StorageBlock. There was no problem with Function1, works good if used alone. But when I add Function2 in my code, it compiles ok, when I incorporate Function2 in the chartbook study it produces CPU exception error. If the chartbook is saved and opened again, the data is saved and everything works ok, no errors. CPU exception error appears only the first time the study added to the chartbook. Is that a problem at all? SCSFExport scsf_Function1 (SCStudyInterfaceRef sc); { struct s_PermData1 { int Number; }; s_PermData1* PermData1; PermData1 = (s_PermData1*)sc.StorageBlock; PermData1->Number = 10; //data processing } SCSFExport scsf_Function2 (SCStudyInterfaceRef sc); { struct s_PermData2 { int Number; }; s_PermData2* PermData2; PermData2 = (s_PermData2*)sc.StorageBlock; PermData2->Number = 10; //data processing } |
[2017-10-09 18:10:52] |
Sierra Chart Engineering - Posts: 104368 |
You really need to use step-by-step debugging to determine what the reason for the exception is. It is not obvious from looking at this code. Refer to: https://www.sierrachart.com/index.php?page=doc/DebuggingDLLs.html The exception is a problem and has to be resolved. 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: