Need Help Fixing CTD

deanej

Deity
Joined
Apr 8, 2006
Messages
4,859
Location
New York State
I have a user of my Star Trek mod (link in sig) that is having CTD problems when playing the 22nd century and Earth-Romulan War scenarios. The CTD happens when hitting end turn when he plays as Earth, and immediately when playing as anyone else. He does not get the CTD when playing a random map.

I have no idea what causes this CTD. I can't recreate it on my end, even when using a save game. My only guess is that it has something to do with the fact that he's using vista 64 bit, so civ is in Program Files (x86) instead of Program Files. I have no idea why this would cause issue with these scenarios and not the other scenarios. Can anyone help?
 
If you can't reproduce the problem there's very little you can do unless your user is pretty savvy and can do some active debugging.

About the only thing I can suggest is to create a test version of the mod that adds lots of debug print statements and have him run that; after examining the logs you might then have a better idea of when it crashes and therefore why. Along the same lines, perhaps have him run under a DLL with asserts turned on so that he can report any assert messages that trigger before the crash.
 
if you tell me in detail what to do i do it
the funy thing is i can play the rest of star trek scenarios with vista 64
 
@Dresden: Sorry I didn't reply earlier, the forums forgot to send a topic reply notification when you replied so I didn't see the thread until today. I don't know how much print statements would help, as their really aren't any python differences between these scenarios and other scenarios that I can think of. I don't know how to do a DLL with asserts and wouldn't really know what to do with one if I did. I've only seen this issue reported with Vista, but I don't know why Vista would cause issues with these scenarios and not others.
 
Does your mod use a custom DLL or the standard BTS 3.17 DLL?

Another possibility, since it is Vista, is security restrictions if there is something weird with game logging going on. Does it still crash if BTS is launched using the "Run as Administrator" option?
 
how i can check
i try to run as administrator stil crash

when i try to run compativility xp the computer ask for the correct cd rom

where are the DLL

try pytons y think is the solusion

please i now you are there tell me what else i can do

please thank you
 
To turn on asserts when compiling a custom DLL (without making a full debug version), open up FAssert.h and look for the following lines:
Code:
// Only compile in FAssert's if FASSERT_ENABLE is defined.  By default, however, let's key off of
// _DEBUG.  Sometimes, however, it's useful to enable asserts in release builds, and you can do that
// simply by changing the following lines to define FASSERT_ENABLE or using project settings to override
#ifdef _DEBUG
#define FASSERT_ENABLE
#endif
Then comment out the #ifdef and #endif lines like so:
Code:
// Only compile in FAssert's if FASSERT_ENABLE is defined.  By default, however, let's key off of
// _DEBUG.  Sometimes, however, it's useful to enable asserts in release builds, and you can do that
// simply by changing the following lines to define FASSERT_ENABLE or using project settings to override
//#ifdef _DEBUG
#define FASSERT_ENABLE
//#endif
Now do a complete rebuild and have Pablod try playing the game with that DLL. When an assert is triggered, the game will pause and another dialog will show up that looks like this:

1228966280.jpg


Every assertion failure is a problem which should be looked at, but the severity varies. For example the above image was from a something that is pretty harmless; some colors were referenced before the color definitions were loaded but nothing was actually done with the colors so it didn't matter. Other assertions, though, can be a warning that a crash is about to happen.

A user should simply write down (or screenshot) the details of the dialog box and choose to "ignore" and keep playing. A developer, if using a debug DLL and attached to the process through his/her IDE, can use the "debug" option to invoke the IDE debugger and then step through the code and get a better handle on the cause of the problem.
 
where exacly is fassert.h
i finded for road to war only

C:\Users\Owner\AppData\Local\Temp\WERE8C.tmp.version.txt
C:\Users\Owner\AppData\Local\Temp\WER4B2F.tmp.appcompat.txt
C:\Users\Owner\AppData\Local\Temp\WER4B5F.tmp.mdmp

i try and this said the vista may help

i paste in fassert.h of bts
 
after start
Assert Failed

File: CvGlobals.cpp
Line: 1365
Expression: eUnitNum > -1
Message:

----------------------------------------------------------
 
When loading the scenario file (after picking civ/leader):
Assert Failed

File: CvGlobals.cpp
Line: 1193
Expression: eLeaderHeadNum > -1
Message:

----------------------------------------------------------
(repeated 8 more times)

At end of first turn:
Assert Failed

File: CvGlobals.cpp
Line: 1365
Expression: eUnitNum > -1
Message:

----------------------------------------------------------
(repeated 7 more times)

Assert Failed

File: CvGlobals.cpp
Line: 1193
Expression: eLeaderHeadNum > -1
Message:

----------------------------------------------------------
(repeated 8 more times)

Assert Failed

File: CvGlobals.cpp
Line: 1365
Expression: eUnitNum > -1
Message:

----------------------------------------------------------

At end of 2nd turn:
previous errors with eUnitNum and eLeaderHeadNum

Assert Failed

File: CvPlayer.cpp
Line: 5332
Expression: GC.getCivilizationInfo(getCivilizationType()).getCivilizationUnits(eUnitClass) == eUnit
Message:

----------------------------------------------------------

Another oddity: homeworlds don't have a default planet selected to construct buildings on; other systems do.
 
In and of themselves they aren't that helpful; the ones from CvGlobals would be pretty hard to track down, but you can look at the line numbers to see exactly which function calls are happening to help narrow your focus. The one from CvPlayer looks like a civ getting a special unit that it normally doesn't have access to like somebody else's UU or a generic unit instead of a UU.
 
Well, I have no idea what's going on with the ones from CvGlobals, and the one about the unit had to do with me merging in the assimilation mod, which is probably vista compatible and the option isn't enabled for the scenarios by default anyways.

About the units, I think you (Pablod) said that the epic game version also gets a CTD a little ways in so I'm not sure why that would be an issue, but I've attached a version of Civ4CivilizationInfos with that unit fully enabled for Earth anyways. Place it in Mods\ST Enterprise\Assets\XML\Civilizations and see if it works.

That got me to thinking... could my use of the UU mechanic be causing this? I set it up so that each unit has a unitclass, with the default for that unitclass set to NONE and in Civ4CivilizationInfos enabled the unit for the civilization that uses it.
 
no, the scenarios still crashes
i get this in epic
Assert Failed

File: CvPlayer.cpp
Line: 5451
Expression: GC.getCivilizationInfo(getCivilizationType()).getCivilizationBuildings(eBuildingClass) == eBuilding
Message:

----------------------------------------------------------
after few turnsAssert Failed

File: CvGlobals.cpp
Line: 1365
Expression: eUnitNum > -1
Message:

----------------------------------------------------------
and crash
 
Back
Top Bottom