Éa III, Sword & Sorcery: Bugs/Crashes thread

Yep, got the CTD again after revering to autosave 98 (and probably not making exactly the same moves).
Here is the log, it was too large to fit on pastebin.
And here is the minidump (after the most recent CTD so same as the Lua log).
The crash occurs after i hit end turn, but as far as i can tell before another civ gets it's turn (or at least before i see the "processing turn" message)

I can tell from the dump what is crashing, but I'd like to know what is causing it to get to that state. Could you please post the save for which the crash repeats? Also, is the save for which the crash repeats a valid one (ie, not corrupt like was discussed earlier in the thread)?
 
I can tell from the dump what is crashing,
From Lua.log, the CTD appears to happen right after AI strategy tests for player 1. The next thing that would happen (that didn't or at least didn't print) is PlayerDoTurn for player 1. Player 1 was doing a variety of things on the turn before, but nothing stands out to me.
 
From Lua.log, the CTD appears to happen right after AI strategy tests for player 1. The next thing that would happen (that didn't or at least didn't print) is PlayerDoTurn for player 1. Player 1 was doing a variety of things on the turn before, but nothing stands out to me.
Nah, the dump pins the crash directly on the player traits free buildings code which I wrote a couple weeks ago. I don't really need the save, I just wanted it to better understand something. I'll release a fix in a couple hours (unless you want to release V3, in which case I'll just send a pull request).
 
I'll release a fix in a couple hours (unless you want to release V3,

Not yet. Go ahead and hotfix it. (But do send a pull request.)

Here's a hotfix to make Governor's Compound buildable only in occupied cities (Courthouse is properly buildable in any city). In EaCities somewhere around line 1308, add:

Code:
TestCityCanConstruct[GameInfoTypes.BUILDING_GOVERNORS_COMPOUND] = function(iPlayer, iCity)
	local city = Players[iPlayer]:GetCityByID(iCity)
	return city:IsOccupied() and not city:IsNoOccupiedUnhappiness()
end
 
Ea III v2h :
Lua error when trying to sell a slave in a city with a slave market :
EaActions.lua:1004: attempt to index upvalue 'g_unit' (a nil value)
 

Attachments

I can tell from the dump what is crashing, but I'd like to know what is causing it to get to that state. Could you please post the save for which the crash repeats? Also, is the save for which the crash repeats a valid one (ie, not corrupt like was discussed earlier in the thread)?
Sorry, couldn't answer earlier because of time-zones.
I posted an autosave for turn 103 (right before the crash) in my first post (link again)
I did enable the config.ini flag that causes autosaves at the end of the turn as explained somewhere here so unless i also need to do something else to get valid autosaves, yes it should be valid.

Free buildings ... mhh, i had an artist building a festival in my second city (not sure how much turns were left for it), druid building temple to some forest god and engineer working on Pyramids but the later was probably not to be finished soon.
 
A ctd.

I can't tell what is the cause of it (it might have something to do with the part of the map south of the naga camp), but it can be reproduced from the save.
 

Attachments

Ea III v2h :
Lua error when trying to sell a slave in a city with a slave market :
EaActions.lua:1004: attempt to index upvalue 'g_unit' (a nil value)
Do you happen to know if any of the other non-GP mod actions are working? These also include Render Slave, Hire Out Mercenary, and all of the "alt upgrades" (eg, rangers -> marksmen, horsemen -> armored cavalry). The error suggests a general fault in this system for non-GPs, which I may have introduced with some other code changes.
 
A ctd.

I can't tell what is the cause of it (it might have something to do with the part of the map south of the naga camp), but it can be reproduced from the save.

I could not reproduce this in hotfix h (I loaded the save and hit end-turn, the turn goes just fine). Were you by chance running an earlier hotfix?
 
I bought tiles neighbouring another civilization's city. In the popup screen during their turn, where they ask me not to do it any more, neither button works and I get stuck on the screen in question. I've tried re-loading the autosave and the same thing happens every time it's their turn.


UPDATE BEFORE I EVEN POSTED THIS

I noticed there was a new hotfix (H, I was on F before) so I got that. Now the buttons do work but I'm getting a set of bug popups and, while I can select my great people, nothing changes in the UI when I do so (no portrait, no commands, nothing - if I had a previous unit selected it show that unit's portrait/stats and the rest of the command bar disappears).

