Advertisement
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization

Notices

Reply
 
Thread Tools
Old Nov 30, 2008, 05:19 PM   #1
deanej
Deity
 
deanej's Avatar
 
Join Date: Apr 2006
Location: New York State
Posts: 4,859
Need Help Fixing CTD

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?
deanej is offline   Reply With Quote
Old Dec 03, 2008, 06:36 PM   #2
deanej
Deity
 
deanej's Avatar
 
Join Date: Apr 2006
Location: New York State
Posts: 4,859
Does anyone have any ideas?
deanej is offline   Reply With Quote
Old Dec 03, 2008, 09:43 PM   #3
Dresden
Emperor
 
Dresden's Avatar
 
Join Date: Jul 2008
Posts: 1,081
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.
Dresden is offline   Reply With Quote
Old Dec 10, 2008, 06:56 PM   #4
Pablod
Warlord
 
Pablod's Avatar
 
Join Date: Sep 2005
Posts: 294
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
Pablod is offline   Reply With Quote
Old Dec 10, 2008, 08:04 PM   #5
deanej
Deity
 
deanej's Avatar
 
Join Date: Apr 2006
Location: New York State
Posts: 4,859
@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.
deanej is offline   Reply With Quote
Old Dec 10, 2008, 08:10 PM   #6
Dresden
Emperor
 
Dresden's Avatar
 
Join Date: Jul 2008
Posts: 1,081
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?
Dresden is offline   Reply With Quote
Old Dec 10, 2008, 08:15 PM   #7
deanej
Deity
 
deanej's Avatar
 
Join Date: Apr 2006
Location: New York State
Posts: 4,859
Custom, but the DLL is the same across all the scenarios and the epic game version.

I don't run Vista so I can't speak for the latter option, but hopefully Pablod will report back soon on if that works.
deanej is offline   Reply With Quote
Old Dec 10, 2008, 08:17 PM   #8
Pablod
Warlord
 
Pablod's Avatar
 
Join Date: Sep 2005
Posts: 294
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

Last edited by Pablod; Dec 10, 2008 at 08:34 PM.
Pablod is offline   Reply With Quote
Old Dec 10, 2008, 08:41 PM   #9
Dresden
Emperor
 
Dresden's Avatar
 
Join Date: Jul 2008
Posts: 1,081
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:



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.
Dresden is offline   Reply With Quote
Old Dec 10, 2008, 08:51 PM   #10
Pablod
Warlord
 
Pablod's Avatar
 
Join Date: Sep 2005
Posts: 294
where exacly is fassert.h
i finded for road to war only

C:\Users\Owner\AppData\Local\Temp\WERE8C.tmp.versi on.txt
C:\Users\Owner\AppData\Local\Temp\WER4B2F.tmp.appc ompat.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

Last edited by Pablod; Dec 11, 2008 at 01:42 PM.
Pablod is offline   Reply With Quote
Old Dec 11, 2008, 05:50 AM   #11
JEELEN
Venite, videte, audite
 
JEELEN's Avatar
 
Join Date: Oct 2006
Location: Leiden, the Netherlands
Posts: 11,271
Images: 22
Quote:
Originally Posted by deanej View Post
Does anyone have any ideas?
Not really, but I'm having the exact same problem (recently got a PC with wonderful Vista on it)...
__________________
MOD MOO2Civ SCENARIOS 1250 BC for BtS/1250 BC for HitM 2.01/1000 BC for BtS/1000 BC for CIV Gold BtS/600 BC for BtS/600 BC for CIV Gold BtS/300 BC for BtS/300 BC for CIV Gold 5.2/50 AD for BtS/750 AD for BtS/750 AD for CIV Gold BtS/1000 AD for SevoMod/1066 AD for BtS/1066 AD for CIV Gold BtS/1066 AD for Thomas' War/1066 AD for Amra BtS/The Crusades !/The Crusades! for CIV Gold BtS/The Crusades! for Esnaz's Mod/1600 AD for CIV Gold BtS/1790 AD for CIV Gold BtS/1862 AD for CIV Gold BtS/Star Trek scenarios MAPS Amra 18 civs BtS/Random Religions 18 civs BtS/RoM 2.3 Huge Earth 18 civs/Thomas' War 2.8 Huge Earth 18 civs/HitM 2.01 Huge Earth 18 civs/GEM 5.3 Ancient 26 civs/Map pack for Chiyu's Extra mod

