Bug Reports

2.0g drop to the desktop a few turns later. I will work with this and see if I can give more complete information, then modify this post.

[EDIT:] I added a save from the last turn before it drops. You press the enter key to end turn and the game drops. I don't know whether this relates to anything specific I did. I've played to failure three times, and I probably didn't make exactly the same moves in the same order.

[Later:] One thing that was different was this was my first try at Governor difficulty.

Also I've been refusing all the Pope's tribute demands.
 

Attachments

Thanks. I'm sure your version will be helpful. :)

One issue: Don't we need to separate Development version assert failures from 2.0g. As you know, all my posts are about 2,0g.

This is true, a bunch of those asserts I posted this morning happened in the Git version while playing with the AI on Autoplay. Anyway, I'll sort through them all when I get the chance. The AI atm btw is kicking Pope Butt, I may need to tame them suckers down. I'll check out that save you uploaded too.
 
Would you please add a column for version? Or split the list in two?
Done, though it's mostly blank at the moment. I also added a bit of info on how to read the columns. Sadly I couldn't get row sorting to work, but we shouldn't have that many asserts anyway. Adding something new should be done by manual looking at lines.

Oh and if somebody has another use for the wiki, then tell. I have no real plans for it, but we have it and can use it for whatever we want. Just remember that ideas like a list of units is a bad idea as it will get outdated and people should use Colopedia for that kind of info.

Actually now that I think about it, maybe we should use the github issues tracker.
https://github.com/Nightinggale/Medieval_Tech/issues
Granted you need a github account to add issues, which is why it can't replace the forum. However it provides a sort and searchable list of known issues. Also an "issue" could be a new feature and it is joined together with Milestones. This mean we can select a number of issues and mark them as needed for releasing 2.1. We can then get a list of open issues for 2.1 and see what needs to be done in order to release the next release.

There is a video here https://github.com/blog/411-github-issue-tracker with the old github graphics, but it explains the idea pretty good.

EDIT: I added two issues for testing purposes.
 
2.0g drop to the desktop a few turns later. I will work with this and see if I can give more complete information, then modify this post.

[EDIT:] I added a save from the last turn before it drops. You press the enter key to end turn and the game drops. I don't know whether this relates to anything specific I did. I've played to failure three times, and I probably didn't make exactly the same moves in the same order.

[Later:] One thing that was different was this was my first try at Governor difficulty.

Also I've been refusing all the Pope's tribute demands.

This maybe related to Traders having cargo in Europe and then being placed on ships. I may have fixed this in the current git version, but don't have time to check this out further atm.
 
My game crash when I load a savegame or start a new game using a new git clone. Do anybody else have this problem or did I screw up big time?

I have pulled your changes and have no problems. What exactly do you mean by new Git clone?
 
I have pulled your changes and have no problems. What exactly do you mean by new Git clone?
I ran an outdated version of the bat file by accident and broke my directory layout in Assets. I removed Medieval_Tech and ran the right version of the bat file to check out a brand new clone from github and then it copied Art and such from 2.0d (no stable release added Art files after that one). It appears that my bat file is broken. I knew that as it hasn't been updated since 2.0c, but my fix is broken too :(

At least now I know the problem is in the bat file. That is something really good to know before digging deep into it to figure out why it failed to do what I expected it to do.
 
I ran an outdated version of the bat file by accident and broke my directory layout in Assets. I removed Medieval_Tech and ran the right version of the bat file to check out a brand new clone from github and then it copied Art and such from 2.0d (no stable release added Art files after that one). It appears that my bat file is broken. I knew that as it hasn't been updated since 2.0c, but my fix is broken too :(

At least now I know the problem is in the bat file. That is something really good to know before digging deep into it to figure out why it failed to do what I expected it to do.

Ok, good!

@mastrude
That was the problem I mentioned in your last crash mastrude, somehow a Wily Trader while waiting in Europe to be picked up actually purchased some goods. Then when he was picked up it created an error of a Transport carrying a Transport that is carrying goods and the code didn't like that. I fixed your saved game by creating a Failed Assert that will pop and then delete any such goods being transported. I figured that was faster than trying to make it so that transports carrying transports that are carrying goods want crash the game.

I added code that will "hopefully" prevent this from happening again. But if you see a failed assert that says "Goods transported over water by none Sea Vessel" then we still have the same problem. I uploaded a fixed saved game that starts the very next turn. I had to choose a Tech to research for you so you may want to check that out. Also, the DLL in the upload is the one I have been working on for the AI so not sure what all may result from that. Hopefully just smarter AI:scan:


