Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 11:24:15 +0000



GlobalSymbolSettings.xml should be written out with a temp file then replaced on success

View Count: 1164

[2017-07-03 06:39:47]
i960 - Posts: 360
Due to SC crashing on shutdown, disk space issues, etc. this is probably the 4th-5th time I've corrupted the GlobalSymbolSettings.xml file. This wouldn't ever happen if SC simply wrote out a temp file and then replaced GlobalSymbolSettings.xml with the temp file rather than trying to write the file in-place (which is always unsafe).
[2017-07-03 06:52:31]
Sierra Chart Engineering - Posts: 104368
Due to SC crashing on shutdown
Why do you have this problem? There should not be a problem with an abnormal shutdown during the exit process.

We have never known there to be a problem with writing the GlobalSymbolSettings.xml file
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: 2017-07-03 06:52:53
[2017-07-03 07:55:25]
i960 - Posts: 360
Well I'm stating right now there's a problem with it and I've seen it happen multiple times. Just today I had yet another partial write out of GlobalSymbolSettings.xml pretty much corrupting any custom additions I made to it since the last time I had to redownload the entire thing again.

Look, just look at the code. If it's writing to the active filename and not verifying the write was successful it really doesn't matter what the reason was that something went wrong (e.g. crash, disk full, etc) - not using a temp file means corrupted or partially written files *will happen*. Using a tempfile means that said write can be verified as having been completed and then the move/replace is atomic and safe.

For the record, this was not a system crash it was an SC crash on shutdown (exit). Presumably SC is writing out GlobalSymbolSettings.xml on exit, but the real issue is the lack of a tempfile.
Date Time Of Last Edit: 2017-07-03 07:56:37
[2017-07-03 08:12:13]
Sierra Chart Engineering - Posts: 104368
We have never heard of this before and never observed this ourselves.

Makes no sense why there would be an exception when writing that XML file.

And that does not happen when Sierra Chart is exiting. You can check by just looking at the file time. It happens when the Symbol Settings change when Sierra Chart is running.

We have no other user experiencing anything like this.

Update to the current version which is 1568.
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
[2017-07-03 19:03:31]
i960 - Posts: 360
This is all that matters: Do you use a temp file or not?

If you write to an in-place file using something like an XML output function (or whatever) that *could* fail part way through you're bound to end up with a corrupted file at some point. It doesn't matter if it's never been seen before, I'm telling you that programmatically it can happen because the approach relies on everything happening correctly without error.

I've personally seen SC corrupt this file atleast 5 times now, so are you telling me I'm not seeing what I've clearly seen happen? Consider the user experience when it does happen. All custom changes are now gone, the file must be restored from backup (if available), or completely re-downloaded.

If you don't want to make the simple change to simply write to a temp file and replace (best practice), then how about make a change so GlobalSymbolSettings.xml is written to a .bak file so people will have a way out rather than getting screwed if it does get corrupted.
[2017-07-03 23:07:55]
Sierra Chart Engineering - Posts: 104368
If there is a problem we need to resolve it.

So whenever you modify the Symbol Settings check the Message Log and see if there are any exceptions reported.

Symbol Settings may also be updated when Sierra Chart starts.

We will make a backup of the XML symbol settings file first.

so are you telling me I'm not seeing what I've clearly seen happen?
We learn not to trust what users tell us because so often the information is inaccurate.

Also the problem with writing to a temporary file also requires that we know something went wrong to begin with which we may not.
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:

Login

Login Page - Create Account