Sierra Chart Unexpectedly Shutting Down
Memory Errors
Unusual Software Problems
Exception Errors
Freezing of User Interface


17.1 - Problems Caused by Advanced Custom Studies

If you are using Advanced Custom Studies, which are studies which are added through Analysis >> Studies >> Add Custom Study, and one of the following occurs:

  • Receive a Warning: The Custom DLL study "[DLLFileName].scsf_[StudyName]" has just caused a CPU exception. | Date-Time in the Window >> Message Log.
  • Windows operating system says Sierra Chart has performed an illegal operation or has encountered a problem and Sierra Chart is shut down.
  • Receive an Out of Memory message in the Message Log.
  • Receive an An unhandled exception was caught in [Function Name]. Message: [Number] message in the Message Log.
  • Receive a Exception caught from [Study Name] message in the Message Log.
  • Sierra Chart uses more and more memory.
  • You have unusual problems with Sierra Chart.
  • Sierra Chart freezes and uses a lot of CPU time.
  • Unable to open Chartbooks due to one of the above problems.
  • An abnormal shutdown of Sierra Chart occurs when pressing the Analysis >> Studies >> Add Custom Study button.
  • A "stack corruption" occurs and when this is encountered, Sierra Chart immediately shuts down without any error message. In other words it disappears. This is an example of a stack corruption:
    ExampleFunction()
    {
        //Define an array of variables within the function. This is created on the "stack"
        int IntegerArray[4] = {1, 2, 3, 4};
    
        //The following line will corrupt the stack because it is accessing beyond the bounds of the array
        IntegerArray[4] = 10;
    }
            

Then the first step to resolve these kinds of issues is to follow the below instructions.

  1. Restart Sierra Chart.
  2. At the Sierra Chart Login window, press the Cancel button.
  3. Enable the option Safe Mode to prevent the downloading of DLL files and the loading of Advanced Custom Studies DLL files.
  4. Press the Login button.
  5. If you no longer are experiencing the problem that you did previously, then continue with the steps below to determine what particular DLL file is causing the problem. Otherwise, if using Safe Mode did not resolve the problem, then the problem you are experiencing is not caused by an Advanced Custom Study and you can stop here.
  6. Select Global Settings >> General Settings. Make a note of the Data Files Folder.
  7. Exit Sierra Chart.
  8. Next, go to your Sierra Chart Data Files Folder that you made a note of. In the Data Files Folder, create a folder named DLLBackup.
  9. Move all files with a .DLL file extension in the Sierra Chart Data Files Folder into your DLLBackup folder that you created.
  10. Run Sierra Chart.
  11. On the Login Window, disable the option Safe Mode to allow the loading of Advanced Custom Studies DLL files.
  12. If a particular Advanced Custom Studies DLL file was the cause of the problem, then the problem you were previously experiencing will now be solved even when not using Safe Mode.
  13. You can now move the Advanced Custom Studies DLL files from the DLLBackup folder into the Sierra Chart Data Files Folder one by one and try reopening your Chartbooks after that to see which DLL file is causing the problem. Always put the DLL files in the Sierra Chart Data Files Folder. This is the only folder where they will work from. They will not work if they are located in some other folder.
  14. When you determine which DLL is causing the problem, then exit from Sierra Chart, delete that DLL file, and contact the developer about it.
  15. The first step is for the Custom Studies DLL developer to recompile their source code using the latest SierraChart.h header file. This can be done through Analysis >> Build Custom Studies DLL. The latest header file will be used by default.
  16. If after recompiling the source code and creating a new DLL, if the problem still occurs, the Custom Study developer needs to determine the reason for the problem and correct it. They can contact Sierra Chart Support on the Support Board for help if needed.
  17. If you no longer want to use a custom study which was causing the problem, then remove all instances of it from all open charts. Studies can be removed through Analysis >> Studies >> Studies to Graph >> [select study] >> Remove. If the DLL file for a particular study that has been added to a chart has been deleted, then the study will be listed as Custom DLL Study in the Studies to Graph list.
  18. Programming errors in Advanced Custom Studies can cause numerous different and unusual problems.

