[SDK] Crash at Launch (non-systematic) - How to read full dump on virtual address access

P&nny

Warlord
Joined
Sep 1, 2007
Messages
195
Hey guys,

So my Beyond the Play MOD is fully functionning (https://forums.civfanatics.com/threads/beyond-the-play-community-mod.648750/) but people experience that when they click on the shortcut to launch the game... they have to do it 2-3 times for the game to launch. (I do too... it's been doing it for several version and inconsistently between people, repetition etc.).

Appreciate it's vague and reasons could be multiple but the only thing I have so far to track is to do a full dump.

And this is what I get :

I get a 1-1.5GB file which I can't access in VC++ (or at least I don't know what to do with)
The only hint is the exception information :
"The thread tried to read from or write to a virtual address for which it does not have the appropriate access"



Any help to solve this, or at least how to better leverage the full dump, super welcome
 
There is a way to get a "Debug" view of a dump, that lets you look at the stack trace, variables etc.
I believe you have to click on "Debug with Native only" in the top right to get there, somebody please correct me if I'm wrong. Then you can look at the stacktrace to see if/where the illegal access happens in your code.
 
There is a way to get a "Debug" view of a dump, that lets you look at the stack trace, variables etc.
I believe you have to click on "Debug with Native only" in the top right to get there, somebody please correct me if I'm wrong. Then you can look at the stacktrace to see if/where the illegal access happens in your code.
Yes Yes... this is good I'm getting somewhere.
With a debug DLL & what you said I corrected 2 issues (code I wrote and I could see the issue), too bad the piece actually worked (?) when the game agreed to launch I would have spotted MUCH earlier...


I'm stuck an error further though, anyone knows what could trigger errors on the iHotkey Prioritization

For good measure I removed all the calls to hotkeys in CvEventManager, and I checked I didn't have any calls in XML;
But I still get the error.

I suppose the question is, how to track the calls being made for the index of the hotkey; it also "crazy" number so not sure where to start... :'(

 
Hello P&enny,

did you wrote some kind of extravagant code/non-standard stuff or did you expect that normal modding stuff (e.g. error during loading of xml files) is the reason for the error?

In the second case I would assume that your code requests an array index for a uninitialized value (or -1).
I would suggest to check the Log files and take a look into xml.log. If it crashs during the parsing of xml files you find out which was the last successful loaded file.
Searching for this filename (without extension) leads to CvXMLLoadUtilitySet.cpp (or similar) and you could set a breakpoint or see which file would be loaded as next.

Hope this helps you by your bug search.
 
Hey, so I was about to start and answer on this mid-week whining and crying; but I found this thread (the only one with documentation on
CvHotkeyInfo::getOrderPriority()): https://forums.civfanatics.com/thre...-the-flag-teamai-h.354327/page-2#post-8945110

And it hints at the "CONTROL_" List being erroneous;
And I don't have custom "CONTROL" in my MOD but I do have custom COMMAND_SELLUNIT & custom MISSION_xxx (4 of them);
Then I got excited when I realize I simply didn't have a custom CIV4CommandInfos.xml info; but it wasn't quite enough...

Then I edited out all of them in C++, everything, and I rolled back every bunch of line 1 by 1 and... boom magic !
I'm fairly certain it was *simply* that your MISSION_ list and COMMAND_ list really really have to be always in same order (and at the end as I had figured out earlier in the year) everywhere.


What made it tons of work is that for some completely amazing reason it was working in "full standalone" and crashing in "MOD version" with everything else being equal.
I would have preferred consistent crashing, this was a nightmare...


 
Top Bottom