• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Bug Reporting

BtS 3.13 + Unofficial Patch + Blue Marble + BUG 501

I'm now having a strange issue... in the middle of a game and everything started to move slower chunkier. Also somehow the city screen overlay was still visible while in the main interface. I figured something had went awry, so I saved my game and rebooted my box.

Load up game and now the Scoreboard is missing, and none of the hover boxes come up on anything, even tiles. Renamed CustomAssets/CustomDomAdv, loaded that same save, and all is good.

I also tried removing the Unofficial Patch, this did not fix the issue.

This is a very strange issue that I'm sure nobody could reproduce, as it seems to have randomly occurred. I have no idea where to start on this one. Please let me know if anybody has any ideas and what information I can collect.
 
When you see chunky/stuttering rendering like that, it's a sure sign that there's a Python error happening on each render loop.

That you then saw a) the city screen after closing it and b) a borked interface upon starting up the game is another sure sign of the same thing.

To see the problem, first enable logging (you can leave this enabled with no performance hit) in CivilizationIV.ini:

Code:
; Enable the logging system
LoggingEnabled = [B]1[/B]

Whenever you have problems like this, go to your "My Games\Beyond the Sword" directory. There should be a "Logs" directory, and inside that a "PythonErr.log" file. It will look something like this:

Code:
[B]Traceback (most recent call last):[/B]
[B]  File "<string>", line 1, in ?
  File "<string>", line 52, in load_module
  File "CvEventInterface", line 19, in ?
  File "CvCustomEventManager", line 80, in __init__
  File "Civ4lerts", line 79, in __init__
  File "Civ4lerts", line 345, in __init__
  File "Civ4lerts", line 286, in __init__
NameError
: 
global name 'gc' is not defined
[/B]
Failed to load python module CvEventInterface.
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
Traceback (most recent call last):

  File "CvAppInterface", line 56, in onLoad

AttributeError: 'module' object has no attribute 'onEvent'
ERR: Python function onLoad failed, module CvAppInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface

The bold above is a stack trace that will tell us exactly where the error is. You can cut just that part out or send us the whole file if you're unsure.

There's a similarly-named file "PythonErr2.log" which is essentially useless. Ignore it. It looks like this:

Code:
sys.path = ['..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\email', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\encodings', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\build', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\py', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\tools', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\colourchooser', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\editor', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\floatcanvas', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\masked', 
...
 
Turns out the issue was reproducable with my save:

Code:
UnboundLocalError: local variable 'iLeftover' referenced before assignment
ERR: Python function forceScreenRedraw failed, module CvScreensInterface
Traceback (most recent call last):

  File "CvScreensInterface", line 803, in forceScreenRedraw

  File "CvMainInterface", line 860, in redraw

  File "CvMainInterface", line 2103, in updateGameDataStrings

  File "GPUtil", line 120, in calcPercentages

This is repeated over and over in PythonErr.log.

Code:
sys.path = ['..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\email', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\encodings', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\build', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\py', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\tools', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\colourchooser', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\editor', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\floatcanvas', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\masked', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\mixins', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\ogl', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\af', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\ca', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\cs', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\da', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\de', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\el', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\es', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\eu', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\fi', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\fr', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\hi', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\hu', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\id', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\it', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\ja', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\lv', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\nb', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\nl', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\pl', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\pt_BR', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\ru', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\sl', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\sv', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\tr', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\uk', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\zh_CN', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\zh_TW', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\af\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\ca\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\cs\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\da\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\de\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\el\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\es\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\eu\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\fi\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\fr\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\hi\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\hu\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\id\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\it\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\ja\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\lv\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\nb\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\nl\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\pl\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\pt_BR\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\ru\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\sl\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\sv\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\tr\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\uk\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\zh_CN\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\zh_TW\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\py\\tests', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\tools\\XRCed', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\tools\\XRCed\\src-images', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM']
 
When I load the game, I have no interface... I see the world, cities and units.

Code:
File "<string>", line 1, in ?
  File "<string>", line 52, in load_module
  File "CvEventInterface", line 13, in ?
  File "<string>", line 52, in load_module
  File "CvCustomEventManager", line 24, in ?
  File "<string>", line 52, in load_module
  File "CvEventManager", line 12, in ?
  File "<string>", line 52, in load_module
  File "CvScreensInterface", line 968, in ?
NameError
: 
name 'PEDIA_TECH' is not defined

Failed to load python module CvEventInterface.
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
Traceback (most recent call last):

  File "CvAppInterface", line 56, in onLoad

AttributeError: 'module' object has no attribute 'onEvent'
ERR: Python function onLoad failed, module CvAppInterface
ERR: Call function toggleSetScreenOn failed. Can't find module CvScreensInterface
ERR: Call function onClose failed. Can't find module CvScreensInterface
ERR: Call function toggleSetScreenOn failed. Can't find module CvScreensInterface
ERR: Call function update failed. Can't find module CvScreensInterface
ERR: Call function update failed. Can't find module CvScreensInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function forceScreenRedraw failed. Can't find module CvScreensInterface

Did the SVN BUG update just now (20:15 GMT+01), using BTS3.13, Fbug 0.06
 
File "CvScreensInterface", line 968, in ?
NameError
:
name 'PEDIA_TECH' is not defined

It looks like you have an old version of the file, or the sync didn't work. Here's my CvScreensInterface.py file:

Code:
[B]968[/B]: HandleInputMap = {  MAIN_INTERFACE : mainInterface,
...
994:     PEDIA_TECH : pediaMainScreen,

How are you syncing to SVN, and how do you get those files into BtS? Also, did you originally install it as a mod or in CustomAssets?
 
I origionally have the FBUG version 0.06 installed (which included BUG) in CustomAssets. I've updated SVN with Tortoise (using the explanation in the latest version thread). With every update, I update BAT and BUG, but I only export (with Tortoise) the BUG mod to the My Games directory. Since exporting makes a folder BUG mod in the BTS folder I copy all folders and files from the BUG mod folder to the BTS folder.

What I did extra (shouldn't matter but I mention it anyway): I also copied the CustomAssets folder into Mods\BUG mod and also Tortoise-exported the SVN folder for BUG mod there (and places the ini file in de Mods folder). But that was only to try loading BUG as a separate MOD for trying the BUG in Multiplayer. I don't think this has anything to do with it.
Maybe a conflict with old FBUG files and the new SVN BUG files? When the computer asks to overwrite a file I answer with "Yes to all".

P.S. When I update now (21:23 GMT+01) I get one updated file "CustomAssets\Python\Contrib\CvModname.py"
 
That updated file is Alerum doing a release (changing the version number in the file). It sounds like you've done everything correctly. The problem is that the line 968 you have doesn't match up to what's in SVN.

If you have only BUG and BAT installed, my recommendation would be to recreate your CustomAssets folder. Start by nuking BUG and getting a fresh copy from SVN. BUG's small, so this should be quick.

Then install just BUG in CA and see what happens. If that still fails, come back here. If it works, install BAT as well and see if it still works.

Sorry for all the hoops. :(
 
Tried it. BUG works fine after new download and with just the BUG. After putting BAT back the interface is gone. So I just have to wait until BAT for 3.13 comes out, since it the older version (FBUG 0.06) what did work with 3.13 until now, had stopped working now also.
 
My guess would be something in the new BUG conflicts with old BAT. Before the SVN update BUG worked with the old BAT.

I could be wrong, but I only see: BUG+BAT(fbug0.06) working with BTS3.13 -> SVN update BUG -> interface gone. Remove the BAT (that was working before) and BUG works again. Could the Bug and the Bat be in conflict?

So XML problems can also remove the interface now?? Ugh!

Or was Python code added to BAT?
I did not update BAT, so if anything had been added it has had not anything to do with it. Maybe thats just the problem here: we maybe need a newer BAT for the new BUG. But the new BAT causes (for now) a crash to desktop with BTS3.13.
 
Actually, I'm amazed you got BAT to work on 3.13 at all Walbeek. It was generating CTD even before 2.0 came out, IIRC. Walbeek, I hate to say it but I think you're gonig to have to forgo the pleasure of BAT either until I come back from my trip, or NN gets adventurous and makes VD un-modular.;)
 
As with many other mods, I'm having problems with BUG using the Civ4 "Complete" edition (that's Civ4 + Warlords + BtS on a single disc, all patched).
I only installed BUG, not BAT, since I noticed the latter isn't available for 3.13.

I can start the game alright, but when I enter a new or saved game the interface is completely gone - I'm just seeing the world. Escape menu works, but the Options screen won't come up too.

Logs and Python errors seem to indicate that the game is unable to find some files, I could provide you with the complete Logs and Error messages if required.
 
Yes, please post the PythonErr.log file. This is easy and more complete than writing down the exception displayed on-screen (if any).

Make sure you enable logging in the CivilizationIV.ini file if you haven't already:

Code:
; Enable the logging system
LoggingEnabled = [B]1[/B]

Also, which version did you install? EXE or ZIP or latest from SVN repository?
 
Hey now ~ found what might be a bug in BUG, i think (though I'm sorry i didn't get this to you guys earlier w/2.10 out now) ~ you get alerts when religions spread to cities not of your civ.

don't know if that's intended, and only happens when its your particular state religion, but thought i should mention it.

i'm also anxious to try out 2.10
 
Yes, please post the PythonErr.log file. This is easy and more complete than writing down the exception displayed on-screen (if any).

Make sure you enable logging in the CivilizationIV.ini file if you haven't already:

Code:
; Enable the logging system
LoggingEnabled = [B]1[/B]

Also, which version did you install? EXE or ZIP or latest from SVN repository?

I used BUGMod_210.exe as downloaded from Sourceforge.

Attached you'll find "Logs.zip", containing the PythonErr.log as well as an export of my "Firaxis Games" registry key.
As you'll notice, with the Complete Edition there's no plain "Civilization 4" key, only "Sid Meier's Civilization 4 Complete" along with the expansions.
I already tried duplicating the "Complete" key to plain and when then starting a game, I do get the interface and am able to access the BUG option screen, but on clicking "Exit" there's a Python error - seems like BUG can't find the file to write the options into.
 

Attachments

Back
Top Bottom