17.2 - Advanced Custom Studies Can Cause Problems in One Version but Not Another

It is very possible for an Advanced Custom Study with a bug not to cause a problem in one version of Sierra Chart, but cause a problem in a newer version. It is also possible for an Advanced Custom Study with a bug not to cause a problem and then later cause a problem without an apparent reason.

Be aware of and understand this.

17.4 - Hard Drive / SSD Issues

If Sierra Chart unexpectedly shuts down or freezes permanently, then this could be because the Sierra Chart program files have become damaged on your disk drive or SSD. This is unlikely. To see if this is the case, download and reinstall Sierra Chart. There is no need to uninstall first.

17.5 - Advanced Custom Studies Releasing DLL At Every Call Causing High CPU Usage

If a custom study function contained within a DLL file (Dynamic Link Library file which contains the custom studies) sets sc.FreeDLL to 1 or a nonzero value, and there are no other custom studies being used within the DLL which set this to a zero value, then what this means is that every time the custom study function is called and the study is calculated, there is additional processing to load the DLL and release the DLL.

The result of this is high CPU usage by the custom study.

An indication of this is happening would be that you see the following message in the Window >> Show/Hide Message Log: Notice: The study '[Custom Study Name]' has sc.FreeDLL set to true. Use only during development! Set to false to reduce CPU time.

17.6 - Sierra Chart Studies Causing Exceptions

In the very rare case that a Sierra Chart built-in study is causing an exception and giving the following message in the Window >> Show/Hide Message Log:

Warning: The Custom DLL study "SierraChartStudies.scsf_[StudyName]" has just caused a CPU exception. | Date-Time

What you then need to do is contact Sierra Chart support about this on the Support Board for instructions. We need to analyze problem to determine the reason and provide a solution.

17.7 - "Caught an unhandled exception"

In the rare case that an exception is being caught by Sierra Chart which results in a line like the following in the Window >> Show/Hide Message Log:

An unhandled exception was caught in [Function Name]. Message: [Number]

Then this means that a software or hardware level exception has occurred which indicates a serious problem. There can be numerous causes including a memory corruption. Usually the reason for this is an Advanced Custom Study with a programming error. The least likely reason would be that it is caused by a bug within Sierra Chart itself.

Follow the below procedure to resolve this kind of problem:

  1. An unhandled exception occurring within Sierra Chart indicates a serious problem like a memory corruption. Sierra Chart cannot continue to function reliably after this exception has occurred. Therefore, as soon as possible exit from Sierra Chart with File >> Exit.
  2. Follow the instructions in the 17.1 - Advanced Custom Studies Part 1 section to determine if the problem is caused by an Advanced Custom Study. If so, then stop here.
  3. If after restarting Sierra Chart and using Safe Mode, you continue to have the problem, then restart your computer.
  4. If that still does not solve the problem, then need you need to contact Sierra Chart support about this on the Support Board for instructions. We need to analyze problem to determine the reason and solve it.

17.8 - System Lockups and System Restarts

In the very rare case, that you see your computer system lockup or restart when using Sierra Chart, then generally this is an indication of a hardware problem on your computer system

Generally it is caused by faulty RAM memory or a faulty hard drive or solid-state drive.

Under no circumstances does a program like Sierra Chart which is a normal program that uses standard operating system functions, cause a computer to restart or freeze. It is technically impossible. This also applies to any other program that uses standard operating system functions. It is just not possible.

Check all of the hardware on your computer. Especially the memory and the hard drive or solid-state drive.

This particular section is only here for documentation completeness because hardware problems generally are not very common.

Sierra Chart can potentially use a significant amount of memory and drive space which can expose hardware faults with either of these on your system.


*Last modified Tuesday, 30th August, 2016.