Login Page - Create Account

Support Board


Date/Time: Mon, 06 May 2024 05:38:36 +0000



Windows error 1114 on custom studies

View Count: 1371

[2019-02-06 11:53:41]
User787032 - Posts: 37
I have just moved to Sierra Chart version 1865 and I find that when I go to Add Custom Study, many of my existing custom studies are now listed with an error of the form:
CreateStudyDLLModuleFunctionObject Error Loading C:\SierraChart\Data\StudyName.dll. Windows error code 1114. A dynamic link library (DLL) initialization routine failed.

I could run these studies OK before moving to version 1865. I re-compiled one of these studies and it compiled successfully, but it is still listed with the same error when I try to add it.
Do I need to roll back to the previous version to access these studies again?
[2019-02-06 16:27:14]
Sierra Chart Engineering - Posts: 104368
This is a very unusual error. We do not think we have ever seen this before. How are you building these custom studies?

It is not going to matter the version of Sierra Chart you are running. This error would occur regardless. There is something else wrong. This could not be version specific.
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: 2019-02-06 16:28:04
[2019-02-06 18:02:50]
Blue Brazilian - Posts: 42
I am building the studies the way I have been building them for several years:
Click Analysis>>New/Open Custom Studies File.
Create a new file e.g. NewStudy.cpp
Write the ACSIL code and save file NewStudy.cpp
click Analysis>>Build Custom Studies DLL
Select the file NewStudy.cpp and then click Build Custom Studies DLL (using Visual C++, not a Remote Build).
The compile completes without errors, but it displays the windows error 1114 for the DLL in the list of custom studies.

Several of my custom studies are listed normally and function correctly. I agree that it can't be version specific as I have a number of DLLs that were built on the same version of Sierra, and some of them work on v 1865, others don't.
Date Time Of Last Edit: 2019-02-06 18:05:25
[2019-02-06 21:48:30]
Blue Brazilian - Posts: 42
I tried the pre-release version 1870 - same problem. I then reverted to version 1788 on which a number of the custom studies were built, and the problem disappeared...
[2019-02-06 22:17:04]
Sierra Chart Engineering - Posts: 104368
What happens if you build the study using version 1870. Do you still notice the problem? This looks like a problem in your own code based on the operating system error you are getting.
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: 2019-02-06 22:17:21
[2019-02-07 00:11:19]
Blue Brazilian - Posts: 42
I didn't try a build in 1870 but I tried a few builds in 1865 and had the same error message even though the build completed successfully in each case.
I'd be interested to hear what kind of code problem may cause a study to compile and build a DLL that runs correctly in v1788, while it will compile and build a DLL that fails to initialize in v1865.
[2019-02-07 01:41:53]
Sierra Chart Engineering - Posts: 104368
We do not know what the problem is then.

I'd be interested to hear what kind of code problem may cause a study to compile and build a DLL that runs correctly in v1788, while it will compile and build a DLL that fails to initialize in v1865.
We have no idea. But this error message from the operating system is quite clear:
Windows error code 1114. A dynamic link library (DLL) initialization routine failed.

This is something you need to research and figure out. We ourselves have never encountered anything like this and we cannot recall anyone else having an issue like this. Certainly not recently, if ever.

A simple test is to just simply build a simple study that we provide among the studies in the /ACS_Source folder and see if you have a problem like that. You definitely should not. So therefore there must be something about your own code causing the 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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2019-05-27 21:52:04]
Blue Brazilian - Posts: 42
After several weeks remaining on the same SC version, I really need to move to a more recent version, but still have the problem of the windows error on many custom studies.
I did a number of tests to try to isolate the problem, and here's what I've discovered:
1) The problem doesn't appear until I try to install version SC 1835 or above. Was anything introduced in v1835 that might cause this to happen?
2) I compiled a simple study from the SC library (SumAllChartsBar from studies6) on v1918. It compiled OK, but when I try to add it as a Custom Study it has the same windows 1114 error. So, it's not caused by some non-standard code in the study.
3) I compiled the same study on v1834, where I could add it successfully as a custom study. I included the study in a chartbook and saved the chartbook. I then installed v1918 and loaded the chartbook. This time it was able to open the custom study DLL within the chartbook.

Just to clarify, I'm not experiencing any problems with any other DLLs on my system, only those within SC. Not all DLLs are affected but I can see no pattern in which ones have the problem - some are older DLLs, some are very recent.
All of the above relates to 32-bit Sierra running on Windows 7.
On 64-bit SC, on the same PC, I run v1875. However, when I try to Download Current Version, it asks me to confirm that Sierra can be closed, I click Yes and nothing happens. I can see from Task Manager that no SC processes are running.

