OOS Discussion, Tracking and Fixing

I think the overriding problem is still there. Try fe79's solution mentioned in this post: http://forums.civfanatics.com/showpost.php?p=12786182&postcount=25

As a temporary hack you could also move the OOS logger call from CvEventManager to BugEventManager, and delete "self.addEventHandler("gameUpdate", self.onGameUpdate)" from BugEventManger, though I didn't test that.
 
Infernals capturing a city still causes oos in 2.51. Any progress on getting this fixed?
 
Unfortunately not. I hope to get the fix for the OOS logs not being generated into the next release.

I have tried to fix the log issue on my own and failed. As soon as this is fixed, I want to debug and fix the kuriotate OOS. I'll have a lot of time (and access to a second computer) in the christmas holidays, so it would be great if the fix is included in at least development versions by then :)
 
If you are going for the easy route, you need to edit CvEventmanager.py as follows:

Find the part that looks like this:
Code:
		## EVENTLIST
		self.EventHandlerMap = {
			'mouseEvent'			: self.onMouseEvent,

Change the 'mouseEvent' line to look like this:
Code:
			'mouseEvent'			: CvEventManager.onMouseEvent.__get__(self,CvEventManager),
Then do the same for the next 80 or so similar lines. It really helps if you use a regex-capable search & replace tool.

The next part is not strictly necessary; just a little future-proofing:
Change all occurences of "self.beginEvent(" with "CvEventManager.beginEvent(self,".

You probably also want to replace OOSLogger.py with the one from C2C that you linked to, as it contains a little more functionality.

I tried this and ended up getting errors in Civ4lerts.

Code:
Traceback (most recent call last):
  File "BugEventManager", line 361, in _handleDefaultEvent
  File "Civ4lerts", line 908, in onBeginActivePlayerTurn
  File "Civ4lerts", line 946, in check
AttributeError: WorstEnemy instance has no attribute 'enemies'

I'm guessing that the reset function in Civ4lerts.py is not being called but I really dont understand all of this python stuff.
 
Sorry for the long absence; I've been occupied with other things.


I tried this and ended up getting errors in Civ4lerts.

Code:
Traceback (most recent call last):
  File "BugEventManager", line 361, in _handleDefaultEvent
  File "Civ4lerts", line 908, in onBeginActivePlayerTurn
  File "Civ4lerts", line 946, in check
AttributeError: WorstEnemy instance has no attribute 'enemies'

I'm guessing that the reset function in Civ4lerts.py is not being called but I really dont understand all of this python stuff.

When are you getting this error?
I ran a few quick tests (single-player only) in r1615, and did not get any errors. I also verified that WorstEnemy._reset did get called.
Also, I did have a networked multi-player game going a while back where we used a customized version (based on r1511) with the fix applied, and we did not see this error.
 
When are you getting this error?

Pretty much from the start. I'm attaching my copy of the CvEventManager that was giving me errors (changing the extension to .txt so the forums will let me upload it). Maybe you can spot something that I did wrong.
 

Attachments

  • CvEventManager.txt
    143.4 KB · Views: 121
Pretty much from the start. I'm attaching my copy of the CvEventManager that was giving me errors (changing the extension to .txt so the forums will let me upload it). Maybe you can spot something that I did wrong.

Looks fine to me. Seems to work fine too when I test it.

What game-type are you running? The short tests I am doing right now are just basic single-player games; I just pick "Play Now!" and then hit OK until the game starts.

I have attached modified copies of BugEventManager.py and Civ4lerts.py that log some extra info that should let you see if WorstEnemy._reset gets called.
 

Attachments

  • extralog.zip
    13.6 KB · Views: 166
Hi Tholal,

Absolutely love your work. Have been using MNAI to play multiplayer games with my wife and it has been exceptionally stable. The AI is a bit aggressive but that's neither here nor there.

I'm just posting in here to give you another multiplayer kurio OOS error. We are playing Amurites (host) and Kuriotates. There had been OOS errors from about turn 20, but they seemed to happen randomly. However, this one happens like clockwork on the next turn.

Hopefully this will help you out, although I can imagine debugging multiplayer is a pain. If I can provide any additional info, let me know.
 
Looks fine to me. Seems to work fine too when I test it.

Well I tried it again and it seems to be working now. No idea what was happening before. I'll include this fix with the next release so that hopefully we can start getting some more OOS logs and fix these OOS issues.
 
If you can let me know how to get setup to test I could do it. I was able to download the trunk of more naval ai with svn. But I'm not sure what to do next.
 
OK. I uploaded fe79's fix as well as the OOSLogger from c2c in revision 1616.

I'm not set up to test multiplayer, so I could use some help from anyone willing to test this fix.

Awesome! :) In the next weekend I'll have free time for some days and access to a multiplayer setup so I will try to get a lot of logs and help on fixing all remaining OOS issues on MNAI. IIRC the most pressing ones are the random Kuriotate OOS and the Infernal capture city OOS, right?
 
If you can let me know how to get setup to test I could do it. I was able to download the trunk of more naval ai with svn. But I'm not sure what to do next.

Actually all you need to do is replace those two files, CvEventManager and OOSLogger. No DLL compile required.

If you do want to compile the DLL, check out this guide - http://forums.civfanatics.com/showthread.php?t=405444

IIRC the most pressing ones are the random Kuriotate OOS and the Infernal capture city OOS, right?

Yes, as far as I know.
 
hi tholal,

ive just got familiar with your mode, ive heard about but didnt get into it yet.

i have a few questions,
1.so the mod mp stable?
2. does it have better ai fixes then c2c?
3. is it better then kmods?
4. have you considered platyping ui?

5. may i use your code in my mods in the future?
 
Not really the right thread for these questions but here are some answers.

i have a few questions,
1.so the mod mp stable?

For the most part. See the first post of this thread for info about known OOS issues.

2. does it have better ai fixes then c2c?
3. is it better then kmods?

I can't really answer that question. Fall from Heaven has so many new game mechanics and change to existing ones that a lot of the AI had to be changed to account for that. I'm not familiar with what AI changes C2C has made but I have adapted a few bits of code from K-mod.

4. have you considered platyping ui?

No. We are already using the BUG interface and too much time and effort was spent making it work properly with FFH.

5. may i use your code in my mods in the future?

Yes you may.
 
Actually all you need to do is replace those two files, CvEventManager and OOSLogger. No DLL compile required.

If you do want to compile the DLL, check out this guide - http://forums.civfanatics.com/showthread.php?t=405444



Yes, as far as I know.


I did this and tried the save game Blakmane uploaded that throws an oos error on load with Kuriotates.
I've attached the ooslog. Not sure what you could possibly get from it though.

Edit: Just realized you probably need the logs from both computers to do a compare. I'll get more info tomorrow if I have time
 

Attachments

  • Fr8TrainPC - Player 0 - OOSLog - Turn 42.txt
    332.6 KB · Views: 114
Top Bottom