Transport Fever 2

Transport Fever 2

View Stats:
Assertion Failure
Hi, I really enjoy this "game", though it's a bit bland without mods so have over 200 of them, thanks to all of you who supply them. After playing for many hours the game crashes with the following message AssertionFailure Assertion:townBuilding.depth = = (int)townBuilding.parcels.size0||townBuilding depth = = (int)townBuilding.parcels.size0 + 1' failed Don't really understand what this means, I do not have player ownership roads. It's very frustrating having spent hours adding scenery etc, my computer knowledge is restricted to being able to use a mouse and keyboard, any clever people out there able to help, or advise please ?
< >
Showing 1-12 of 12 comments
numbat Jan 20 @ 12:14pm 
Can you upload your crash version stdout.txt file to cloud storage and post a link? There might be some helpful information in there.

Cheers,
Chris.
Thanks for your reply Chris, though I'm not entirely sure I understand what you mean, and would need you to guide me through how to do it.
Best wishes,
Mick
Where does the crash occur? Only with the simulation running at a specific game time?

The stdout file is located in the game's local/crash folder. Post the last 5% or so of that here.
In file: urban_games/train_fever/src/Game/procedural/BuildingTypeRep.cpp:473

In function: void __cdecl BuildingTypeRep::ConstructProposal(const struct parcel_util::BuildingDesc &,const class std::vector<struct CVec3f,class std::allocator<struct CVec3f> > &,const struct street_util::StreetToolkit &,const struct parcel_util::ParcelContext &,class boost::random::mersenne_twister_engine<unsigned int,32,624,397,31,2567483615,11,4294967295,7,2636928640,15,4022730752,18,1812433253> &,struct construction_builder_util::Proposal &,const struct CMat4f &,bool) const


__CRASHDB_CRASH__ struct AssertException: urban_games/train_fever/src/Game/procedural/BuildingTypeRep.cpp:473: void __cdecl BuildingTypeRep::ConstructProposal(const struct parcel_util::BuildingDesc &,const class std::vector<struct CVec3f,class std::allocator<struct CVec3f> > &,const struct street_util::StreetToolkit &,const struct parcel_util::ParcelContext &,class boost::random::mersenne_twister_engine<unsigned int,32,624,397,31,2567483615,11,4294967295,7,2636928640,15,4022730752,18,1812433253> &,struct construction_builder_util::Proposal &,const struct CMat4f &,bool) const: Assertion `townBuilding.depth == (int)townBuilding.parcels.size() || townBuilding.depth == (int)townBuilding.parcels.size() + 1' failed.
Exception type: Fatal error

Details:

Assertion Failure: Assertion `townBuilding.depth == (int)townBuilding.parcels.size() || townBuilding.depth == (int)townBuilding.parcels.size() + 1' failed.

Minidump: C:/Program Files (x86)/Steam/userdata/51858104/1066780/local/crash_dump/27ba2b43-1f34-434c-b4ab-c4f8af42ac23.dmp

UI Component Hierarchy:
type: class UI::CGameUI, id = "", name = "CGameUI", styleClasses = {"top-gamebar-visible"}
type: class UI::CMenuUI, id = "", name = "MenuUI", styleClasses = {}
type: class UI::CComponent, id = "", name = "wrap", styleClasses = {"mods-enabled", "platform-desktop", "ui-classic", "input-mouse", "gamepad-type-xbox"}


In file: urban_games/train_fever/src/Game/procedural/BuildingTypeRep.cpp:473

In function: void __cdecl BuildingTypeRep::ConstructProposal(const struct parcel_util::BuildingDesc &,const class std::vector<struct CVec3f,class std::allocator<struct CVec3f> > &,const struct street_util::StreetToolkit &,const struct parcel_util::ParcelContext &,class boost::random::mersenne_twister_engine<unsigned int,32,624,397,31,2567483615,11,4294967295,7,2636928640,15,4022730752,18,1812433253> &,struct construction_builder_util::Proposal &,const struct CMat4f &,bool) const



Goodbye.



========================================
Shutdown at Tue Jan 21 15:20:27 2025
========================================
Thanks for your input Tsubame. Hopefully what I've posted is what you require. I was running the game at 1/4 speed.

Mick
RadiKyle Jan 21 @ 11:01am 
I see it mentions "mersenne_twister_engine"..., no idea what that is, but maybe a mod you have? It doesn't sound vanilla.
I've no idea what it is either RadiKyle, will check through the mods.
numbat Jan 21 @ 12:43pm 
@radikyle, mersenne_twister_engine is very likely part of the game. A mersenne twister is a pseudo random number generator. https://en.wikipedia.org/wiki/Mersenne_Twister

So the game appears to be crashing when it's trying to grow a town or road. If it were me, I'd add the following mod just to see if the game stops crashing. Note that the mod stops any AI building, so your towns and roads won't grow any while you're using it, but at least it will help narrow down the issue.

Cheers,
Chris.

https://steamcommunity.com/sharedfiles/filedetails/?id=2044636379
Thanks Chris, that makes sense. Thanks to you, and others for your time and effort.
Best Wishes,
Mick
Originally posted by ThameslinkMick:
AssertionFailure Assertion:townBuilding.depth = = (int)townBuilding.parcels.size0||townBuilding depth = = (int)townBuilding.parcels.size0 + 1' failed

An assertion is an error detection construct used in C and C++ which is similar in some ways to exception handling (try...catch blocks). However, whereas a try..catch block is designed to fail a test gracefully and not terminate the program if an assertion fails the program is stopped dead, process terminated.

For this reason assertions are normally only used for debugging and testing during development and one would not expect to see one pop up in production code. Try....Catch blocks are normally used in shipped code so the user gets a helpful error message they can report to support (or a forum etc).

The test in this case seems to be comparing the "building depth" to a "parcels size" whatever those terms mean, and it's saying that the building depth must be exactly one greater than the size of the parcel/parcels or we're done here. I haven't the foggiest why, it looks like graphics stuff to me. If so then odds on one of your 200 mods concerned with placing or drawing town buildings has caused this.

Its possible UG have left this assertion in specifically because of mods.
Originally posted by numbat:
@radikyle, mersenne_twister_engine is very likely part of the game. A mersenne twister is a pseudo random number generator. https://en.wikipedia.org/wiki/Mersenne_Twister

So the game appears to be crashing when it's trying to grow a town or road. If it were me, I'd add the following mod just to see if the game stops crashing. Note that the mod stops any AI building, so your towns and roads won't grow any while you're using it, but at least it will help narrow down the issue.

Cheers,
Chris.

https://steamcommunity.com/sharedfiles/filedetails/?id=2044636379

This is good trying. Even then, it might take a bit of time to figure out where in the map is the issue occurring.

I have had once an assertion failure involving the game trying to spawn a road across an elevated train station.
RadiKyle Jan 21 @ 8:34pm 
Originally posted by numbat:
@radikyle, mersenne_twister_engine is very likely part of the game. A mersenne twister is a pseudo random number generator. https://en.wikipedia.org/wiki/Mersenne_Twister

Cool! That's some random trivia lol! I thought it was a 60s car or a mixed drink 😅
< >
Showing 1-12 of 12 comments
Per page: 1530 50

Date Posted: Jan 20 @ 3:28am
Posts: 12