JEELEN is offline   Reply With Quote
Old Dec 11, 2008, 04:13 PM   #12
deanej
Deity
 
deanej's Avatar
 
Join Date: Apr 2006
Location: New York State
Posts: 4,859
Here's the DLL with asserts on - just put the one in the zip file in the ST Enterprise\Assets (overwrite the one that's there). Just play the scenario with this and report any errors you get.

Last edited by deanej; Aug 10, 2010 at 08:36 PM.
deanej is offline   Reply With Quote
Old Dec 11, 2008, 05:12 PM   #13
Pablod
Warlord
 
Pablod's Avatar
 
Join Date: Sep 2005
Posts: 294
after start
Assert Failed

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

----------------------------------------------------------
Pablod is offline   Reply With Quote
Old Dec 11, 2008, 05:47 PM   #14
deanej
Deity
 
deanej's Avatar
 
Join Date: Apr 2006
Location: New York State
Posts: 4,859
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()).getC ivilizationUnits(eUnitClass) == eUnit
Message:

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

Another oddity: homeworlds don't have a default planet selected to construct buildings on; other systems do.
deanej is offline   Reply With Quote
Old Dec 14, 2008, 11:41 AM   #15
deanej
Deity
 
deanej's Avatar
 
Join Date: Apr 2006
Location: New York State
Posts: 4,859
Any ideas? Or are these assert messages not helpful?
deanej is offline   Reply With Quote
Old Dec 14, 2008, 05:08 PM   #16
Dresden
Emperor
 
Dresden's Avatar
 
Join Date: Jul 2008
Posts: 1,081
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.
Dresden is offline   Reply With Quote
Old Dec 14, 2008, 05:37 PM   #17
Pablod
Warlord
 
Pablod's Avatar
 
Join Date: Sep 2005
Posts: 294
it is the barbarian unit he give to the federation
Pablod is offline   Reply With Quote
Old Dec 15, 2008, 06:40 PM   #18
deanej
Deity
 
deanej's Avatar
 
Join Date: Apr 2006
Location: New York State
Posts: 4,859
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.

Last edited by deanej; Aug 10, 2010 at 08:36 PM.
deanej is offline   Reply With Quote
Old Dec 15, 2008, 07:20 PM   #19
Pablod
Warlord
 
Pablod's Avatar
 
Join Date: Sep 2005
Posts: 294
no, the scenarios still crashes
i get this in epic
Assert Failed

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

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

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

----------------------------------------------------------
and crash

Last edited by Pablod; Dec 15, 2008 at 07:40 PM.
Pablod is offline   Reply With Quote
Old Dec 18, 2008, 06:43 PM   #20
deanej
Deity
 
deanej's Avatar
 
Join Date: Apr 2006
Location: New York State
Posts: 4,859
I've attached what I hope may fix the issue. I've redone the UU code. To install put Civ4UnitClassInfos into ST Enterprise\Assets\XML\Units and put Civ4CiviliationInfos into ST Enterprise\Assets\XML\Civilizations.

Last edited by deanej; Aug 10, 2010 at 08:36 PM.
deanej is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Need Help Fixing CTD

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fixing the UN Wodan Civ4 - General Discussions 43 Jul 22, 2008 04:23 PM
Add a building, CTD. Take building out, CTD.???? wotan321 Civ4 - Creation & Customization 11 Mar 20, 2007 01:46 AM
Fixing the UN Virulent Civ4 - General Discussions 2 Sep 09, 2006 10:00 AM
Fixing the Constitution Emp.Napoleon C3C - Inter-site Demo Game: High Council 3 Sep 13, 2004 10:50 PM


Advertisement

All times are GMT -6. The time now is 05:19 AM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
This site is copyright © Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR