Bug Reporting

When trying to start your 1372 version as a mod, following error shows up:

Code:
Traceback (most recent call last):
  File "BugConfig", line 356, in parse
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 171, in feed
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 287, in goahead
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 697, in parse_endtag
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 730, in finish_endtag
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 751, in handle_endtag
  File "BugConfig", line 424, in end_options
  File "BugOptions", line 254, in read
  File "BugOptions", line 268, in create
  File "BugOptions", line 642, in resetValue
  File "BugOptions", line 632, in setValue
  File "BugOptions", line 713, in onChanged
  File "BugOptions", line 741, in doDirties
  File "BugOptions", line 753, in callDirtyFunctions
  File "BugUtil", line 418, in __call__
  File "BugUtil", line 411, in call
  File "BugUtil", line 402, in bind
ConfigError: No such module 'BugUpdateChecker'
Traceback (most recent call last):
  File "BugConfig", line 356, in parse
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 171, in feed
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 280, in goahead
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 666, in parse_starttag
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 703, in finish_starttag
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 747, in handle_starttag
  File "BugConfig", line 395, in start_load
  File "BugConfig", line 107, in loadMod
  File "BugInit", line 56, in loadMod
  File "BugConfig", line 366, in parse
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 175, in close
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 287, in goahead
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 697, in parse_endtag
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 722, in finish_endtag
  File "BugConfig", line 369, in syntax_error
ConfigError: error parsing XML: unopened end tag
Traceback (most recent call last):

  File "CvAppInterface", line 72, in preGameStart

  File "BugEventManager", line 240, in fireEvent

  File "BugEventManager", line 250, in handleEvent

  File "BugEventManager", line 295, in _handleInitBugEvent

  File "BugEventManager", line 337, in initBug

  File "BugInit", line 39, in init

  File "BugInit", line 56, in loadMod

  File "BugConfig", line 366, in parse

  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 175, in close

  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 313, in goahead

  File "BugConfig", line 369, in syntax_error

ConfigError: error parsing XML: <?xml?> declaration not at start of document
ERR: Python function preGameStart failed, module CvAppInterface

For me, it seems that the Bug Core.xml isn't coded correctly.
 
I fixed the first problem regarding the missing module. I commented out the reference to it as it's not yet ready.

The second one I cannot find. Can you please open the PythonDbg.log file and look for the XML file name and line number where the error occurs? Thanks!
 
With your bugfix it works now, BUG only shows, that various TXT_KEYs aren't found ;)
 
Yes, I had to commit some incomplete additions due to committing another screen too early. I'm adding the XML now and will complete the SVN update checker soon.
 
I'm getting an error with 1373; it may be related to the same issue:

Traceback (most recent call last):

File "CvAppInterface", line 72, in preGameStart

File "BugEventManager", line 240, in fireEvent

File "BugEventManager", line 250, in handleEvent

File "BugEventManager", line 296, in _handleInitBugEvent

File "BugEventManager", line 338, in initBug

File "BugInit", line 39, in init

File "BugInit", line 56, in loadMod

File "BugConfig", line 364, in parse

AttributeError: 'module' object has no attribute 'trace'
ERR: Python function preGameStart failed, module CvAppInterface

Cheers,
ripple01
 
I'm getting an error with 1373.

Code:
File "BugConfig", line 364, in parse

AttributeError: 'module' object has no attribute 'trace'

1372 added BugUtil.trace(). Make sure you have the latest BugUtil (and all files, really) from SVN. I don't get this error, and I can see that the code is correct.
 
I've got 1374 installed under customassets and I get the following when starting the game ...
Code:
Traceback (most recent call last):
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "<string>", line 1, in ?
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "<string>", line 52, in load_module
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "CvEventInterface", line 13, in ?
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "<string>", line 52, in load_module
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "BugEventManager", line 58, in ?
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "<string>", line 52, in load_module
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "CvEventManager", line 12, in ?
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "<string>", line 52, in load_module
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "CvScreensInterface", line 3, in ?
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "<string>", line 52, in load_module
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "CvMainInterface", line 43, in ?
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "<string>", line 52, in load_module
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "ReminderEventManager", line 19, in ?
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "<string>", line 52, in load_module
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "autolog", line 12, in ?
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "<string>", line 52, in load_module
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "BugOptions", line 108, in ?
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "<string>", line 52, in load_module
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "BugPath", line 80, in ?
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "BugUtil", line 167, in debug
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "BugUtil", line 195, in log
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "BugUtil", line 203, in logToFile
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
  File "<string>", line 7, in write
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
Boost.Python
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
ArgumentError
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
Python argument types in
    CyPythonMgr.debugMsg(CyPythonMgr, unicode)
did not match C++ signature:
    debugMsg(class CyPythonMgr {lvalue}, class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)
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
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
 
I've got 1374 installed under customassets and I get the following when starting the game ...

Very strange given that I'm using the normal Civ4 logging method, and it checks for unicode (in CvUtil):

Code:
class RedirectDebug:
	"""Send Debug Messages to Civ Engine"""
	def __init__(self):
		self.m_PythonMgr = CyPythonMgr()
	def write(self, stuff):
		# if str is non unicode and contains encoded unicode data, supply the right encoder to encode it into a unicode object
		[B]if (isinstance(stuff, unicode)):[/B]
			self.m_PythonMgr.debugMsgWide(stuff)
		else:
			self.m_PythonMgr.debugMsg(stuff)

