Stack Overflow Error with Modded research.txt

Please post here for questions and discussion about scenario, art and sound modding and the game editor for Distant Worlds.

Moderators: Icemania, elliotg

Post Reply
Unbroken
Posts: 21
Joined: Fri Aug 22, 2014 11:26 am

Stack Overflow Error with Modded research.txt

Post by Unbroken »

Hey folks,

I recently decided to take a stab at modding, and I've hit a bug that has been befuddling me for several hours now.

I was working on research.txt with the goal of consolidating/removing some of the filler techs and reorganizing other areas to provide less of a simple linear pathway, along with adjusting research costs to promote some level of decision making. An example of this would be tweaking the costs between the 3rd-generation of a tier two weapon (ex. Velocity Shard v3) versus the 1st-gen Plasma Torpedo in such a way that there's an actual choice: grab the weapon upgrade for a more immediate benefit, or spend less money/time and go straight for the new weapon.

The issue is that I've managed to get clr.dll-related stackhash/stackoverflow errors --> CTDs as a direct result of the attached research.txt during the galaxy creation process when starting a new game. I can run a different theme and start a new game without a hitch; the issue lies in something I've done, likely without noticing. I have a hunch some of the parent/child tech relationships are still off, yet the game can successfully parse the file without problems.

I'd definitely appreciate any advice/help pinning down the exact issue as chances are I'm just too blind to spot the problem at this point.
Attachments
research.txt
(52.02 KiB) Downloaded 6 times
darkriot
Posts: 32
Joined: Sat Jul 05, 2014 1:56 am

RE: Stack Overflow Error with Modded research.txt

Post by darkriot »

Did you look at the crash log file?
Unbroken
Posts: 21
Joined: Fri Aug 22, 2014 11:26 am

RE: Stack Overflow Error with Modded research.txt

Post by Unbroken »

There's no crash log for this problem, unfortunately. Otherwise, that'd provide me a better idea of what is going wrong. When the game crashes, it gives me the a Windows standard "Distant Worlds Universe has stopped working" appcrash citing clr.dll and a Stack Overflow Exception as the culprits.
User avatar
Retreat1970
Posts: 1125
Joined: Wed Nov 06, 2013 11:09 am
Location: Wisconsin

RE: Stack Overflow Error with Modded research.txt

Post by Retreat1970 »

I went through it looking for typos, which I never want to do again lol. Every error I've had is because of a typo or omission. That being said, I didn't see anything wrong, but after the first 100, things start to blend together.
Unbroken
Posts: 21
Joined: Fri Aug 22, 2014 11:26 am

RE: Stack Overflow Error with Modded research.txt

Post by Unbroken »

Thanks for checking it!

I did try noodling with it some more, namely by attempting to isolate what part of the file is causing issues. To this end, I copy-pasted the first 42 or so techs into the AI Improvement Mod 1.04's research file and still received the error. Even after removing the tech cost changes in those, reverting any name changes and basically ensuring the two files are identical (at a glance), I'd still get the stack overflow error.

Short of having a formatting issue that the game's parser doesn't catch, I wonder if it's simply FUBAR'd.
Bingeling
Posts: 5186
Joined: Thu Aug 12, 2010 11:42 am

RE: Stack Overflow Error with Modded research.txt

Post by Bingeling »

Formating errors (wrong number of entries) should be pretty obvious if you edit the file in a spreadsheet.

If you don't figure it out, check for how to open csv (comma separated value files). You get each value in a cell.

I would never try to do any significant modding without using a tool like a spreadsheet to keep track of the values (save as .csv).
Post Reply

Return to “Design and Modding”