-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schrodinger's user logs diffs #323
Comments
Ugnaught2.log:
1d0
< Waypoint label(s) not found in line: AR US167 I-530(3) AR69/69Bus
1.log:
0a1
> Waypoint label(s) not found in line: GA GA120 GA316 ClaSt Weird. This puts a stake through my theory about wacky |
Pending changes are not enough to perturb this out of existence. This time, it's 1995hoo.log:
1d0
< Unknown region/highway combo in line: ENG A344 A303 A360
|
sbeaver44.log:
1d0
< Waypoint label NLABREAAVE not found in line: CA US66HisHol NLaBreaAve HigAve neroute2.log:
1,2c1
< Waypoint label(s) not found in line: CA CA91 I-405 VerAve
< Waypoint label(s) not found in line: CA CA238 AppAve 14
---
> Waypoint labels APPAVE and 14 not found in line: CA CA238 AppAve 14 |
This may or may not be the bug I'm looking for, but it's in the TravelerList ctor, and I'm writing to areas of memory I shouldn't be. So maybe it's possible it could be producing these effects.
If a file begins with a blank line, this causes endchar to point to a location in memory before the beginning of the .list file copy. If that location contains a space or tab, we start overwriting stuff, and wacky antics ensue.Under just the right conditions, this can crash siteupdate entirely. With all the thousands of times I've run siteupdate with no crashes, I'm surprised I didn't notice the problem earlier. |
All of these errors affect the first line of the .log file. The lines shown in the diffs above aren't missing -- the timestamp string (which includes a newline) after 1,2c1
< Log file created at: Sun May 31 12:16:29 2020
< Waypoint label I-65 not found in line: AL AL14 I-65 US31
---
> Log file created at: Waypoint label I-65 not found in line: AL AL14 I-65 US31 Since the timestamp will always be changing, compare_all.sh ignores the first line of the file, thus turning the diff into: 1d0
< Waypoint label I-65 not found in line: AL AL14 I-65 US31 from http://www.cplusplus.com/reference/ctime/ctime/:
Appears that
Yup. The simplest thing to do may be to just slap a mutex around calling |
We already have
This is already used rarely and briefly; reusing it to lock ctime should not create a noticeable performance hit.
|
Currently using 1a2932ad6db82301d5c3d061c7d7772aebc112cb on BiggaTomato but this has been showing up for a while now...
Sometimes, compare_all.sh shows differences in user logs, E.G.
Running siteupdate again with no changes to HighwayData, UserData, the siteupdate executable or its parameters results in the diff disappearing.
Most perplexing. No idea what could be causing this.
I haven't noticed whether this happens for .log lines other than the "deprecated route name" variety. If it does, I'll log them here.
A new shell script can run siteupdate & compare_all.sh a set number of times or indefinitely, until diffs are found.
TBD: Does this happen...
ReadListThread
?Part of me hopes this will just go away when I address the other TravelerList ctor issues...
The text was updated successfully, but these errors were encountered: