 |
|  |
 |
|  |
 |
|
Fromafar
|
|
The load problem occurs when you load a pre-2004.04.17 game (e.g. an original Activision scenario, or a file you have saved yourself) with a post-2004.04.17 playtest build.
quote: Originally posted by Martin Gühmann
2004.04.17
..\ctp2_code\gs\slic\SlicBuiltin.cpp
[...]
Three new slic globals added by Martin Gühmann:
- g.num_of_players: Gets the number of players in the current game
- g.last_player: Gets the last player, the player with the highest index in the game
- g.max_player: Gets the maximum number of players that is in a game possible, currently it is 32 including the Barbarians.
|
The post-2004.04.17 playtest build tries to read 6 members of the g variable. An old file has only 3, so you end up reading displaced data, and will probably crash shortly afterwards. If you start a new game, and save with the post-2004.04.17 playtest build, it will save the 6 members, and load these without problems.
|
|
|  |
 |
|  |
 |
|
rdorau
|
|
Hi,
I tried the newest version (18.4.) and using the Mod "Apolyton+Good-Mod" (with ModUpdater) I was able to start a game. But afterloading it again the game crashed to desktop.
But perhaps it's a compatibility problem between ModUpdater and the newest testing version of the Apolyton Edition?
|
|
|  |
 |
|
Martin Gühmann
|
 |
Berlin, Germany
Mar 2001 time: 06:32
|
|
quote: Originally posted by Fromafar
The post-2004.04.17 playtest build tries to read 6 members of the g variable. An old file has only 3, so you end up reading displaced data, and will probably crash shortly afterwards. If you start a new game, and save with the post-2004.04.17 playtest build, it will save the 6 members, and load these without problems. |
The only problem with this is explaination is that it is not valid for this patch. It is right that I did the globals before John released the latest playtest, but I posted it afterwards, so you can load games saved with previous versions. However I looked into it and so far I have no idea why the global container crashes but the player array with the additional government member does not crash. However I consider this as a serious bug that needs to be removed, even if it means to remove the new globals, alternativly they could be realized as functions, but in my opinion it is more logical to realize the way to get to know how much players the game supports as global then as function, espeacilly if you consider that I just exposed a constant from c++ code to slic.
BureauBert: I did not tough the GrantAdvance function just the HasAdvance function, so nothing should be changed here, and in fact if you can start a new game of GoodMod then you can make the GrantAdvance function work. However there must be another problem if it crashes, do you have the crash.txt?
-Martin
|
|
|  |
 |
|
BureauBert
|
 |
Vienna, Europe
Apr 2003 time: 06:32
|
|
In the meantime I became aware of the fact that GoodMod uses GrantAdvance, too . It is really strange: I replayed GoodMod for a while and it ran with GrantAdvance() and no crash. I tried my hybrid Mod without GrantAdvance(): no crash - until my first attempt to destroy an enemy city: there I had forgotten a GrantAdvance() for my CityRuins-feature: imediate crash. I even compared the lines in GoodMod an in my script:
CityRuins:
PHP:
GrantAdvance(CIR_PrevOwner, AdvanceDB(ADVANCE_SUBNEURAL_ADS));
GoodMod:
PHP:
GrantAdvance(0, AdvanceDB(ADVANCE_SUBNEURAL_ADS));
The only difference is in the first argument, where
PHP:
CIR_PrevOwner = city[0].owner;
in my script. But I had also this line crashing the game (in NaturalWonders, immediately at the beginning of old barb's first turn):
PHP:
GrantAdvance(0, AdvanceDB(ADVANCE_SUBNEURAL_ADS));
which is pretty much identical to Martin's. Currently I am clueless on how to track this one down . Obviously GrantAdvance() works in build 2004-04-18, but sometimes it doesn't even where Activision's latest build did .
As for the second function, Terraform(), I haven't yet found a working example to compare, but I will continue research .
Martin: crash.txt - this must be a feature that comes with the debug version of the program, if I had installed the source-code-pack, which is not the case ... but if there is a way to get a crash.txt without running the entire CTP2-AE development environment, please let me know
|
|
|  |
 |
|
Martin Gühmann
|
 |
Berlin, Germany
Mar 2001 time: 06:32
|
|
quote: Originally posted by The Big Mc
I thought someone had fixed the pillaging neutral tile imps bug. I got the 3 of April build and when I go to destroy an old American tile imp which is spoiling my view it crashes. |
Actual we never fixed, I did some testing with a work around, but I wasn't happy, because it was a work around, but finally I noticed that the bug just disappeared, I guess it has to do something with the memory leaks Fromafar fixed and now reappeared.
quote: Originally posted by Fromafar
No problem here. It may crash just as well on the added player.government . The 3 new members were just earlier in the load process, so I found those first. After removing the 3 g members, the player.government one was exposed quite easily. After repairing this by commenting out the 4 AddMember statements in SlicBuiltin.cpp, loading old saves and starting scenarios works again. |
Then this means I loaded a scenario afterwards I added the player.government, in that case it means if you start a scenario, then slic is relaoded at scenario start actual what I exspected.
-Martin
|
|
|  |
 |
|
Maquiladora
|
|
Not that its very helpful but the save loaded fine on the unmodded 1.1 CtP2, then i tried loading with the 2004.4.12 playtest and it crashed on loading.
|
|
|  |
 |
|
gogo03
|
|
I compiled the source code successfully without any sound. because I comment out mss.h mss.lib.
where can I download these files?
|
|
|  |
 |
|
Fromafar
|
|
quote: Originally posted by Flinx
That is just bizarre! |
Most of the following information was already available, but the user noticable effects got a bit buried beneath the technical information to get to the cause of the error .
I guess it is time for a status update on the save file loading crashes.
Crashes when loading a file
At the moment, we have 4 different file formats for save files, dependent on the release. Only the first 2 types are correct.
- Playtest releases 2004.02.21 and before generate files that are in the same format as the original (unpatched) Activision release.
These releases can read files that have been generated with the unpatched Activision release, but can not read files that have been generated with the Activision 1.1 patch.
Files generated with this release can be loaded with the Activision executables (both patched and unpatched), and with the 2004.03.31 and 2004.04.03 releases.
- Playtest releases 2004.03.31 and 2004.04.03 generate save files that are compatible with the Activision 1.1 patch format.
This release is able to load both 1.1 patch format files and original unpatched format files.
Generated files can be loaded with the Activision 1.1 executable, but not with the unpatched executable, nor with playtest releases 2004.02.21 and before.
- Playtest release 2004.04.12 generates incorrect save files - because of the added player.government variable.
Loading any other than 2004.04.12 format files may cause a crash, and loading files generated with this release may cause a crash when loading with any other release.
- Playtest release 2004.04.18 generates another type of incorrect save files - because of 3 more added variables.
Loading correct or 2004.04.12 save files may cause a crash, and loading files generated with this release may cause a crash when loading with any other release.
Releases that crash on loading correct save files will also crash when starting a scenario.
For people with the source code: comment out the 4 new AddMember statements in SlicBuiltIn.cpp to reenable loading any correct file format and generation of Activision 1.1 patch format files.
Crashes after loading a file
These occur mostly when pressing the end of turn button, but may also be triggered by other Slic events during the movement phase.
All playtest releases since January 2004 contain a design error that may surface when executing database related Slic functions (such as GrantAdvance) after loading a file.
Using /reloadslic immediately after loading the file will prevent the crash.
So, nothing bizarre here. Just software.
|
|
|  |
 |
|  |
All times are GMT. The time now is 05:32. Apolyton Time is 00:32. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|