Bug Thread

It seems that AI never builds lanes (roads) to connect to other players to enable the possibility of resource trade so they usually spend the entire game without the possibility of resource trade.

In regular civ cities are more closely placed than stars in fpp so AIs build roads to each other at least accidentally and connection to trade network is possible by sea, none of which is true in fpp.
 
I'm not sure that they actually never build routes for trade on purpose, although they clearly don't do it very often. They do, at least, manage to do so by accident since they build routes to resources claimed via starbases and these often connect to each other.

I'm pretty sure the code for the route building has not been modified for FFP, so whatever the issue is it is something that exists in regular BtS. It would just be the odd circumstances of this mod that either cause the problem or makes it worse. I suspect it is the limited number of free worker type units which is largely caused by the AIs sending their workers off to build starbases and sensor stations a lot.

As long as we're talking routes, there is another issue in that the AI is not bat at building routes between it's star systems in the first place, but it is not very good about rebuilding them after pirates (or anybody else) pillage them. I don't really know why that is either - perhaps some issue with the AI's "danger" calculations and caching making route builders overly reluctant to go repair things quickly.

The main effect of all the route issues, aside from just generally slowing the AI economies down a bit, is that the Red Syndicate's trait is not as powerful as it initially seems, for the AI anyway.

I have no idea when, or even if, this sort of thing well get fixed (or even seriously looked into).
 
Hi guys
I've recently had the time to do more work on the B5 Mod but as I've been playtesting I've noticed a new problem. This issue has only started since I went on to Win7 and is as follows.
When opening a star system up to either change the planet being built on or to do some other city maintenance the civ's soundtrack should play. In the case of B5 most of these are custom soundtracks but in any case there are no soundtracks playing when the city screen is open. This situation will continue until at some random point the screen will either go black for a few seconds and then come back and the soundtrack music will be playing or the screen will go black and then it will crash.

The custom music files play normally whenever you conduct diplomacy but in the city screen they don't.

Any ideas on what may be going wrong?
 
Hi guys
I've recently had the time to do more work on the B5 Mod but as I've been playtesting I've noticed a new problem. This issue has only started since I went on to Win7 and is as follows.
When opening a star system up to either change the planet being built on or to do some other city maintenance the civ's soundtrack should play. In the case of B5 most of these are custom soundtracks but in any case there are no soundtracks playing when the city screen is open. This situation will continue until at some random point the screen will either go black for a few seconds and then come back and the soundtrack music will be playing or the screen will go black and then it will crash.

The custom music files play normally whenever you conduct diplomacy but in the city screen they don't.

Any ideas on what may be going wrong?

I've never run into this specific problem, but you mention Windows 7, so... the only thing I can think of is disabling UAC, assuming you haven't already done that. I know with UAC on, people tend to run into esoteric problems. Except usually those esoteric problems are "nothing works to begin with...".

It's been a while, but how exactly are you playing music on the city screen? The custom diplomacy music works because it always has; in normal Civ though there's just ambient music in the city screen. I think?
 
It's been a while, but how exactly are you playing music on the city screen? The custom diplomacy music works because it always has; in normal Civ though there's just ambient music in the city screen. I think?

The music that plays is the same music that plays in the Diplomacy screen. You also hear the diplomacy music if you zoom in close to a civs star system.

As I mentioned we've changed the music for the B5 mod so it is more B5 orientated. I should mention that the normal background sounds still play in the city screen and that I never had this problem with XP.
 
I have found a bug in the DLL. Attached below is a fix for it.

In a rare circumstance the game can fall over dead, with a "crash to desktop" type problem.

It turns out that the code for a unit withdrawing from combat does not check for the edge of the map. If it is being attacked from a direction opposite the edge it will try to move the unit off the edge. This makes it call CvUnit::canMoveInto with a plot of NULL.

The fix requires a new DLL. In mine, rather than fixing it in the combat code which calls the function with a NULL plot, I have added a check for that at the start of CvUnit::canMoveInto which causes it to return false if the plot is NULL. Doing it this way means that any other such bug anywhere in the code will not crash it either. (I also commented out the assert that checks that the plot is not NULL.)

Like so:
Code:
bool CvUnit::canMoveInto(const CvPlot* pPlot, bool bAttack, bool bDeclareWar, bool bIgnoreLoad) const
{
//	FAssertMsg(pPlot != NULL, "Plot is not assigned a valid value");
	if (pPlot == NULL) { // Post 1.83 - it turns out a unit can try to withdraw off the map if it doesn't wrap
		return false;
	}
... no more changes after this

Attached is a patched DLL. If you run into this problem, replace the CvGameCoreDLL.dll file in <location of your BTS mods folder>\Final Frontier Plus\Assets with the one in the attached zip file. (Or if you just want to pre-emptively do so to avoid the problem.) OK, just to be safe, you should rename the existing one rather than just replacing it so you can revert if it doesn't work. Since the bugfix is the only change to the DLL it is compatible with saves from 1.83.
 

Attachments

  • CvGameCoreDLL-Post1.83bugfix.zip
    1.4 MB · Views: 276
I have found a bug in the DLL. Attached below is a fix for it.

In a rare circumstance the game can fall over dead, with a "crash to desktop" type problem.

It turns out that the code for a unit withdrawing from combat does not check for the edge of the map. If it is being attacked from a direction opposite the edge it will try to move the unit off the edge. This makes it call CvUnit::canMoveInto with a plot of NULL.

The fix requires a new DLL. In mine, rather than fixing it in the combat code which calls the function with a NULL plot, I have added a check for that at the start of CvUnit::canMoveInto which causes it to return false if the plot is NULL. Doing it this way means that any other such bug anywhere in the code will not crash it either. (I also commented out the assert that checks that the plot is not NULL.)

Like so:
Code:
bool CvUnit::canMoveInto(const CvPlot* pPlot, bool bAttack, bool bDeclareWar, bool bIgnoreLoad) const
{
//	FAssertMsg(pPlot != NULL, "Plot is not assigned a valid value");
	if (pPlot == NULL) { // Post 1.83 - it turns out a unit can try to withdraw off the map if it doesn't wrap
		return false;
	}
... no more changes after this

Attached is a patched DLL. If you run into this problem, replace the CvGameCoreDLL.dll file in <location of your BTS mods folder>\Final Frontier Plus\Assets with the one in the attached zip file. (Or if you just want to pre-emptively do so to avoid the problem.) OK, just to be safe, you should rename the existing one rather than just replacing it so you can revert if it doesn't work. Since the bugfix is the only change to the DLL it is compatible with saves from 1.83.

I've been fortunate so far that this hasn't happened but I've downloaded your fix 'just in case'.
Many thanks.
 
Failed to initialize renderer.

From init.log

Code:
[248534.656] DBG: CIV Init
[248534.656] VERSION: App: E:\EPrograms\Steam\steamapps\common\Sid Meier's Civilization IV Beyond the Sword\beyond the sword\Civ4BeyondSword.exe
[248534.656] VERSION: Build: Wed May 28 22:28:49 2014
[248534.656] VERSION: 3.1.9.0 (128100)
[248534.671] VERSION: Mod Loaded: Mods\Final Frontier Plus\
[248534.671] DBG: FILE Cat Init
[248536.125] DBG: Game Init
[248536.125] DBG: Multiplayer Init BEGIN
[248536.265] DBG: Multiplayer Init END
[248536.265] DBG: Audio Init
[248536.953] DBG: ArtFileMgr Init
[248536.968] DBG: Python Init
[248540.359] VERSION: CIV Version: 319
[248540.359] VERSION: Minimum Version: 0
[248540.359] VERSION: Save Version: 302
[248540.359] DBG: Input Init
[248540.375] DBG: Engine Init
[248540.375] DBG: Checking available screen resolution
[248540.609] DBG: Validating screen resolution
[248540.609] DBG: Creating rendererer
[248541.390] WRN: Init renderer failed...Trying again
[248543.140] WRN: Init renderer failed...Trying again
[248544.890] WRN: Init renderer failed...Trying again
[248546.625] WRN: Init renderer failed...Trying again
[248548.359] WRN: Init renderer failed...Trying again
[248550.078] WRN: Init renderer failed...Trying again
[248551.828] WRN: Init renderer failed...Trying again
[248553.562] WRN: Init renderer failed...Trying again
[248555.281] WRN: Init renderer failed...Trying again
[248557.031] WRN: Init renderer failed...Trying again
[248558.750] WRN: Init renderer failed...Trying again
[248559.750] ERR: Initialize Renderer failed. Check DirectX Installation, Latest Graphics Drivers and Graphics Settings
Parameters:
	- width    = 1024
	- height   = 768
	- flags    = 0xc
	- hwnd     = 0x470170
	- adaptrid = 0
	- deviceid = 1
Error:

I have Directx9.0c, confirmed in dxdiag. I have my graphics adapter updated. dxdiag reports no problems other than the nv4_disp not being signed.

FFP worked at some point. I reinstalled BTS and cleared out my CustomAssets. BTS is patched. My concern is really whether my BTS install is clean, since that's why I reinstalled it - to fix a problem with something else.

What does this mean?
 
I'm afraid I have no idea; can you launch BTS without FF+?

Is User Access Control (UAC) enabled? If so, that should be disabled.
 
I've been pondering this issue since it was posted.

The only thing that I have come up with is that perhaps not all "DirectX 9.0c" installs are created equal. Apparently it is not actually specific enough - there seem to be different versions of it. This is point 1 in an old thread about this sort if issue. That indicates that the regular version you get from Microsoft's download site is not the exact version they used, and a later post (#9 in that thread) says that the installer for that which comes with Civ4 also updates some other things.

If your version of Civ4 or BtS includes an installer for DirectX 9.0c, try running it.

That thread also suggests uninstalling and reinstalling your graphics drivers if doing the DirectX install doesn't work.
 
A fair idea, but I do not have such a DX9 installer.

I thought maybe nVidia GeForce was getting in the way so I tried to switch it to defer to the application, but then I learned that my GeForce is actually borked and uninstalled it.

edit: holy ****, it works now. nVidia you magnificent blackguards.
 
I've been playing a game of Final Frontier Plus today for the first time in ages!

I wanted to test out God-Emperor's AI changes that he suggested over on the main thread ages ago (the ones to get the AI to do population / planet reassignment more frequently). That seems to be working pretty well. They certainly don't seem to do any harm anyway.

Two things I've noticed (and haven't fixed yet)-- it looks like, at least in my testing setup.

1. Diplomacy greeting text for Furious and Annoyed leaders doesn't appear to be showing up. I haven't tested this in a fresh install of 1.83 (yet) but I feel like we'd have noticed if this was an issue sometime in the past two years-- unless we have and I forgot? Like I said, it's been a while. :)

EDIT: unless... was this always a thingin Final Frontier? The XML appears to be conspicuously lacking an ANNOYED or FURIOUS greeting response for instance, and the Final Frontier version seems to agree. Like I said, it's been a while.

2. Around turn 350 or so, I built a starbase next to a Forge solar system and got this charming Python exception:

Code:
ERR: Python function forceScreenRedraw failed, module CvScreensInterface
Traceback (most recent call last):

  File "CvScreensInterface", line 961, in forceScreenRedraw

  File "CvMainInterface", line 1309, in redraw

  File "CvMainInterface", line 1765, in updatePlotListButtons

  File "PLE", line 321, in updatePlotListButtons_PLE

  File "PLE", line 1401, in displayUnitPlotListObjects

RuntimeError: unidentifiable C++ exception

The relevant code in PLE (a BUG file?) appears to be:

Code:
		# check if it is an player unit or not
		if ( pLoopUnit.getOwner() == gc.getGame().getActivePlayer() ):
			bEnable = True
		else:
			bEnable = False
		# if player unit enable button (->visible, but not selectable)
		screen.enable(szString, bEnable)

		# check if the units is selected
		[COLOR="Red"]if (pLoopUnit.IsSelected()):[/COLOR]
			screen.setState(szString, True)
		else:
			screen.setState(szString, False)

I believe but cannot yet prove that this error is triggered when a starbase would be instantly built upon clicking the "Build Starbase" button. This can happen if the construction ship is constantly interrupted by nearby pirate/hostile units, for instance (I... think?). That's what was happening to me; I'd built other starbases but this one I kept having to press "Build Starbase" every turn. My guess is that BUG is not interacting well with the edge case of the selected unit vanishing while trying to update the interface, or something. Not sure why, of course; I haven't tried attaching a debug DLL yet or anything.

The error is reproducible. Maybe a simple fix and/or way to confirm the above behavior would be to somehow check the above conditions in Python before calling pLoopUnit.IsSelected()?
 
