BUG Crashes vanilla BtS when displaying event log

ruff_hi

Live 4ever! Or die trying
Joined
Oct 24, 2005
Messages
9,135
Location
an Aussie in Boston
I thought I had fixed this error. I haven't. See PH13 (page 2 and 3) for an example. I'm going to try to reproduce this error in a very simple game so that we can find what part of BUG is causing it. I think it has something to do with the color schemes of items that we log.

Pic of the log when I have Civ4-logging running ...

ph130051mr2.jpg


The first set was played with BUG, the second with vanilla BtS.
 
There's only one picture, so are you saying that just the black log entries (the ones that are very hard to read) were created while using BUG? If so, did they appear black while playing with BUG, or did they change only once you removed BUG?

I can see how the color schemes could cause a problem. Each log entry must specify the colors to be used. If a color from the new set is used, then when BUG is removed the log will not be able to find that color. However, I didn't think any of the colors used in the log messages (e.g. Civ4lerts) were from the new set. They all worked before I added the extra colors.:confused:
 
The black entries are from the first set of the SG (using BUG). The other 3 entries are from the second set (not using BUG).
 
Given that, I could see how the extra colors cause the problem, but above you said that this isn't the problem after all, right? Or is the BUG used in the picture the new version without the colors?
 
Are you sure you didn't include any codes from SimCutie? I think we just pulled the .xml file with the color codes out completely. If we had it point somewhere that was no longer there, wouldn't it go black like that?
 
maybe ... I will check. I also tried looking for the code that creates the log ...

tracking down what creates the log:

1) search for 'Event Log' in the xml file - found 'CIV4GameTextInfos.xml', key = TXT_KEY_EVENT_LOG
2) search for TXT_KEY_EVENT_LOG in python files - found nothing ... #$%@$ its in the DLL
 
I looked at all the Civ4lert messages in the XML, and they all use built-in Civ4 colors like COLOR_YIELD_FOOD and COLOR_TECH_TEXT.

I don't remember SimCutie's mod requiring any code. It just defines in XML a bunch of new colors that you can reference from XML text or from code, but I never did that, and I don't know if the game itself will try to use them for player colors or whatnot.

Since Ruff removed the XML file, that should be the end of it. :crazyeye:
 
PH13's first two saves generate an in-game log crash when using the latest version of BUG (as of today). I've just run a couple of tests:

  • Test #1: A game where I played 10 turns on quick with vanilla BtS and then 10 turns with BUG, swapping back to vanilla --> result, no in-game log crash.
  • Test #2: A game where I played 10 turns on quick with BUG and then 10 turns with vanilla BtS opening the log in various spots --> result, no in-game log crash.

Well, the bug didn't crop up for me. I'm going to repeat the test with BUG v2.2 and v2.3 and see what I get. If anyone wants to join in on the great bug hunt, feel free. If you find a game that crashes, please describe exactly what you did and post various saves from that game (starting save, intermediate save, crashing save, etc).
 
yes - ran it with no python error logging. No crash. Going to check that I had all of BUG turned on (ie alerts).
 
I noticed this over in the Ethnic Artstyles thread:
Thanks again for reporting.

Btw, how did you find these? XML error check or something?
I used a BTS 3.13 debug DLL with Asserts on, compiled for me by mrgenie (the Vi from ViSa), the lead programmer of the WoC project.
I wonder if that would be useful for tracking down issues with BUG?
 
thx - have posted a question over there.
 
