Bug Report on Beta 1.06 patch

A private forum for those folks working on patches for RRT3.
User avatar
Wolverine@MSU
CEO
Posts: 1166
Joined: Fri Nov 10, 2006 2:14 pm
Location: East Lansing, MI

Bug Report on Beta 1.06 patch Unread post

Downloaded and installed the patch (with loco pack) and have had several CTDs with a few scenarios.

I tried it with my "Michigan 1830" map, and all seemed well until the AI tried to build (at the end of March/beginning of April). I get a repeatable CTD that is related to the presence of the AI. If I remove all AIs (re-edit the scenario and resave with no AIs) I don't get the CTD. As soon as I put an AI in the game, it crashes when the AI decides to start a company (or build track, don't know which).

I also tried EPH's new Union Pacific scenario, and couldn't even get past the introductory messages. Again, I think the problem is AI related because the trouble occurs after viewing the second dialog box. He's got some events that come right after the first dialog box, triggered to fire at start up, and that does things with the AI company (or maybe the other human company).

In a third case, I loaded up PJay's "Shattered Union" and let it rip to see if AIs alone caused the crash. After several started with no problem, I tried to start my own company and got immediate CTD.

I made a test scenario, didn't immediately start a company, and AIs built OK, but I didn't have time this morning to see whether it would CTD when I started a company after the AIs.

Any suggestions for further testing? Could someone else try these scenarios with the new patch and see whether they can replicate them?
User avatar
Hawk
The Big Dawg
Posts: 6503
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Unread post

I just tried it and in the Michigan 1830 scenario I got a CTD whenever the AI started (April), whether I had any track laid or not.
In Shattered Union I didn't have any CTD's. I tried twice. First time I let the AI start first, Second time I started first.
I don't have EP's new map.

BTW milo. In the read me, the www isn't necessary for the link to this forum. :wink:

Edit 1: Fired up Gibraltar Straits with 2 AI's. They started fine. As soon as I started a company after them-CTD.
Loaded it again and this time I got a CTD as soon as I started a comany, with no AI's started yet.

Edit 2: It seems I can't start a company in Gibraltar Straits at all without a CTD. AI's are not added to the scenario by default, only by choice. Whether I choose AI's or not, I can't start a company. AI's start companies fine.
Tried Shattered Union again and no problems at all.
Hawk
milo
Engineer
Posts: 512
Joined: Sat Nov 11, 2006 5:36 pm
Location: End of the line

Unread post

Cool, thanks! I'll look into it.
User avatar
bombardiere
Dispatcher
Posts: 425
Joined: Tue Nov 14, 2006 9:07 am
Location: Turku, Finland

Unread post

A quick test. The game I begun with 1.06A was stable during a short play. Custom consist “Any freight” picked up only profitable cargoes. Thanks. This is my liking.

However CTD with Shattered Union. Short play, I started my company and at least two AI companies started, then crash. CTD when in editor mode and trying to reset “Region 00” (e.g. a region not in the map) industry to zero.

Funny note. My Sandbox train test scenario, which was set; frozen at midday, is now frozen at midnight.

BTW did I see it correctly and there are many new special conditions? Those from the sandbox. Is it possible to froze day/night cycle in normal scenarios?
milo
Engineer
Posts: 512
Joined: Sat Nov 11, 2006 5:36 pm
Location: End of the line

Unread post

No, thought about it, but I was already two weeks late at that point and would probably have had to modify rt3.lng to get it in. Effect should be possible through an ! operation at the right place. Sole new special condition was in fact an existing hidden one: Disable Customs House.

That Sandbox note is a little ominous - suggests a stray write. Can you get that scenario to me?
milo
Engineer
Posts: 512
Joined: Sat Nov 11, 2006 5:36 pm
Location: End of the line

Unread post

Wolverine, Hawk, I've reproduced your crashes. Both problems are related to what looks like a bad patch section around 431ECDh in the code. Probably happens on a Territory - Allow All event. Should be simple to fix... done. It'll take me another evening to test it (read: play me some RT3!), and I should include Bombardiere's proposed changes to the Loco Pack side as well.

