The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Ters on April 20, 2011, 11:42:25 AM

Title: Assertion `factory' failed.
Post by: Ters on April 20, 2011, 11:42:25 AM
I just upgraded one of my simutrans installations from version 102.3 nightly (unknown revision, but compiled 2010-12-31) to r4407 and pak64 from r351 to r450. When I try to load my savegame I get the following error towards the end of the loading process:

sim: simcity.cc:769: void stadt_t::factory_entry_t::resolve_factory(): Assertion `factory' failed.

Is the newest simutrans incapable of loading savegames this old? The savegame itself is actually a bit older than the executable, dating back to October 2010, but I get the same error if I open and save the game with 102.3 nightly and then try to open it with r4407. Is there maybe some inbetween version that could convert the game, or maybe r4407 is generally broken? Or is the savegame really corrupted, just that 102.3 doesn't notice or care?

This happens on my 64-bit machine.

Update:
The game also fails to load on my 32-bit machine (r4396).
Title: Re: Assertion `factory' failed.
Post by: Dwachs on April 20, 2011, 05:13:31 PM
could you upload this savegame somewhere?
Title: Re: Assertion `factory' failed.
Post by: Ters on April 20, 2011, 07:12:12 PM
http://simutrans-germany.com/files/upload/Ters_3.sve
Title: Re: Assertion `factory' failed.
Post by: TurfIt on April 20, 2011, 08:45:36 PM
Resaving the map using 110.0.1 and pak64 r450 allows me to load the map with r4407/r450.

Problem appears to be the cow_fields added to the cow_farm in r361. Removing the cow_fields from the pak allows the original save to be opened w/ 4407.
Title: Re: Assertion `factory' failed.
Post by: Dwachs on April 22, 2011, 12:58:25 PM
should work with rev 4408 too.
Title: Re: Assertion `factory' failed.
Post by: Ters on April 22, 2011, 02:58:00 PM
It loads, saves and loads again now. Thanks.

One thing I noticed in this save game: There are some sheep in the water east of Baringchester. Look near the final r in the minimap.
Title: Re: Assertion `factory' failed.
Post by: Dwachs on April 22, 2011, 07:38:11 PM
There was a bug introduced in 3818, fixed in 3854, that messed with these objects. Could this be the cause?
Title: Re: Assertion `factory' failed.
Post by: Ters on April 22, 2011, 09:21:32 PM
The dates for my savegame have been overwritten, so I can't check exactly, but those revisions are from October 2010 too, so I guess that bug is to blame.