Enclosed are the lua.log and the autosave from before the update (in the shadowling diplomacy bug.zip file -may be completely irrelevant now) and the new lua.log (in the shadowling UI bug.zip file).
 

Attachments

Do you happen to know if any of the other non-GP mod actions are working? These also include Render Slave, Hire Out Mercenary, and all of the "alt upgrades" (eg, rangers -> marksmen, horsemen -> armored cavalry). The error suggests a general fault in this system for non-GPs, which I may have introduced with some other code changes.

I don't know for Render Slave or Hire Out Mercenary.
I remember using the warrior to medium infantry upgrade recently (not sure if it was exactly on the same game).

ls612 said:
I could not reproduce this in hotfix h (I loaded the save and hit end-turn, the turn goes just fine). Were you by chance running an earlier hotfix?
Yes, I installed the hotfix h (on top of the others, not on a clean install).
I think you need to play the next turn as well to get the crash (somewhere in the middle of my moves, but not obviously on a specific action)


I'm going to check these and bring more elements if I can (both are on variations of the same game).
 
I could not reproduce this in hotfix h (I loaded the save and hit end-turn, the turn goes just fine). Were you by chance running an earlier hotfix?

So, I just tried the following :

First, to be sure that I have a clean install:
deleted this folder: Éa III, Sword and Sorcery (v 2)
deleted the cache and the moduserdata files
extracted the mod to the mod folder, then applied the hotfix h (only this one)
rebooted windows


I can then reproduce the ctd with the save I posted earlier :
- Launch Civ5, chose the mods, load the save
- next turn button
- press space key to skip the next unit
--> crashed

I'm a bit concerned that there might be something going with my hardware config...
 
I don't know for Render Slave or Hire Out Mercenary.
I remember using the warrior to medium infantry upgrade recently (not sure if it was exactly on the same game).

I'm going to check these and bring more elements if I can (both are on variations of the same game).

Here's what I 've found on the non GP actions.


I started a new game (quick speed), and tried with the slaves policies :
- rendering slaves for gold or for prod give the same Lua error I described before (EaActions.lua:1004: attempt to index upvalue 'g_unit' (a nil value))

And another game where I researched the relevant techs and policies, mined naphta, yew, etc. So :
- I don't have any icon for alternate upgrade catapults --> fire catapults (but the regular catapult --> trebuchet is in and working; the fire catapult can be built in a city and can be upgraded to fire trebuchet)
- trackers can upgrade to rangers. The other upgrade icon is mislabelled: "Increases the apparent size of your civilization and military might by 8%". This label matches what I expect for pyramids (and I remember that in other games the pyramids label was telling something like "placeholder"). If I click it, the tracker is upgraded to bowmen (which is correct)
- rangers can upgrade to heavy infantry or marksmen (and the label is correct). However the marksmanship tech wasn't researched yet. Marksmen cannot be built directly in my cities until the research.
- Bowmen can be upgraded to marksmen after the tech is researched only (without level restriction )
- trebuchets can upgrade to bombards without chemistry
- I can hire out a unit (with the required policy). It was then listed in the additional information mercenery list. On the next turn, the unit disappeared, and I the gold info tells that I'm making 2gold from hired out units.


I know this is complicated, I'll try to explain if you have questions...

Edit: All of this without any Lua error, crash or reloading
 
@Vinnz, Thanks for the significant testing there!

Well... the same bug involves both slave actions, which is at least a clue for me. The lack of some alt upgrades may be a related or totally different problem.

The "level restriction" for upgrade to marksmen is really an "old text" problem. I removed the level restriction when I added and extra tech in this branch.

