The chance of a memory issue being reproducable with always the same places for the breakpoints is very low.How much memory do you have (and how old is it)? It sounds like it could be a hardware issue, as I've been able to debug fine with current sources.
The chance of a memory issue being reproducable with always the same places for the breakpoints is very low.
SVN of course and that is common for heap corruption that it causes different issues on different PCs.Then I have no good ideas. Are you using the SVN sources or modified ones? Because I can debug (and use breakpoints) fine with the current SVN sources.
SVN of course and that is common for heap corruption that it causes different issues on different PCs.
(I thought RoM also had a bard but could not find it).
Updates
- Story Tellers are now available. There are three types Story tellers, Entertainers and Celebrities (I thought RoM also had a bard but could not find it). They spread culture to a city and reduce anarchy length. The upgrades reduce anarchy by more. There is a chance that they will not be consumed by the action but I have not yet added exp or promotions to the units. Nor do they jump back to the capital yet.
- Food caravans are also turned on. (Known Bug - it adds the correct amount of food but reports zero food given.
Note: AI needed for both sets of units.
- Minor tweaks to Subdue Animal buildings regarding when some are available and the chance of capturing them on conquest.
Heap corruption happens when you write to memory areas that are outside of what you actually just trying to write. Like when you dereference -1 on an array or in general outside the bounds and then write content there. Or when you continue working with an object after you freed its memory (e.g. when you pass a pointer to some other code and that keeps it while you delete it). If you are lucky, that causes a crash right away but unfortunately often it just causes some issues later in unrelated code like crashes or triggering breakpoints where there should be none.Huh... so what exactly is a heap corruption - how does it happen? I've been noticing only that sometimes integers aren't keeping anything near their correct definition but was thinking it was, in the cases I found, either due to a reference of -1 where there should not have been allowed one or due to exceeding the int limits. Haven't had any trouble with false or ignored breakpoints though.
Heap corruption happens when you write to memory areas that are outside of what you actually just trying to write. Like when you dereference -1 on an array or in general outside the bounds and then write content there. Or when you continue working with an object after you freed its memory (e.g. when you pass a pointer to some other code and that keeps it while you delete it). If you are lucky, that causes a crash right away but unfortunately often it just causes some issues later in unrelated code like crashes or triggering breakpoints where there should be none.
Those issues are very hard to debug.
Unfortunately not as I had not updated to the SVN version or debugged since before christmas.I have not seen any hint of this behavior (or other thing that might be down to bad pointer scribbling) recently. Have played several hours solidly with the release version, and several hours debugging without issue on the debug version. Do you know approximately when it started so we can narrow down (at least probably) to a set of SVN pushes, which we can then review?
Well if we ever find one that would be awesome!![]()
Ok, I'll get some AI done for these soon. Could you give me a rundown on how they work. In particular I will need to know how to spot and evaluate what they can do in the A, so:
- Do they have a unique AI type? If not what AI type do they use?
- How does their new ability (or abilities) show up in the XML? Is it an outcome mission?
- How do different level of ability work as you progress through the unit line (or promotion line if that is used or intended to be used)? - i.e. - what in the XML shows hat one unit in the line can do a better job than an earlier one?
Unfortunately not as I had not updated to the SVN version or debugged since before christmas.
And I have only seen the false breakpoint effect in the debug version, but that one reproducable.
The outcome mission value evaluation is aware of the culture (which just uses Python to determine the amount, embedded in an integer expression) but not the anarchy reduction (as for this the action itself is in Python).What they do - they are basically lesser versions of the Great Artist.They spread culture to a city (very useful for getting resources if you are playing with Realistic Culture Spread on which seems to avoid giving you strategic resource plots at all costs).
They reduce anarchy in a city both conquest and slave revolt.
1) They use the Artist AI type. (UNITAI_ARTIST)
2) Outcome mission with a python call to find the amount of culture they spread. I did try and suggest for AIAndy to have an "adjust for game speed flag" in the outcome so I could put the actual number in the Outcome.
3) There is no XML for this. Python determines culture and the number of anarchy turns they reduce. This is because if we left it in the XML the units would be treated as Great Artists and they would remove all anarchy in one turn.
The outcome mission value evaluation is aware of the culture (which just uses Python to determine the amount, embedded in an integer expression) but not the anarchy reduction (as for this the action itself is in Python).
I am off skiing for a week now but for speed reasons I agree that the gamespeed adjustment should be a direct integer expression node and not a Python callback node to avoid repeated Python calls and I guess the anarchy reduction should be part of the outcome as well so it can be directly understood by AI code.
Btw, your Python looks disfunctional to me (argument should be argsList, 2^(-X) is no good idea in integer arithmetics and bKill is not set to false in the outcome mission so not killing it in Python does not do anything).
CyGame().getGameSpeedType() is positive from 0 (slowest game speed) to 7 or so (whatever our number of game speeds is at the moment minus one for the fastest game speed).Half of the X values are negative and half positive so I don't see the difference between y*2^(-X) and y/2^X. I could do if X< 0 then y*2^abs(X) else y/2^X I suppose. Anyway I am told it is working fine in A New Dawn (not RoM:AND the other A New Dawn). I will test it in C2C just when the pain permits.
Update
- Fix cost of Story Teller.
- Remove excess happiness on Quant. Crystals.
What they do - they are basically lesser versions of the Great Artist.They spread culture to a city (very useful for getting resources if you are playing with Realistic Culture Spread on which seems to avoid giving you strategic resource plots at all costs).
They reduce anarchy in a city both conquest and slave revolt.
1) They use the Artist AI type. (UNITAI_ARTIST)
2) Outcome mission with a python call to find the amount of culture they spread. I did try and suggest for AIAndy to have an "adjust for game speed flag" in the outcome so I could put the actual number in the Outcome.
3) There is no XML for this. Python determines culture and the number of anarchy turns they reduce. This is because if we left it in the XML the units would be treated as Great Artists and they would remove all anarchy in one turn.