And finally, on my second PC running Windows 10, I can install the latest version (1924) and the problem doesn't appear on any custom studies, so it may be specific to Windows 7.

Thanks in advance for any advice.
[2019-05-27 21:57:10]
Sierra Chart Engineering - Posts: 104368
We really do not know what the problem is . We do remember one user indicating that there was some DLL loading problem when there were too many DLLs in a folder.


On 64-bit SC, on the same PC, I run v1875. However, when I try to Download Current Version, it asks me to confirm that Sierra can be closed, I click Yes and nothing happens.
It sounds like security software running on your system prevented the Sierra Chart installer from running. Also for the record this is very rare for us to ever hear about this. We might have heard about it once before but it certainly is very very uncommon.
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: 2019-05-27 21:57:58
[2019-05-27 23:20:37]
Blue Brazilian - Posts: 42
It's definitely related to the number of DLLs in the Data folder. The more DLLs I remove, the more DLLs appear in the list of Custom Studies without the windows error.
Is there a limit on the number of DLLs that can be stored in the Data folder, or a limit on the size of the Data folder as a whole?
[2019-05-28 00:50:52]
Sierra Chart Engineering - Posts: 104368
You need to ask Microsoft your question. There is no limitation in Sierra Chart related to this. This is quite clear.
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
[2019-05-28 10:31:49]
Blue Brazilian - Posts: 42
I really have difficulty accepting that it's a Microsoft issue. The DLLs load correctly on SC v1834 and prior versions, but don't load correctly on v1835 and subsequent versions of SC. I've made no changes to my Windows environment.
I would suggest that, even if you have not specifically introduced a limit on the number of DLLs in the folder, something, somewhere in the changes you made in v1835 has caused the Custom Study list to handle no more than a certain number of DLLs.
[2019-05-28 11:28:29]
Sierra Chart Engineering - Posts: 104368
Ok then don't believe us. It inherently makes no sense of being an issue on the Sierra Chart side based on the error being returned.
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: 2019-05-28 11:30:31
[2019-05-28 11:33:51]
Sierra Chart Engineering - Posts: 104368
How many DLLs are you loading and then we will run a test to see if we can notice any particular issue like this. But once again, this is simply a Windows operating system error code. It is quite clear.
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
[2019-05-28 11:46:35]
Sierra Chart Engineering - Posts: 104368
One difference between newer Sierra Chart versions and older versions is that once a DLL is loaded, it is no longer released. sc.FreeDLL =1 is just ignored. So there can be more DLLs loaded at any given time. That would be the only explanation we can think of.
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: 2019-05-28 11:46:53
[2019-05-28 19:44:42]
Blue Brazilian - Posts: 42
Ok then don't believe us. It inherently makes no sense of being an issue on the Sierra Chart side based on the error being returned
I understand that the error is coming from Windows and not from Sierra, but I can't understand why Windows doesn't generate the error with v1834 given that it's dealing with the same collection of DLLs.
How many DLLs are you loading and then we will run a test to see if we can notice any particular issue like this. But once again, this is simply a Windows operating system error code. It is quite clear.
I currently have around 230 DLLs in the Custom Study List. However, the windows error starts to appear from around the 85th DLL in the list.
One difference between newer Sierra Chart versions and older versions is that once a DLL is loaded, it is no longer released. sc.FreeDLL =1 is just ignored. So there can be more DLLs loaded at any given time. That would be the only explanation we can think of.
Presumably, when Sierra is restarted, there are no DLLs loaded (assuming there are no chartbooks automatically loaded at startup), or does it pre-load any DLLs that are included in chartbooks, even if those chartbooks are not currently active? The only reason I ask is because in one of the tests I did, a DLL that had been shown with the windows error code following a version update was subsequently shown as valid after it had been inserted in a chartbook prior to the Sierra version update.
[2019-05-28 21:22:20]
Sierra Chart Engineering - Posts: 104368
No DLLs are preloaded. Loading a DLL only happens when a study is being used.

Really you just need to reduce the number of DLLs you are using. This is the obvious solution. This is just so point-blank obvious what the problem is. The operating system just can't handle all the DLLs you are using. So don't use so many. This is not a Sierra Chart problem at all.
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: 2019-05-29 05:17:30

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

Login

Login Page - Create Account