The funky text in the action mouse-over indicates a particular kind of error to me. What you're seeing is "left over" text sitting in a variable that wasn't updated. I should be able to track that down.

Some other problems in your list that look like easy table fixes.
 
Hotfix h allowed me to progress after turn 103 (no more CTD).
I copied the Lua log after reloading T103 and processing to T104 in case it can help you determine what exactly some civilization was trying to do that caused the crash.
It's here on pastebin
Couple issues i noticed when progressing further :
  • I can't mine Cinnabar after i researched Alchemy
  • Bloom spell will show up multiple times in my Druid's spells list
  • Sagitarii don't receive the XP bonus from a Great Warrior resident in the city
  • Copper visually disappear when improved

Also, loading a saved game later, i got a bunch of errors. Got the same errors from a regular save and an Autosave_Ea from the previous turn.
Spoiler :
Ea-error-screen.jpg

Here is the log after loading the save
 
Hi. If you go to the advanced setup screen, you can select any civilization as your starting race, including Animals, the Fey and multiple instances of named civilizations (probably one for each race). Not surprisingly, selecting the Fay caused my capital to become religious and then disappear. Now i know my guesses were right as to what civilization was causing those T0 messages. I don't plan to test animals next unless you insist, one dumb test is probably enough :hammer2:
 
Update on my issue:

I started a new game and got the same issue with the UI on a newly generated great person (even the 'new great person' popup was empty). I deleted the cache and moduserdata folders and that fixed everything for that game.

However, when I loaded my older game's save (the one made during Hotfix F) it broke again (also for the new game, making me think that perhaps the old save is corrupt and also corrupts the cache).
Here's the lua.log from my latest attempt with my old save.
 

Attachments

@Pazyryk: I have fixed the Kraken, and added a new "evil" skin.
Fantastic! The seas will no longer be safe in v3!

However, when I loaded my older game's save...
I can tell from the Lua.log that you are loading from within an existing game or current Civ5 session. A lot of modders warn against this and (although I don't really understand the problems) I would agree with this recommendation. There was definitely a problem here loading mod-specific Lua data. I'd be interested to know if the same exact save works if you fully exit Civ5 and load the same game in a new Civ5 session.

Hi. If you go to the advanced setup screen, you can select any civilization as your starting race, including Animals, the Fey and multiple instances of named civilizations (probably one for each race). Not surprisingly, selecting the Fay caused my capital to become religious and then disappear. Now i know my guesses were right as to what civilization was causing those T0 messages. I don't plan to test animals next unless you insist, one dumb test is probably enough :hammer2:
Oh my! And you can select Heldeofol too (which would be equally crashy). Don't do it!

@ls612, here's the hotfix for the advanced setup screen. In CoreUI_FrontEnd/AdvancedSetup.lua, add this after line 459 (after "if not civInfo.Playable then break end"):
Code:
if not civInfo.EaRaceSelectionText then break end
 
I can tell from the Lua.log that you are loading from within an existing game. A lot of modders warn against this and (although I don't really understand the problems) I would agree with this recommendation. There is definitely a problem occurring here in loading mod-specific Lua data. I'd be interested to know if the same exact save works if you fully exit Civ5 and load the same game in a new Civ5 session.

I quit to windows, replaced the autosave (since I already progressed past that point in the new game - which is completely bug-free so far, I might add - though I haven't bought tiles next to an AI city yet), restarted the game and loaded the autosave. Still have the same issue, but now it only comes when I progress to the next turn (so again where my problems with that game started, the AI not being happy I bought tiles next to his city).

Here's the new lua.log as well.

EDIT: I'll try to buy tiles next to an AI city in the new game to see if I can replicate this error there.

EDIT 2: UPDATE: So far the AI didn't take offence to my buying of tiles so I wasn't able to replicate it in my new save yet. I'll report back once I have some more time to properly try this (and beat my head against the wall until it works!;))

However, I did quit my game in-between my previous edit and loading my new save and the bug didn't bleed over this time. So there's definitely something wonky going on with loading from one game into another.
 

Attachments

Back
Top Bottom