@Nightinggale,

What is the best way to set up debugging for older versions. Like we released 2.0g but then I started programming new things into the Git version. I have a separate Medieval Tech 2.0 version that I have been using with the saved games people post but when I build a new DLL to test fixes it also has my current changes. Sometimes my changes want be save game compatible, so far I haven't made that type of change yet. So, what is the easiest way to debug older versions? And also, in Visual C++ Express 2010 is there a way to start Colonization from it's menu so that you can run debug right from the very start of the game as I have been just "attaching to process"?
 
What is the best way to set up debugging for older versions. Like we released 2.0g but then I started programming new things into the Git version. I have a separate Medieval Tech 2.0 version that I have been using with the saved games people post but when I build a new DLL to test fixes it also has my current changes. Sometimes my changes want be save game compatible, so far I haven't made that type of change yet. So, what is the easiest way to debug older versions?
Right click->git->log
In here you can do more than just read the log. You can get the diff for each commit and more importantly you can set master to whatever version you want. Select the commit, which was the 2.0g one and set it to master and you will test on that one.

Those commits will be easier to find if we add changelog.txt (or whatever we call it) and update that one with a commit message telling that this commit is 2.0g or whatever. That will make it much easier to find later on.

There is also the option to make branches. You work on the branch "master", but we could make a branch called 2.0g or whatever. That one would then basically be a pointer to a specific commit meaning even though it has all the files to begin with, it doesn't really use server space. You can then commit new code to a branch just like you can to master. However any future commits makes it different from master meaning you basically have two different projects.

Common usage for branches would be to branch a stable release and then commit all bugfixes to that branch. This allows increasing stability without hurting stability with new buggy features.

The other major usage of branches is to make a branch for a specific task, often really big tasks. Say we want to change square plots to hexagon plots like Civ5. We estimate that 5 people should work on that for 5 months and every commit will break gameplay. That would be an ideal setup for a branch. Once it's done the branch can remerge into master and at all time the master is playable.

I have no plans for branches in M:C. Their usefulness increases as the number of developer increases. If we some day have 10 C++ coders, then it's another story.

And also, in Visual C++ Express 2010 is there a way to start Colonization from it's menu so that you can run debug right from the very start of the game as I have been just "attaching to process"?
I tried to get this working. The problem is that VC lacks the knowledge of what it should start. After all the info on what it compiles is in the makefile and not the project file. Also even if the project file knew which file it compiled, it would know the dll, but it should start the exe. This mean that inside the project setup it should be told to start colonization.exe with the argument mod="Medieval_Tech".

So far I haven't had any luck getting it to work. Somehow incorrect settings freezes the entire system, which makes me hesitate a bit when it comes to experimenting with settings :badcomp:
Don't ask me why it freezes. It makes very little sense to me that it does that.
 
In Prague I have a winery with three vintners and lots of grapes. The grapes aren't disappearing and no wine is being produced. Why is that?

I checked this out, this bug is created because of the Inn Keeper trying to produce Culture from Wine and Sheep when there is no Sheep. If you remove the Inn Keeper all is fine, but this is a error as it should not stop the production of Wine. Ever sense I implemented the MultiYields per profession mod there has been discrepancies like this and I can't seem to ever get rid of them all. Thanks for the post, I'll fix this when I get the chance.
 
Ever sense I implemented the MultiYields per profession mod there has been discrepancies like this and I can't seem to ever get rid of them all.
Sounds like you are doing it wrong. If you can fix it at one location and not another, then it sounds like you have multiple places with the same code. Bugs are easier to find and fix completely if we have one function for each functionality. In this case it should be some function to deal with production using yield X and yield Y or something. The check function shouldn't care which yields it checks for.
 
Sounds like you are doing it wrong. If you can fix it at one location and not another, then it sounds like you have multiple places with the same code. Bugs are easier to find and fix completely if we have one function for each functionality. In this case it should be some function to deal with production using yield X and yield Y or something. The check function shouldn't care which yields it checks for.

Multiple Yields Consumed / Produced was one of the most difficult features I have ever adapted / implemented.
(Even though I could reuse parts of existing code.)

I had to change and add lots of lines of code in various places to get it bugfree and understood by AI.
You should not underestimate the complexity of a feature like that. :)

@Kailric:
I can really understand that you are fighting with that feature. :thumbsup:
 
