Crash to Dektop - No Blackbox

Talk about your new mod or map here

Moderators: jelco, bert_the_turtle

BigBonsai
level1
level1
Posts: 27
Joined: Sat Sep 10, 2005 10:46 pm

Crash to Dektop - No Blackbox

Postby BigBonsai » Mon Feb 18, 2008 12:23 am

Hello there.

As the title says, my mod crashes to Desktop when I leave the first level of my mod ("Leave Location") and want to return to the global map. I get a Windows error and that was it. No Blackbox file is created.

Are there any ideas on this? Can I post anything short of the whole mod that could give you ideas on how to help me?

Thank you so much for your help!


BiB
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Postby xander » Mon Feb 18, 2008 2:58 am

Is there any chance that you have any instant unit officers or armours in the level that do not have orders by default? Also, when you leave the level, are there any scripts that might be running?

xander
BigBonsai
level1
level1
Posts: 27
Joined: Sat Sep 10, 2005 10:46 pm

Postby BigBonsai » Mon Feb 18, 2008 11:31 am

No, no units at all.

No scripts on the world map or on exit. Except for the strings_default texts. But that doesn't count as script, I guess. :-)


BiB
User avatar
Shwart!!
level5
level5
Posts: 1237
Joined: Sun Nov 12, 2006 1:36 am

Postby Shwart!! » Wed Feb 20, 2008 4:07 am

Is there a following level that is giving you issues? It sounds to me like a level on the map is killing the game, being unable to display properly, that isn't there before the level you mentioned.

Shwart!!
BigBonsai
level1
level1
Posts: 27
Joined: Sat Sep 10, 2005 10:46 pm

Postby BigBonsai » Tue Feb 26, 2008 12:34 pm

Hi. Thanks for your reply. I checked and re-checked. I just cannot see the problem.

Maybe a stupid question, but is there an easy way to bugtest this game?


BiB
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Postby xander » Tue Feb 26, 2008 4:09 pm

There are plenty of techniques for debugging, but most of them are learned through experience. Zip up the mod and post it here, and we can look through it.

xander
User avatar
briceman2
level2
level2
Posts: 123
Joined: Wed Dec 12, 2007 4:30 am

Postby briceman2 » Tue Feb 26, 2008 8:18 pm

Since your crash is upon leaving the level, it's probably a problem with darwinia trying to save the mission file or update the game.txt file. You are using a profile, right? I've never seen a "none" profile cause crashes, but it might under certain circumstances.

Try this: load up the game.txt from your mods directory in a text editor and find the Buildings_StartDefinition header. Delete ALL the lines of numbers between that and the Buildings_EndDefinition line. There are very few reasons to preset any of these values. Unfortuantely the in-game editor tends to pollute the list. If you delete buildings and then add more to the same level, ghost data from the old buildings can clash with the new buildings and cause hard crashes and system hangs. Sounds a lot like what you're experiencing. It is good practice to periodically clear this list as you develop your mod. It will eliminate lots of mysterious crashes and bugs.

EDIT: in order for these changes to take effect (if you edited the mod directory files) you must delete the mission and game files from the profile directory. The profile files supercede the mod files. I usually just delete them directly, but I think you can achieve the same effect from within the game by reloading the mod and/or profile. I dunno since I never do it that way. Ask xander, he probably knows.


One of the best debug techniques is to use the comment hash "#" to comment-out recently added stuff and then uncomment them one at a time until the problem reoccurs. You can do this with your original map, mission, and game files, or if you use a redshirt decoder you can do it with the live mission and games files saved in the profile directory.

Basically you just place a "#" hash character at the begining of all the building lines you want to disable. If a crash just started recently, comment out all the recent stuff to revert to an earlier state. Then load the level, check for the problem, exit darwinia, add or remove hash marks, and repeat. It is best to remove hash marks one at a time, or at least one building type or building system group at a time. Be aware that some buildings will crash the game if their link targets aren't loaded (hanging links). I think the powerstation and the generator do.

Also, sometimes you might need to comment out some of the level entries in the game.txt file. The symptoms are: you just added a new level or expanded a level, and after you exit darwinia and restart, it hangs with a black screen and won't load. Sometimes simply reordering the level lines will do the trick (its OK for the level numbers to be out of order), but a sure-fire way to find the culprit is to comment out all the levels except one. One level will almost always load by itself, even if it causes the game to hang when the rest are added. You then remove one hash mark at a time until the game loads. Generally this problem doesn't show up unless you have lots and lots of complex test levels in a single mod.

***WARNING***: if you do the comments editing on your original files (in the mods directory), YOU MUST NOT SAVE FROM WITHIN THE DARWINIA EDITOR. The editor does NOT preserve comments, so all your commented-out lines will disappear. You can enter the editor to look at stuff -- to get building IDs -- but never save until you have removed all the comment hash marks from the lines you want to preserve.

Good Luck!

Return to “Mod Projects”

Who is online

Users browsing this forum: No registered users and 5 guests