I'm expecting about 3-4 of these, in case anyone's worried. There's enough new code, particularly with the rewritten event engine, that it'd be disturbing NOT to see crashes. This one's common enough that I probably should have caught it with a little more testing, but it won't be the last.

New job's leaving me about two hours of evening free, so I won't have to abandon you guys quite yet. :wink:
User avatar
Hawk
The Big Dawg
Posts: 6503
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Unread post

Great! Glad you found the problem. :D
I certainly hope you don't abandon us. We need you. :wink:
You and bombar are bringing life back into the game. {,0,}
Ya' know milo, you could cut back on sleep to work on this patch. :lol:
Hawk
User avatar
bombardiere
Dispatcher
Posts: 425
Joined: Tue Nov 14, 2006 9:07 am
Location: Turku, Finland

Unread post

That Sandbox note is a little ominous - suggests a stray write. Can you get that scenario to me?
For testing new engines I used Sandboxes with all locos available. This is Poptop Spanish Mainline. (with Steve’s fixes??) To see the test work at optimum, I froze it for the midday and now it is in midnight. I can zip the savefile and send it to you. Is that what you want?

BTW reseting game options (I had to do this resently) also resets Sandbox settings. Because of this, I have to begun new Sandboxes fairly regulary, but this one changed itself after the patch.
milo
Engineer
Posts: 512
Joined: Sat Nov 11, 2006 5:36 pm
Location: End of the line

Unread post

Yes, please! I haven't duplicated this one yet.
milo
Engineer
Posts: 512
Joined: Sat Nov 11, 2006 5:36 pm
Location: End of the line

Unread post

Weird - Bombardiere, I got your sandbox map, and it's showing me noon!

I'll hunt down where the setting gets stored, and see what else is stored near it. About the only differences I can think of between our installations are the number of sandbox savefiles and the extra stuff we've put into our data directories.
User avatar
bombardiere
Dispatcher
Posts: 425
Joined: Tue Nov 14, 2006 9:07 am
Location: Turku, Finland

Unread post

Strange indeed. :? The Sandbox is midnight in my computer, even though it should be that noon.

Yup, I have way too much extra stuff floating around that I get confused.
milo
Engineer
Posts: 512
Joined: Sat Nov 11, 2006 5:36 pm
Location: End of the line

Unread post

Oops. Looks as if the Sandbox time option is NOT stored as part of the sandbox file - it's stored as a game configuration setting instead. Those stay set even if you exit the game and then restart it.
  • Create a sandbox locked at 1 PM, and save it.
  • Change the time to 4PM through the Settings menu.
  • Reload the 1PM sandbox. It's still locked at 4PM!
Do you remember if you were experimenting with other time settings in a different sandbox? If not, it could still be that the patch overwrote the setting.
milo
Engineer
Posts: 512
Joined: Sat Nov 11, 2006 5:36 pm
Location: End of the line

1.06 Time-of-Day tricks Unread post

Time-of-day is normally derived from the scenario clock plus a floating-point offset, but can be frozen by setting either of two pairs of values in the game object. Sandbox mode uses the second pair in the game object: if [Game+233h] is nonzero, then use [Game+237h] as the time of day.

Here's 1.06 event code to read the current sandbox setting:

Code: Select all

GV1 @ 7138420   (location of Game object)
GV1 + 567          (decimal offset of time-of-day element; = 237h)
GV1 @ GV1         (read time-of-day value)
Note that if time-of-day has been set to 'normal progression', GV1 will contain the value it was last frozen at. Value is in hours.

Here's similar code to read the actual time of day being rendered:

Code: Select all

GV1 @ 7159844  (location of GameEngine object)
GV1 + 24           (offset of pointer to Renderer within GameEngine)
GV1 @ [GV1]      (location of Renderer object)
GV1 + 13           (offset of time-of-day within Renderer)
GV1 @ [GV1]      (read time-of-day value)
Unlike the previous example, this returns the current second, where 0=midnight. Try experimenting by making this a status event and changing the last line to GV1 ! 0 (midnight) or GV1 ! 43200 (noon); bringing up the ledger should instantaneously change the time of day, and unpausing should reset it back to what it was.

