Bug reports

Keldath has mentioned that in version 1.2, there is a pretty consistent CTD around turn 300. Due to his RL, he asked me to investigate. It is easy to reproduce using AIAutoPlay. I do not have the answer, just more questions. Using windbg on the release dll (non-debug) I can get only limited information. The crash stack says it occurs in CvPlayerAI::AI_getGreeting(). In other mods, if there is no appropriate greeting to use when the AI needs it, I have seen the GUI produce an empty dialog, that is, the dialog showing the other civ pops up but the text field is empty. Producing a CTD is a different behavior.

It happens every game on a tiny size, so it does not seem to be limited to a single civ. My python does not do anything with diplomacy text so it does not seem to be due to the python. Can anybody suggest a way to debug this further?
 
hey david,

i ca do a reverse engineering,
but this wil ltake time,

we had v 1.1 that worked well with no ctds,
so im planning on making 1.1 with no extra additions but revdcm 2.5 - so all the stuff you guys added and me, will be out, then ill make sure 1.1 will work well on 3.19, after that ill start adding the stuff you guys did in the unofficial patches, until we discover the direct cause for a ctd.

unfortunatly - i have an exam in 3 weeks so i gotta study hard until then...:(
 
Can you compile a debug dll which is exactly the same as what you had in 1.2, and also put up your source files? I may be able to use windbg to get some information based on the actual stack trace.
 
Maybe Koma13 can help if he is around? I know he's done a bit of SDK work.
 
In the download package for many mods, the source code is included. That way somebody else can build the dll if they want to play around. For Dune Wars, the source code is not included. So nobody else *can* build the mod besides keldath.

Keldath, if you do not have a chance to build the debug dll, could you at least put up the source code so somebody else could do it?

(EDIT: I have spent some time trying to reproduce this in "manual play", but failed. It is easy to reproduce in autoplay. Start a game, run 400 turns, it will crash. What I did was run 250 turns, save, run 10 turns, save, etc till it crashed. Then bring up the most recent save game and play manually from that point. After 10 turns it had not crashed. So it is *possible* that the bug occurs because autoplay is not handling some event correctly.

Has anybody seen the crash happen when playing manually, not using autoplay?)
 
To be honest it never would have occurred to me that "sdk.exe" is a container for the source files. Most mods that include source code put it into the same directory that BTS puts it, <mod>/CvGameCoreDLL. Perhaps in 1.3 you could move it there. There is no reason to create another exe for it, compressing it twice does not help.

I have not compiled the source files ever, so I may not know what I am talking about, but in normal C++ programming you can easily create a debug version. If you can compile a normal DLL, you should only have to change one switch to compile a debug DLL. Do the guides on "how to compile" discuss "how to compile debug"?
 
hey,

well ive created a ctd free version straight from 1.1 - it has the 1.2 sdk,

its 100% something we added to 1.2 - either xml code or python.

im trying to determine if its the python or the xml now.


***

furter testing:

im inclining to think its one of the new arts added for version 1.2.

i now gonna merge all non critical additind to v1.2 - like unit values and such,
the spice res - dense trace gonna hold back and see whats going on.

im on the currect course to find the ctd cause, but it will take a bit of time .
 
I think it might be the spice. I had a CTD when there was a large amount of it. It's a guess - but perhaps the amount of effects is too much. I can give you a version with the particle effect taken off if needs be.

Also, I think 1.2 version is using textures that are > 300kb - I have reduced the texture files so there are now ~80kb which will help performance.
 
Smaller memory from the textures definitely seems worthwhile to pursue. However, the number of plots containing spice should remain constant throughout the whole game. And I have never seen this CTD using 1.1.4, or in an early game of 1.2. So it is not clear why large textures should cause a crash only in the late game, only in that version.
 
if everything goes well guys,
ill upload a new version, that will be stable - without the spice blow and spice features,

i believe they might cause the ctd,

i not sure i can update the code you improved on the python regarding the windtrap worms and sandstorms,
but ill leave that to you, so we will have a new basic version that is stable so we can go on working on.
 
Well, hopefully if we proceed carefully we can isolate the issue and then add the spice blows and spice back in.
 
A week ago, before I had upgraded to 3.19, I posted several suggestions about turning off the python to see if that is the cause. I have done several autoplays of 1.2, where I turned off the python by putting a "return" very early in the initialization. See this post for details. All of these games crashed at the similar point. In these games, there is no spice blow, no spice, no sandstorms, no worms, and the windtrap doesn't do anything.

So I do not think either spice graphics or python is behind this crash.

This should be much easier to diagnose with a debug build.
 
There is a bug in the sdk source files:

In CvSelectionGroup.h "canMoveAllTerrain()" is declared 2 times. I had to remove one to be able to compile it.
 
koma13 built me a debug executable. I was not quite able to figure out how to use it. At any rate I did not learn anything new about the CTD. The crash stack says that getTerrainInfo() is being called with an illegal value. But, with the non-debug build, the crash stack gave just as much information and said it was crashing in CvPlayerAI::AI_getGreeting(). I guess using the debug executable is more challenging than I thought.
 
hummm...so i was right - it has something to do with the terrain-bonus-features.


***

ok guys,
later this day - i will upload a ctd free version:

i took out all the spice new features ,
along with the new salt feature.

i left the python code of dunewars.py as is - so the blows and spice levels need to be canceled,

i dont know the currect cause for the ctd ye - but its one of the too - spice blows - or spices denseties.

i think - it is better no to mess around with the battle effects and just delete them,

i think koma can just add a new code to the mapgenerator.py script along with the map scripts them selves a code that will simply add the spice blow features as another feature - no need to delete the b effects - might be the ctd cause as well...


so ,
plz guys, continue development upon the stable version i will upload and, keep testing at least 350 turns with auto ai each time you add something.

thanks guys.
 
Top Bottom