Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! 2.6/7 » The Bar » New (?) Stars! Bug: 32k orders
New (?) Stars! Bug: 32k orders Wed, 13 May 2020 14:20 Go to next message
ricks03 is currently offline ricks03

 
Chief Warrant Officer 1

Messages: 143
Registered: January 2012
Location: NC
I've been trying to untangle the Stars! blocks, and have found a bug I don't think I've seen reported before.

The .x file is blocks of orders. I've been trying to add/remove blocks from my .x file but always having the file corrupt. I tracked the issue down to Block 9.

Block 9 is the FileHashblock. The first two bytes are a checksum for the .x file. Each block in the file (typically one "order") is summed for this checksum, where the value of a block is the number of bytes in the block (which is also the two bytes of the header + the number of bytes that are decrypted).

Two bytes means the checksum can be a maximum of 32767 (which if you're trying you can reach quickly by splitting and merging large fleets).

When the checksum reaches 32767 (ish) you get a warning: "Log file has reached the maximum allowable size. Commands will not be recorded."

If you happen to be, perhaps, stressing the limits of this by splitting and merging fleets such that you've submitted far more orders, you will be warned again but then Stars! will crash. In my case with "STARS! caused a General Protection Fault in module STARS.EXE at 0024:0ED0. Chose close. STARS! will close. "

The .x file itself isn't corrupted, just stopped saving changes just before the last save. If you haven't saved at all, you won't have a .x file. And if somehow you've submitted some 30000 orders, you'll be sad.



https://www.irelandbybicycle.com
https://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Re: New (?) Stars! Bug: 32k orders Tue, 14 July 2020 05:31 Go to previous message
russl5445 is currently offline russl5445

 
Crewman 3rd Class

Messages: 5
Registered: September 2008
Location: Tucson, AZ
I didn't realize that anybody was doing ongoing work to decode the Stars! files ... I thought I was the only one. Smile

I was just looking at the FileHashBlock last night, and the conclusion I came to is basically the same as you: that the first 2 bytes hold the length of the section(s) that follow. I wouldn't call that a "checksum," but that's just semantics. Smile

My assumption is that this was to solve races when a client might be trying to write out an update .X file, and the host might be looking for one. If the file length doesn't match the value predicted right up near the top of the file, then the host knows not to use the file (yet). I did some (very) quick experiments, and it seems like the rest of the block (15 bytes more) are constant - at least on a single machine. They seem not to change from turn to turn, or game to game. (Though I haven't done extensive testing yet.) I'm guessing that this must be where the "machine fingerprint" is stored.

Report message to a moderator

Previous Topic: StarsWine - Major update to new WINE engine
Next Topic: Stars! Official Strategy Guide - uptodate links to other sites
Goto Forum:
  


Current Time: Fri Aug 07 16:57:42 EDT 2020