There doesn't seem to be a good way to freeze the time-of-day in such a way that saving and restoring the scenario preserves it. It is possible to change the time-of-day relative to the scenario clock, but that takes a hard-to-read floating-point number. This shifts the apparent time of day to 12 hours later than it would normally be:

Code: Select all

GV1 @ 7138424      (location of Scenario object)
GV1 + 3066            (offset of time-of-day adjustment within Scenario)
GV1 ! 1094713344   (set offset to +12.0 hours)
User avatar
bombardiere
Dispatcher
Posts: 425
Joined: Tue Nov 14, 2006 9:07 am
Location: Turku, Finland

Unread post

Do you remember if you were experimenting with other time settings in a different sandbox? If not, it could still be that the patch overwrote the setting.
No. But I know that reseting the game option reset the Sandbox option, but I didn't do it this time.

I don't understand anything about the second post, but hey I don't need to. :lol: And this is not important, as long as it is not fatal. (I guess that is what you are trying to find out)
milo
Engineer
Posts: 512
Joined: Sat Nov 11, 2006 5:36 pm
Location: End of the line

Unread post

With Bombardiere's help, I fixed the flaky behavior with skinning buttons on the loco purchase dialog when all of the optional locos were installed. There were only 100 button IDs allocated; there's now room for nearly 1000. I have 106 locomotives currently installed and apparently usable.

Still running out of effect space with that many locos. I'll give that fix one more shot. Next beta release coming soon regardless of the outcome.

Also, Bombardiere reported an isolated crash after playing for an hour. You may want to set up Dr. Watson, a debugging tool that ships with XP, in advance; it can log the crash details when the crash happens.
milo
Engineer
Posts: 512
Joined: Sat Nov 11, 2006 5:36 pm
Location: End of the line

Beta 2 Release Unread post

Okay, Beta 2 is out. Fixes everything reported here so far.

I'm kind of annoyed about the loco availability and cost effects. Right now, if you have more than 100 locomotives, some of them (starting with the CtC engines) fall off the end - there's only 100 slots for each event type, so the 101st engine bumps the Zephyr's availability and cost effects off the list. Lama's "The Cheshire", for example, is now offering me a Kriegslok to try to make my express requirements. :P

I wrote a whole bunch of code to allocate effects for trains that were enabled on the Locomotive ed page only. Worked beautifully. Then I found out that most scenarios that make specific locos available >do not enable them< on that page. Rassam frassam grbletybits. Rip out code, recompile, post beta, go sulk.

We're going to need some sort of resource-swapping scheme anyway, because we'll hit the same problem with new cargoes almost immediately and with buildings later on. It's gonna have to be a separate utility, though.
milo
Engineer
Posts: 512
Joined: Sat Nov 11, 2006 5:36 pm
Location: End of the line

Unread post

... And the first bug report on the new version: I seem to have lost custom player portraits. Probably means I slipped up when fixing the company logo problems; they use the same code.
milo
Engineer
Posts: 512
Joined: Sat Nov 11, 2006 5:36 pm
Location: End of the line

Unread post

Beta 2: Hit a CtD in the "Set Track Pieces Buildable" event, address 431E9Ah. Shouldn't be too hard to fix - looks as if I simply used the wrong register for two instructions.
User avatar
bombardiere
Dispatcher
Posts: 425
Joined: Tue Nov 14, 2006 9:07 am
Location: Turku, Finland

Unread post

We're going to need some sort of resource-swapping scheme anyway, because we'll hit the same problem with new cargoes almost immediately and with buildings later on. It's gonna have to be a separate utility, though.
Perhaps we can focus on that later. For now may be it is best to consentrate the Patch issues...

Assuming that Pure Al comes back later, I perhaps would want to discuss 3D topic. Another topic which I have purposely avoided so that it would not confuse the Patch issue. This is part of the reason why I have wanted to keep Locomotives separate from the Patch. So that there would be clear focus on what we are doing. (sorry I am a male and can concentrate on one issue at time. :lol: )
milo
Engineer
Posts: 512
Joined: Sat Nov 11, 2006 5:36 pm
Location: End of the line

Unread post

The Cities+Regions editor page CtDs if there are no buildings defined in a region.
Post Reply