Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Dec 17, 2018 6:42 am

All times are UTC




Post new topic  Reply to topic  [ 21 posts ]  Go to page 1 2 Next
Author Message
PostPosted: Sat Jan 11, 2014 1:02 am 
Offline
Engineer
Engineer
User avatar

Joined: Mon Dec 23, 2013 8:21 pm
Posts: 21
Location: Out in the woods of Crystal River, Florida USA
I'm having a strange hanging problem when attempting to load the attached saved game. First, a bit of info...

My goal was to use TTDPatch *ONLY* for performing extremely tedious tasks... such as converting all of my rails to MagLev (sending all trains to their depots, converting to MagLev, purchasing new MagLev engines and cars, and then sending them on their way again). My game plan was to normally play the game in regular TTD, and then load the saved game when running TTDPatch in order to accomplish these tasks.

Hence, I have disabled *EVERYTHING* in my "TTDPATCH.CFG" file (using the "off" commands for each entry/option), except for the following things/features:

cheatscost on
signcheats on

So, I load the saved game when running TTDPatch, use the sign cheat "cht: tracks 2", and then the sign cheat "cht: renew". I then save the game.

After exiting the game while running TTDPatch, I start up regular TTD, load the saved game, and play a while. Then, I save the game.

After exiting the game, any time that I run TTDPatch again and attempt to load the saved game, the game/TTDPatch hangs.

In other words... TTD/Load&Save -> TTDPatch/Load&Save -> TTD/Load&Save -> TTDPatch/Load/HANG.

I see the "Zzzzz" mouse cursor, I can actually MOVE the mouse cursor, and the music continues to play... meaning that TTDPatch hasn't really locked up I suppose.

SOMETIMES (no too often though) if I sit there LONG ENOUGH, the game will finally load... sometimes and long as 10 minutes or so <aarrggh>.

In those cases, if I then save the game while TTDPatch is running, I can usually reload the saved game with TTDPatch, and it loads just fine (in a few seconds).

BTW, I've been able to reproduce this problem each and every time... take one of my normal TTD saved games, load while running TTDPatch, save the game; exit and start regular TTD, save the game, exit and start TTDPatch, and it hangs every time.

P.S. I'm running the DOS version of TTDPatch v2.5 Beta 9 and the game (under DOSBox), but I've ALSO tried the regular version 2.0 release verion, as well as the latest/last "nightly" build... having the same problem with all of the various versions of TTDPatch.

Lastly, I've also tried loading the saved game when running TTDPatch (all of the above mentioned versions) using the default "TTDPATCH.CFG" file, but also still have the hanging problem.

Anyone have any idea why TTDPatch is hanging?


Attachments:
TRT97.SV1 [343.31 KiB]
Downloaded 134 times
TRT98.SV1 [343.76 KiB]
Downloaded 137 times

_________________
Rich ¥Weeds¥ Nagel
http://www.richnagel.net
Top
   
PostPosted: Sun Jan 12, 2014 4:54 am 
Offline
Engineer
Engineer
User avatar

Joined: Mon Dec 23, 2013 8:21 pm
Posts: 21
Location: Out in the woods of Crystal River, Florida USA
P.S. Something that I just discovered (not sure how helpful it is though)... Attempting to load these saved games into OpenTTD (release version 1.3.3) results in the following error message:

Game load failed
Data integrity check failed

_________________
Rich ¥Weeds¥ Nagel
http://www.richnagel.net


Top
   
PostPosted: Sun Jan 12, 2014 7:17 am 
Offline
Moderator
Moderator
User avatar

Joined: Sat Apr 02, 2005 7:01 am
Posts: 3679
Location: Sydney NSW Antipodea
I may have a look later in the week.

_________________
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/


Top
   
PostPosted: Sun Jan 12, 2014 7:21 am 
Offline
Engineer
Engineer
User avatar

Joined: Mon Dec 23, 2013 8:21 pm
Posts: 21
Location: Out in the woods of Crystal River, Florida USA
roboboy wrote:
I may have a look later in the week.


