v22 bugs and crashes

What are the "Hurry Food" for, cause every city i went to, even the new ones, and the stagnant ones, all read "0"??

Is trhis guy new? He's definately going to need AI writing if we are not to ceed a HUGE (new) advantage to the human player.
 
What are the "Hurry Food" for, cause every city i went to, even the new ones, and the stagnant ones, all read "0"??

Means I filled in the XML wrong somewhere.

Is trhis guy new? He's definately going to need AI writing if we are not to ceed a HUGE (new) advantage to the human player.

Yes and no. Afforess wrote AI for it when I asked for such units. Unfortunately I got sidetracked and forgot about them.
 
Yes and no. Afforess wrote AI for it when I asked for such units. Unfortunately I got sidetracked and forgot about them.

Since I wasn't familiar with it (which is odd), I went looking. You're half right. Afforess wrote a prototype routine to handle food hurries, but nothing calls it currently, so the DLL as it currently is has no AI for these units. Furthermore it has no AI (hooked up or otherwise) to ever tell it to try to BUILD these units in the first place (it might accidentally build them when it means to build production merchants though). On digging a bit further I find that actually that doesn't really matter greatly, because it has no AI to build merchants OF ANY KIND anyway, so they only get built 'randomly' when it just builds a random unit because it has no specific needs.

The net of this is that these do need new AI work, but in practise so does merchant use of any kind, so in a way it's not worse than before, but it has identified a big hole in the AI. It will however, give the human player a powerful new tool, which will be pure advantage relative to the AI until I can get round to writing merchant production AI, and hooking up Afforess' food merchant usage AI.

Noen of this is hard to do, at least at a fairly crude level, but I'm rather running behind because I've sunk pretty much all of this week into the memory issues Talin raised, so it'll be another week while I finish up backlog before I can get round to it.
 
Thanks for reply. I am using 64 bit Vista atm, i wrote it. My post was regarding possible memory handling by Vista and win7, so that win7 might somehow fix errors occuring in vista64

Breakthrough (maybe)!!!

I don't totally understand WHY the leak occurs, but I have some experimental changes that seem to go a long way to resolving it.

From your save game I played successive turns with my changes, and with the current SVN build. At each turn I said no to all diplomacy, built the suggested building in cities, and ended turn without bothering to move any of your units. The SVN build memory usage by turn (from your save) goes like this (in Mbytes, working set):

2398
2502
CTD

With the modified version it goes like this:

2310
2369
2365
2475
2433
2407
2458
2526
2480
<got bored and stopped>

It's still trending gently up, but it's a whole lot more controlled, so I think this should help.

The change is fairly far-reaching (aka risky) in terms of how it modifies the interaction of the DLL with the game engine, so I'm going to enable it off a global define that will be turned OFF by default, until it's had a lot more testing from people that play on large maps and/or have memory issues.

What it does is remove graphics entities for most units from the game engine's knowledge. Normally each unit in existance has associated with it a 'graphics entity' object which is managed by the game engine (and off that probably hangs a bunch of DirectX data structures, but who knows). It seems that the game engine is doing some (purpose unknwon) processing on these graphics entities every turn, regardless of whether their display status changes in any way, and (empirically inferred at least) this leads to the memory growth issue (if you prevent all unit processing during a turn that also seems to stop the growth, but I cannot pin it on any one feature of unit processing, so that line of attack dead-ended after a day or so). What I have done is create a SINGLE graphics entity which is always invisible and attached THAT to all units that are invisible, or not the displayed stack unit (for non human (well strictly, not active, but same thing for single player games) players - I left all player units with their own graphical entities because I wasn't sure how selection manipulation would interact otherwise). When unit visibility changes (and a few other times) the unit re-assesses whether it needs a 'real' graphics entity and if so gets one created. Similarly it destroys the one it was using when it goes back to the dummy.

This basically means 90% of the units in the game no longer have unique graphics entities associated with them. It also encourages more frequent graphics entitiy recycling (though I'm not sure whether that's really a significant factor or not).

I am expecting to push this to SVN a little later today.
 
Amazing work, Koshling, that must have cost quite some time to track down :goodjob:

It's fair to say my (real) work has suffered the past couple of days, and I owe a bit of a work-time debt now (I work from home, so when I get stuff done is really up to me, but it still has to GET done at some point). This memory stuff has taken maybe 20 or so hours this week, which is an over-spend of my C2C budget ;)
 
Amazing work, Koshling, that must have cost quite some time to track down :goodjob:

I'd have to agree here, if i remember correctly, when i was messing around with the 3GB switch memory problem, some of the older machines could go as high as 2900 before and CTD, i tried it CTD, i then tried 2800 - CTD, all the way down to 2400 is where i had to set mine at, if i even went above 2500- CTD.:crazyeye: But again not all PC's are built for hard memory games.
 
Using SVN 2428, noticed that the Resource Sheep are Revealed with Livestock Domestication, but Enabled with Canine Domestication. I think this is the opposite of what it should be; revealed at Canine and Enabled with Livestock.
 
Breakthrough (maybe)!!!


C2Cs NEO did it again. Plowing through the matricks. :scan:

The change is fairly far-reaching (aka risky) in terms of how it modifies the interaction of the DLL with the game engine, so I'm going to enable it off a global define that will be turned OFF by default, until it's had a lot more testing from people that play on large maps and/or have memory issues.

I had a few CTDs in the recent game on GEM (more than in last versions), but it got not much worse, the longer the game progressed it went back to stable again. I think it must have been VLC+firefox+youtube+Alt-Tabbing GEM causing it mostly.

Anyway, gonna try that feature.
Btw the reduced turntime option in BUG: never had a problem with it so I think it could become standard default...so you could actually uncheck it if you had problems with it, rather than having to enable it in the first place which a large amount of players will always not do -- maybe not because they are stupid but because the overwhelming content of the mod so they might not even know that the turntime decrease exists and is there. They will be angry about lost time once they finally find it, if ever.

Screenie: a little TXT_Error.
 

Attachments

  • Civ4ScreenShot0074.JPG
    Civ4ScreenShot0074.JPG
    250.5 KB · Views: 77
Using SVN 2428, noticed that the Resource Sheep are Revealed with Livestock Domestication, but Enabled with Canine Domestication. I think this is the opposite of what it should be; revealed at Canine and Enabled with Livestock.

I think its so you can get Herds from subdued animals before you can build actual farms.
 
Using SVN 2428, noticed that the Resource Sheep are Revealed with Livestock Domestication, but Enabled with Canine Domestication. I think this is the opposite of what it should be; revealed at Canine and Enabled with Livestock.

I think its so you can get Herds from subdued animals before you can build actual farms.

No. It is in the wrong order. It should be; revealed at Canine and Enabled with Livestock.
 
Breakthrough (maybe)!!!

Oooooooooooooooooooooooooooooooooooooohhhhhhhhhh!!!!!!!!!!!!!!!!

:worship::worship::worship:

This, along with your earlier fix of graphics crashing by disabling buildings makes late games so much more playable and interesting!

Hundreds of nukes, rocket artillery, t-95 tanks and stealth bombers again!!!
 
[r2440] Tried to load my savegame with ENABLE_DYNAMIC_UNIT_ENTITIES =1 for test.

Unit models weren't shown (no pink/red things, just empty space), then I moved camera around, then ctd.
 
[r2440] Tried to load my savegame with ENABLE_DYNAMIC_UNIT_ENTITIES =1 for test.

Unit models weren't shown (no pink/red things, just empty space), then I moved camera around, then ctd.

Your own units models didn't show or only those of other players?
 
Back
Top Bottom