Weirdest DLL crash ever!

whoward69

DLL Minion
Joined
May 30, 2011
Messages
8,728
Location
Near Portsmouth, UK
Turn 0, moving my warrior to check out if I need to move the settler for my capital, warrior crosses a river ... CTD

Check the minidump and the crash is in ... CvReligionClasses::IsInSomeReligion() :crazyeye: :confused: :eek:

Perhaps the Warriors can have a "walk on water" belief :lol:

(Yes, it was my coding error, but what the heck was the DLL doing in there on turn 0!)
 
Has anyone ever run a code optimizer on the dll? It would be nice to know where the dll is spending most of it's time, especially for time-sensitive things like unit movement.
 
Turn 0, moving my warrior to check out if I need to move the settler for my capital, warrior crosses a river ... CTD

Check the minidump and the crash is in ... CvReligionClasses::IsInSomeReligion() :crazyeye: :confused: :eek:

Perhaps the Warriors can have a "walk on water" belief :lol:

(Yes, it was my coding error, but what the heck was the DLL doing in there on turn 0!)

It does that every turn (starting in CvGameReligions::doPlayerTurn()).

I'm more interested in what you were changing with regards to the Religions List and Beliefs.
 
I'm more interested in what you were changing with regards to the Religions List and Beliefs.

Over and above the v45 code base (which sends various events, eg so you can block certain beliefs to certain players) ... cryptic hint

Code:
#define MOD_TRAITS_PANTHEON_FAITH_PURCHASE (true)
#define MOD_TRAITS_ANY_BELIEF (true)
 
Has anyone ever run a code optimizer on the dll? It would be nice to know where the dll is spending most of it's time, especially for time-sensitive things like unit movement.

I tried to profile the dll in December using the Visual Studio Profiler, but I had issues with the profiler not using the PDB to show me the detailed info on method calls and as such was never able to get it to work.

An option (we added this to the Civ 4 DLL for C2C) would be adding a custom profiler, but that would be a lot of work for little reward (in C2C we had turn times upwards of 5 minutes at one point, so it was necessary then).
 
As this thread is heading off-topic anyway, I'll push it further.

Is there anything in MS-C++ that'll (easily) convert "5ibi" to "iiiiibi" or "i2b4i" to "ibbiiii" (as examples) - before I write something
 
Back
Top Bottom