Many thanks :)

BTW, I forgot to mention that I ALSO tried the same thing in TTDLX and TTDPatch for Windows, but experienced the same hanging problem.

Lastly, just to clarify: The attached saved games load into regular TTD just fine... they only hang when running TTDPatch.

_________________
Rich ¥Weeds¥ Nagel
http://www.richnagel.net


Top
   
PostPosted: Thu Feb 20, 2014 8:25 am 
Offline
Engineer
Engineer
User avatar

Joined: Mon Dec 23, 2013 8:21 pm
Posts: 21
Location: Out in the woods of Crystal River, Florida USA
Sorry to dig up this message thread, but has anyone discovered anything that might shed some light on this problem?

_________________
Rich ¥Weeds¥ Nagel
http://www.richnagel.net


Top
   
PostPosted: Thu Apr 03, 2014 5:32 am 
Offline
Moderator
Moderator
User avatar

Joined: Sat Apr 02, 2005 7:01 am
Posts: 3679
Location: Sydney NSW Antipodea
Sorry I haven't had time to look at this. I would like to have a look once I finish my studies in the next few months. From reading your first post, no matter what version of TTDPatch be it 2.0 r1 (Effectively unsupported), 2.5 Beta 9 or the "Latest" 2.6 build you have this issue. Can you please recheck that the issue occurs with both 2.5 r2372 and 2.6 r2384. They can be found in the stickies in the General TTDPatch Forum.

_________________
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/


Top
   
PostPosted: Thu Apr 03, 2014 10:42 am 
Offline
Engineer
Engineer
User avatar

Joined: Mon Dec 23, 2013 8:21 pm
Posts: 21
Location: Out in the woods of Crystal River, Florida USA
roboboy wrote:
Sorry I haven't had time to look at this. I would like to have a look once I finish my studies in the next few months.


No problem, and many thanks :)


roboboy wrote:
From reading your first post, no matter what version of TTDPatch be it 2.0 r1 (Effectively unsupported), 2.5 Beta 9 or the "Latest" 2.6 build you have this issue.


That is correct.


roboboy wrote:
Can you please recheck that the issue occurs with both 2.5 r2372 and 2.6 r2384. They can be found in the stickies in the General TTDPatch Forum.


Yes, same issue with both of those versions (TTDPatch v2.5 r2372 and TTDPatch v2.6 r2384).

_________________
Rich ¥Weeds¥ Nagel
http://www.richnagel.net


Top
   
PostPosted: Fri Apr 04, 2014 6:04 pm 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Wed May 26, 2004 4:37 pm
Posts: 1804
Location: Britain
I'm assuming a saved game never altered by TTDPatch doesn't exhibit the same behaviour?

From a fairly brief debug of the newloadproc function I find that some information stored by TTDPatch in the edge tiles is causing the issue, possibly due to partial corruption of that information by TTD. The pause is actually caused by TTDPatch believing it has additional unknown chunks (of large size) and trying to thus skip them (through a loop).

I'm currently unsure how to resolve the issue, however there does seem to be a pattern (at least in the two saved games I tested from yourself) to the chunk identifier which might a possible avenue of investigation.

~ Lakie

_________________
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."


Top
   
PostPosted: Fri Apr 04, 2014 6:15 pm 
Offline
Engineer
Engineer
User avatar

Joined: Mon Dec 23, 2013 8:21 pm
Posts: 21
Location: Out in the woods of Crystal River, Florida USA
Lakie wrote:
I'm assuming a saved game never altered by TTDPatch doesn't exhibit the same behaviour?


The problem still exists even if I make no changes using TTDPatch (the "cht" signs, etc...).

In other words:

1 - Load and save with TTDPatch (making no changes using TTDPatch)

2 - Load and save with TTDlx

3 - ...and then attempting to load the saved game again using TTDPatch.


Lakie wrote:
I'm currently unsure how to resolve the issue, however there does seem to be a pattern (at least in the two saved games I tested from yourself) to the chunk identifier which might a possible avenue of investigation.


Thanks for the info and help :)

_________________
Rich ¥Weeds¥ Nagel
http://www.richnagel.net


Last edited by RichNagel on Fri Apr 04, 2014 6:19 pm, edited 1 time in total.

Top
   
PostPosted: Fri Apr 04, 2014 6:18 pm 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Wed May 26, 2004 4:37 pm
Posts: 1804
Location: Britain
But has still been loaded (and saved by) by TTDPatch at some point at least?

~ Lakie

_________________
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."


Top
   
PostPosted: Fri Apr 04, 2014 6:20 pm 
Offline
Engineer
Engineer
User avatar

Joined: Mon Dec 23, 2013 8:21 pm
Posts: 21
Location: Out in the woods of Crystal River, Florida USA
Lakie wrote:
But has still been loaded (and saved by) by TTDPatch at some point at least?


Yes, that is correct.

_________________
Rich ¥Weeds¥ Nagel
http://www.richnagel.net


Top
   
PostPosted: Fri Apr 04, 2014 6:25 pm 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Wed May 26, 2004 4:37 pm
Posts: 1804
Location: Britain
That would explain the presence of some of the TTDPatch information on the edge tiles.
Do you have a copy of such a game I could look at?

~ Lakie

_________________
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."


Top
   
PostPosted: Fri Apr 04, 2014 6:44 pm 
Offline
Engineer
Engineer
User avatar

Joined: Mon Dec 23, 2013 8:21 pm
Posts: 21
Location: Out in the woods of Crystal River, Florida USA
Lakie wrote:
That would explain the presence of some of the TTDPatch information on the edge tiles. Do you have a copy of such a game I could look at?


Sure enough :) Attached is a ZIP containing three saved games of the same currently running game:

TRT90.SV1 - Original saved game using TTDlx.

TRT91.SV1 - "TRT90.SV1", which has then been loaded and saved using TTDPatch.

TRT92.SV1 - "TRT91.SV1", which has then been loaded and saved using TTDlx.

Note that this was using TTDPatch version 2.5 Beta 9, and using a default "TTDPATCH.CFG" file


Attachments:
TTDlx_and_TTDPatch_Saved_Games.zip [527.89 KiB]
Downloaded 103 times

_________________
Rich ¥Weeds¥ Nagel
http://www.richnagel.net
Top
   
PostPosted: Fri Apr 04, 2014 7:49 pm 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Wed May 26, 2004 4:37 pm
Posts: 1804
Location: Britain
The last file doesn't seem to exhibit the same behaviour (and all lack the TTDPatch data, as nothing has changed that's understandable).
You always keep them paused whilst traversing them between TTDLX and TTDPatch right? From the looks of it that doesn't change (or harm) the saved game at all.

[Edit] Well, the files are definitely different, but it doesn't seem to add the TTDPatch data at least.

[Edit #2] My working theory is that the games affected were originally saved with additional TTDPatch chunk(s) which have been disregarded by TTDLX thus causing issues when loading with TTDPatch.

~ Lakie

_________________
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."


Top
   
PostPosted: Sat Apr 05, 2014 11:16 am 
Offline
Engineer
Engineer
User avatar

Joined: Mon Dec 23, 2013 8:21 pm
Posts: 21
Location: Out in the woods of Crystal River, Florida USA
Lakie wrote:
The last file doesn't seem to exhibit the same behaviour (and all lack the TTDPatch data, as nothing has changed that's understandable).


Hmmm, I just discovered that as well. Strange... maybe it was because I didn't allow the game to run long enough for the additional chunks to be added to the saved games (?).


Lakie wrote:
You always keep them paused whilst traversing them between TTDLX and TTDPatch right? From the looks of it that doesn't change (or harm) the saved game at all. [Edit] Well, the files are definitely different, but it doesn't seem to add the TTDPatch data at least.


In this case, yes. I figured that I'd pause them immediately upon loading them, and then save them while paused... I mistakenly thought that this might help with the troubleshooting.


Anyhow, attached is another ZIP that includes three additional saved games ("TRT90.SV1" is the same as the one inlcuded in the previous ZIP). For these saved games, I allowed the game to run for a short while (instead of loading and saving them paused), and the "TRT92.SV1" saved game definitely exhibits the behavior (hangs TTDPatch).

Filename convention and scheme is the same as my previous post:

TRT90.SV1 - Original saved game using TTDlx.

TRT91.SV1 - "TRT90.SV1", which has then been loaded and saved using TTDPatch.

TRT92.SV1 - "TRT91.SV1", which has then been loaded and saved using TTDlx.


Attachments:
TTDlx_and_TTDPatch_Saved_Games_2.zip [527.53 KiB]
Downloaded 98 times

_________________
Rich ¥Weeds¥ Nagel
http://www.richnagel.net
Top
   
PostPosted: Wed Apr 30, 2014 8:55 pm 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Wed May 26, 2004 4:37 pm
Posts: 1804
Location: Britain
The issue definitely seems to be caused by TTDPatch saving additional chunks (which are later disregarded by TTD), and the load system trying to skip over 'phantom' chunks.
I can't see an obvious solution as yet, I believe TTD(Patch) uses a buffer system which ignores whether all requested bytes were read (i.e. whether its hit the end of the file).

~ Lakie

_________________
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."


Top
   
PostPosted: Wed Apr 30, 2014 10:03 pm 
Offline
Engineer
Engineer
User avatar

Joined: Mon Dec 23, 2013 8:21 pm
Posts: 21
Location: Out in the woods of Crystal River, Florida USA
Many thanks for the info and investigation, Lakie :)

I'm sure that this is probably a no-go, but any chance of coding a separate command-line utility that could strip the additional chunks from a savegame file?

_________________
Rich ¥Weeds¥ Nagel
http://www.richnagel.net


Top
   
PostPosted: Mon May 12, 2014 3:30 pm 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Wed May 26, 2004 4:37 pm
Posts: 1804
Location: Britain
Whilst it won't solve the issue completely you can use sv1codec to expand the saved game data ('.big', so it can be edited) and then re-compress it (for playing).
In particular you'd need to hex edit (using a hex editor) address 0x44CB8 in the raw data to 0 (for 2 bytes), this can also be achieved quite easily through simple programs or scripting languages.
That should prevent saved games attempting to load additional chunks.

~ Lakie

_________________
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."


Top
   
PostPosted: Mon May 12, 2014 8:19 pm 
Offline
Engineer
Engineer
User avatar

Joined: Mon Dec 23, 2013 8:21 pm
Posts: 21
Location: Out in the woods of Crystal River, Florida USA
Lakie wrote:
Whilst it won't solve the issue completely you can use sv1codec to expand the saved game data ('.big', so it can be edited) and then re-compress it (for playing).

In particular you'd need to hex edit (using a hex editor) address 0x44CB8 in the raw data to 0 (for 2 bytes), this can also be achieved quite easily through simple programs or scripting languages.

That should prevent saved games attempting to load additional chunks.


MANY MANY MANY THANKS for that info, Lakie!! :) THAT is EXACTLY what I was looking for, and I'll give it a whirl later today :)

_________________
Rich ¥Weeds¥ Nagel
http://www.richnagel.net


Top
   
PostPosted: Mon May 12, 2014 8:50 pm 
Offline
Engineer
Engineer
User avatar

Joined: Mon Dec 23, 2013 8:21 pm
Posts: 21
Location: Out in the woods of Crystal River, Florida USA
Hehe, I was so exited I couldn't wait for "later today" <grin>... IT WORKS PERFECTLY! A BIG thanks again! :)

_________________
Rich ¥Weeds¥ Nagel
http://www.richnagel.net


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 21 posts ]  Go to page 1 2 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.