Sounds like you are doing it wrong. If you can fix it at one location and not another, then it sounds like you have multiple places with the same code. Bugs are easier to find and fix completely if we have one function for each functionality. In this case it should be some function to deal with production using yield X and yield Y or something. The check function shouldn't care which yields it checks for.

Well, the problem is that it is someone else's mod that had errors in it to start with and I have been trying to sort through all contingencies as well, which there are a whole bunch when you add at least two more yields consumed when the code was only designed for one. If you have the chance you can look over the function below as that is where all the calculations are made.

It's simple math really. In the above saved game everything works fine with the Winery until you add the Inn Keeper. Who tries to produce Culture with Sheep and Wine, except there is no Sheep. The Inn Keeper records look correct as it shows +5 from the building itself (which that calculation consumes no yields) and then + 6 from the Inn Keeper for a total of 11, but it shows -6 from lack of Sheep. So all that is correct. In the Winery it however, it says -6 Wine converted to Culture, which obviously it thinks Wine is actually being consumed at the Inn when it is not. Still, the total wine showed produce in the Yields Bar is 0. That is not correct either.

Code:
void CvCity::calculateNetYields(int aiYields[NUM_YIELD_TYPES], int* aiProducedYields, int* aiConsumedYields, bool bPrintWarning, SpecialBuildingTypes eSpecialBuilding) const

Edit: if you add sheep to the City all calculations are correct. BTW I added code so that you can open World Builder, select the Sheep unit, and then place it in a city. You will get a failed assert but it adds 100 units of sheep to that city as before it would just create a unit that you had to manually load and unload into a unit to get it into a city.
 
Multiple Yields Consumed / Produced was one of the most difficult features I have ever adapted / implemented.
(Even though I could reuse parts of existing code.)

I had to change and add lots of lines of code in various places to get it bugfree and understood by AI.
You should not underestimate the complexity of a feature like that. :)

@Kailric:
I can really understand that you are fighting with that feature. :thumbsup:

Thanks, ray!! Ahh, somebody who understands me :crazyeye::lol::)

Yeah, I have thought this "bug" fixed several times, but there are so many contingencies and order of things. And I haven't even tried to deal with Multiple Yields Produced yet and do not want to go there any time soon :)
 
And I haven't even tried to deal with Multiple Yields Produced yet and do not want to go there any time soon :)

You should though. :)
Multiple Yields Produced (Plot and Building) do unlock very interesting possibilities.

I would also suggest to take a look at Multiple Professions Per Building (original implementation from Androrc).
It is also a very good base feature that unlocks lots and lots of possibilites.

I better stop here, because I could probably list 50 more good existing features. :lol:
 
You should though. :)
Multiple Yields Produced (Plot and Building) do unlock very interesting possibilities.

I would also suggest to take a look at Multiple Professions Per Building (original implementation from Androrc).
It is also a very good base feature that unlocks lots and lots of possibilites.

I better stop here, because I could probably list 50 more good existing features. :lol:

Yep, all in due time;) Now that I think of it I did have the plot yields Food and Cattle produced at once, but I didn't like that fact that it produced the same amount of each. I wanted to produce full Cattle but half the Food (thinking cheese and butter) so that normal food producing farms wouldn't become obsolete. Why would you ever produce just food when you could produce cattle and the same amount of food at the same time. So, until I adjusted that I removed this feature.
 
... but I didn't like that fact that it produced the same amount of each. I wanted to produce full Cattle but half the Food (thinking cheese and butter) so that normal food producing farms wouldn't become obsolete.

I did something like that in Religion and Revolution.
(Really simple coding actually.)

e.g. Hunter:

Produces Fur and Food.
But Food is always only 50% of Fur.

That was mainly a balancing decision.

But I also wanted clear separation of Professions and Specialists.

e.g. Bonus on Food from Specialist Farmer, does not affect amount of Food with Profession Hunter.

Meaning:
Bonusses (Specailist, Resource, Improvment, ...) do always count on Primary Yield only.
Secondary yield is always directly calculated from Primary Yield.

Yep, all in due time;)

Of course. :)
But implementing "base features" first, might get handy.
 
So, you prolly have all the quirks worked out of the multi yield system then? We could just somewhat copy your version then and all the related functions and have a unbugged code. I have added my own M:C specific code though so we'll have to work around that. Also, did you make all secondary produced goods yield half? There could be a new attribute that states "bSecondayYieldsHalved" in professions so that you can still produce full multi yields if you wanted too.
 
Back
Top Bottom