Line 80 of BugPath [ed: was BugUtil] simply logs the location of the user's My Documents folder, which is probably a Unicode string, but it puts it into a normal string. This should force it to either all be Unicode or all ASCII. I'll take a look at it tonight, possibly by forcing the whole string to Unicode.

Also, it looks like that's running inside a thread or something with the intermingled ERR messages on every other line. What's up with that?
 
Line 80 of BugUtil simply logs the location of the user's My Documents folder, which is probably a Unicode string, but it puts it into a normal string. This should force it to either all be Unicode or all ASCII. I'll take a look at it tonight, possibly by forcing the whole string to Unicode.
I think you mean BugPath.py. As a short term solution, I've commented out the BugUtil.* print-like statements and it works now - yay.

Also, it looks like that's running inside a thread or something with the intermingled ERR messages on every other line. What's up with that?
It always looks like this for me when you get python errors during game load - lots of msgbox that I just hold down 'enter' for.
 
I think you mean BugPath.py.

Yes.

It always looks like this for me when you get python errors during game load - lots of msgbox that I just hold down 'enter' for.

Ahh, you have Python exception popups turned on. I leave that off and just grab the error from the file. It's usually pretty obvious when an error occurs, and the file is an alt-tab away if not.
 
Ahh, you have Python exception popups turned on. I leave that off and just grab the error from the file. It's usually pretty obvious when an error occurs, and the file is an alt-tab away if not.
I do. I have another shortcut to start civ4 with it turned off but I need the prompt that something has gone wrong - you really need to hit me over the head sometimes or I don't take notice.
 
With your 1374 version following error shows up:

Code:
Traceback (most recent call last):

  File "CvScreensInterface", line 236, in showInfoScreen

  File "CvInfoScreen", line 628, in showScreen

  File "CvInfoScreen", line 649, in redrawContents

  File "CvInfoScreen", line 689, in drawGraphTab

  File "BugUtil", line 372, in logSpan

  File "BugUtil", line 345, in span

TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'
ERR: Python function showInfoScreen failed, module CvScreensInterface
 
@Caesium - I don't get this error. Are you doing anything other than opening the Info screen? Can you please post a save that causes this?
 
F5 - deployment is showing Privateers when I select worker ...

Do you want a save?
 

Attachments

  • Civ4ScreenShot0018.JPG
    Civ4ScreenShot0018.JPG
    173.4 KB · Views: 62
I know about this bug and how to fix it. Thanks for the reminder. The problem is that I haven't rewritten the selection code from the original screen. Notice that it's selecting Friendly Territory -- not Privateer. The screen doesn't know about groups, only units, and Worker unit type matches group # for Friendly Territory.

I'm still working on the 3rd tab (Strat Adv), so it may be a week before it's fixed.
 
@Caesium - I don't get this error. Are you doing anything other than opening the Info screen? Can you please post a save that causes this?

The problem doesn't show up in the first turn.

I managed to solve this problem, it's related to lines 301 and 302 in def reset(self) in BugUtil.py:

Code:
		self._initial = None
		self._start = None

I changed these to

Code:
		self._initial = 0
		self._start = 0

And now it works for me.


--------------------------------------
And a few more little bugs:


In F9 (Info Screen) there is a problem with gender related texts:

attachment.php
and
attachment.php
.




Could you eventually make the air units' box scrollable, because the text doesn't fit well to the box ;) Just a very little issue, it works, but it could look better.
attachment.php





And two jobs for TheDoc ;)
"Location" isn't translated.
attachment.php


And some signs are missing/are shown wrong in the traits' pedia.
attachment.php





When using the tech tree (with self.BOX_INCREMENT_WIDTH = 45 instead of 33 as you set it) after klicking on a tech the text disappears from the box and reappears at the left side of the screen:
attachment.php
.

I tried to change this, because due to modding work, some techs have more buildings/units than fit into the box:
attachment.php

Maybe you could tell where I'm wrong, when changing to 45, or could you make the boxes scrollable?
 

Attachments

  • f10_1.jpg
    f10_1.jpg
    2.1 KB · Views: 303
  • f10_2.jpg
    f10_2.jpg
    3.3 KB · Views: 300
  • techtree.jpg
    techtree.jpg
    107.3 KB · Views: 209
  • pediatraits.jpg
    pediatraits.jpg
    20.1 KB · Views: 276
  • pediaunits.jpg
    pediaunits.jpg
    12.4 KB · Views: 187
  • military.jpg
    military.jpg
    13.1 KB · Views: 273
  • techtree_.jpg
    techtree_.jpg
    7.2 KB · Views: 180
In F10 there is a problem with gender related texts
We've had this before. What is F10 again? And is it like that in vanilla BtS?

When using the tech tree (with self.BOX_INCREMENT_WIDTH = 45 instead of 33 as you set it) after klicking on a tech the text disappears from the box and reappears at the left side of the screen
I'm working on the tech screen ... self.BOX_INCREMENT_WIDTH appears in a few places and gets set to different values depending on which tab is selected. Make sure you (re)set it to 45 in all the required locations.
 
We've had this before. What is F10 again? And is it like that in vanilla BtS?
Sorry, maybe this is F8, it's the info screen. Gnah, it's F9
wand.gif


I'm going to look another time to the tech screen :)
Edit: Now it works. I missed one entry.
But, would this be possible to have the icons in a scrollbox?
 
Back
Top Bottom