I've pushed a fix for the crash; rather than come up with complicated logic I just wrapped the whole thing in a try/except block. This doesn't appear to cause any other issues.
 
This has cropped up before. I put some checks in to try to stop it (line 290 of PLE.py, labeled with "# G-E bugfix - don't show dead units" for example). I never did manage to figure out what exactly causes it and my fixes did not stop it completely, just made it happen less.

My assumption was that it was a "zombie" unit, specifically the construction ship that was destroyed to make the starabase was mared as dead but not actually deleted yet (or something like that). But it may actually be the opposite: the starbase object may exist but not be fully initialized yet - although I'm not sure why it is assigned to the plot if it isn't initialized yet.

Anyhow, by ignoring the exception maybe you've actually fixed it now.
 
This has cropped up before. I put some checks in to try to stop it (line 290 of PLE.py, labeled with "# G-E bugfix - don't show dead units" for example). I never did manage to figure out what exactly causes it and my fixes did not stop it completely, just made it happen less.

My assumption was that it was a "zombie" unit, specifically the construction ship that was destroyed to make the starabase was mared as dead but not actually deleted yet (or something like that). But it may actually be the opposite: the starbase object may exist but not be fully initialized yet - although I'm not sure why it is assigned to the plot if it isn't initialized yet.

Anyhow, by ignoring the exception maybe you've actually fixed it now.

Huh, I'd forgotten about that.

I was assuming the zombie unit was the problem too. If it's the other way round there could be some problem involving communication between the exe (where isSelected is defined) and the dll, or... something.

Ignoring the exception and aborting the rest of the function is suboptimal in one respect: it results in no unit being selected at all. It would be nice if it jumped to another random unit on that plot (if there was one), at the very least. I'll try to make that work.
 
Hello, a long time ago I enjoyed a lot the original final frontier. Now I wanted to play again. But I can't start it. I found this lovely forum and frontier plus. Well now I can start, but then my starting colony has no planets (and maybe even no sun). There were two error massages. I made a picture:
http://imgur.com/tL8wcSE

I tried the exe installation and the manual installation as well, its always the same.
 
Two problems:

One, Steam version.

Two, installed in Program Files.

Honestly, someone should put the solution to that problem in a FAQ, it really is one of the most common issues with pretty much all mods.

Anyway, I am very sure that one or both of those problems is the cause behind this. Regarding Steam Version, you should use what Steam calls the Beta version of Civ4 (should be right below Civ4 in your games library, with the same name as Civ4BtS but "BETA" next to it), as that is 3.19, and the version pretty much all mods are assuming you to run.

As for Program Files, either you reinstall Civ4 and/or Steam in another folder, or you do some thingamajig with writing permissions. :dunno: Basically the game tries to edit some files during runtime and User Account Control (look it up, it's some Windows thing) won't let it do that because it is in the designated program files folder.

Looking at your screenshot again, apparently you don't have the error message I thought you had, so it's more likely the first point.
 
Hello, a long time ago I enjoyed a lot the original final frontier. Now I wanted to play again. But I can't start it. I found this lovely forum and frontier plus. Well now I can start, but then my starting colony has no planets (and maybe even no sun). There were two error massages. I made a picture:
http://imgur.com/tL8wcSE

I tried the exe installation and the manual installation as well, its always the same.

Also, it may be that it doesn't work in German, but I don't know which languages are supported.
 
Yeah, I've been meaning to redo the install instructions to be more helpful. :(

I should get on that.

Hello, a long time ago I enjoyed a lot the original final frontier. Now I wanted to play again. But I can't start it. I found this lovely forum and frontier plus. Well now I can start, but then my starting colony has no planets (and maybe even no sun). There were two error massages. I made a picture:
http://imgur.com/tL8wcSE

I tried the exe installation and the manual installation as well, its always the same.

Based on the error messages in the screenshot, it looks like your problem is probably user account/access control (UAC); if you have this enabled on Windows 7+, you'll need to turn it off for the mod to work properly.

I do not have a "beta" version of BTS in my Steam library, and the copy of BTS I do have is 3.19, but if that's not the case for you, you could give what Imp Knoedel suggests a try.

The game should work in German, but please note that most of our new text has not been translated (actually I don't think any of it has been).
 
Top Bottom