Doh, it seems Melior has played with BUG. :cry:
Damn, I'm sorry about that. I did a fresh install of BtS a while back, but I guess maybe that didn't completely wipe out BUG.
Hi Guys - can you tell me what version of BUG you played with (check the BUG option screen, its on the bottom right)
On another note; I just downloaded and installed BUG, but I still crash from opening the event log? :hmm:
From my point of view, this is great news. Melior's version of BUG introduced the in-game log bug that vanilla BtS crashes on. Rusten's version of BUG (v2.3 I'm assuming from looking at the screenie) also has the in-game log crash. This means that v2.3 of BUG has a similar reaction to vanilla BtS to this BUG, thus implying that v2.3 of BUG doesn't contain the code to over-ride or introduce (this last bit might be a bit of a stretch) the bug.

Melior - what version of BUG did you use? Do you know? Was it d/l from an install exe or zip or did you pull it from the SVN? If we can get your version, then I can look at what the differences are between it and v2.3 and see how we 'fixed' it.

I'm grabbing a copy of 'Ungy-02 AD-0375.CivBeyondSwordSave' for bug testing purposes.
 
I've looked at the above save and found the following:
  • revision 606 - no crash
  • revision 613 - no crash
  • revision 614 - crash
  • revision 615 - crash
  • revision 616 - crash
  • revision 619 - crash
  • revision 625 - crash
  • revision 650 - crash
  • revision 675 - crash
  • revision 700 - crash
  • revision 725 - crash
  • revision 755 - crash

So I look at what is different between revision 613 and 614 and find that the only different file is 'CvTechChooser.py'. The difference in this file ...

Revision 613 Line 125: xPanelWidth = screen.getXResolution()
Revision 614 Line 125: xPanelWidth = screen.getXResolution() - 60

So, that stupidly small change means that 613 doesn't crash when you open the in-game log while 614 does.

Suggestions anyone?
 
This means that v2.3 of BUG has a similar reaction to vanilla BtS to this BUG, thus implying that v2.3 of BUG doesn't contain the code to over-ride or introduce (this last bit might be a bit of a stretch) the bug.

Aha! You may be correct as I removed our non-3.13-updated copy of CIV4GameText_BTS.xml. This is great news.

Oops, missed your other post. I thought BUG has been crashing like this for a long while, long before 613. But you're saying that somewhere along the way it got fixed, and 614 now broke it again??

And I serious doubt that change could be related. They are totally different screens, and plenty of screens choose full and partial resolution. Color me perplexed.
 
I don't know the version that created this file - I'm thinking that it is a pre-613 file (user claims v2.3 but what do users know). So, bug created with pre-613 version and post 614 version keels over - al la vanilla BtS. Which sort of implies that it is fixed?

Someone is getting me a debug version of the DLL that shows errors. Will retry when I get that.
 
When you are attempting to bring up the log, is there one?
Or is it a save-game w/ no log data, and BUG is trying to load a file that doesn't exist.

Or is there a version of BUG where the LOG data has changed format? The save is in previous format, and BUG trying to load that.

I get CTD when trying to load my old savegame when attempting to pull up the log under 2.30, works fine when I copy over BUG 2.20 - that the game was originally saved with.
(I Did add in the updated files from the svn into 2.30, didn't try a "clean" 2.30)
 
A DLL with asserts on gives you feedback (popup screens) when the DLL encounters things it can't handle very well.
I got a copy of the game DLL with asserts on (what ever that means). It threw this error when I tried to bring up the in-game log ...

ingamelogbugsz1.jpg


snippet from that cpp file ...
Code:
CvColorInfo& CvGlobals::getColorInfo(ColorTypes e)
{
	FAssert(e > -1);
	FAssert(e < GC.getNumColorInfos());
	return *(m_paColorInfo[e]);
}

Now to track down where that number is stored. I'm thinking that it must be in the XML system somewhere but ... looking at BUG, we only share 2 XML files with the core game ...

1) CIV4Hints.xml - we put in some additional hints and this file only contains 'pointers' to our hints
2) CIV4ArtDefines_Interface.xml - contains path directions for our BUG art work (PLE, Unit Action, Chevrons, Servopedia)

We also share the GameFont_75.tga font file with the core game - is that a problem? Everything else is python.

Any suggestions?
 
The GameFont_75.tga file that we are using is the same one that's been around for a while, without problems in other mods. It has to either be the Hints file, or the Interface file. I'd drop the Hints file and rerun it first. Is the easiest and will have little chance of breaking other functions of it's removed. We may want to go through both files and delete all color tags, or change them to basic values, to make sure we removed traces of SimCutie's colors.
 
I really don't think it is either. Somewhere the system has the number of total colours and BUG has managed to increase or decrease that number.
 
Back
Top Bottom