The 3rd Age

Helm's Deep Last Hope

Helm's Deep Last Hope

The ultimate map mod

Button for The 3rd AgeButton for The Dwarf HoldsButton for The Elven AllianceButton for Helm's Deep Last HopeButton for GothmogtheOrcButton for BFME+Button for The Four AgesButton for HDR HeadquartersButton for Middle Earth CenterButton for Project Perfect Mod

Become an affiliate!

   

Quick Lists

Top Rated Popular New Updated Last Comments Users

Register and log in to move these advertisements down

Advanced Debugging

Tutorial for Battle for Middle-earth BFME, Battle for Middle-earth II BFME 2, Battle for Middle-earth II: Rise of the Witch-king ROTWK

Avatar of ched

ched

Category: Code
Level: Expert
Created: Monday June 11, 2007 - 15:25
Updated: Sunday June 17, 2007 - 13:29
Views: 6056
Summary: Debug these errors that the engine does not report

Rating

Staff says

3.6

Members say

4.0

Average

3.7/5.0

6 votes

Page 1 2 3 4
First, let's see about game.dat errors.



Introduction

I'll focus on finding out why you are getting game.dat errors in this part.
Do not be mistaken, we will not learn how to handle regular errors, such as the one below. You're knowledgeable enough to know how to fix them.

Error popup
User image


What we'll focus on is how to fix the "big" errors, the ones that do not come with a report (screenshot of one pending).

There are two types of game.dat errors. The ones that popup before the actual game starts, and ones that appear at some point in the game.




game.dat errors: on boot-up

These are arguably THE most annoying thing about BfME Modding, with WorldBuilder bringing some good competition.

Unpack your INI out of your .big file, and launch it using a -mod command on your directory. Loading the INI should suffice, as the rest isn't checked before you are ingame. Also, I'd advise using a -win argument to load the game in Windowed mode (efficient if your resolution is superior to that of the game), and thus be able to work alongside.

Launch Process Monitor, which you should have installed in page 2, and start logging the events.
Now launch the game, and wait calmly for it to crash. When it crashes, stop logging the events in Process Monitor, and apply the filters described on page 2 if you haven't done so yet.
Now, that looks like a mess huh ? Skip directly to the INI files, and try to see which one is loaded last. That's the problematic file.

If you're lucky, it won't be an object file, linked to a thousand others and thus taking hours to check.
If one of your object crashes, try to go ingame with him, and see if he happens to crash somewhere. If you get a game.dat with him, refer to the paragraph below.




game.dat errors: ingame


We've all seen one of these pop up in our experience. You're sitting in front of your screen, having fun with your newly coded objects, and all of a sudden, the game stops, and you get an error message, cryptically pointing to some offsets.

Your first reaction is most likely "0x324c97 ? Thanks, I'll go look that up >_<".
This tutorial will hopefully help you solve this problem.

Play the game again, and as painful as it may be, try to recreate the problem.
Does it happen when your new shiny hero spawns ? Or perhaps when you select him ?
Once you have narrowed down the cause, check your coding, and ask us for help if need be :)



Note that there are a few known causes which we have tried to gather in one article, entitled "Known game.dat errors". You will find a link at the end of the document, in the references.





Best of luck with finding & fixing your errors :)

Links / Downloads

 HitsAdded
Load Sequence for WB - Process Monitor Log1097June 17, 2007 - 13:29
Known game.dat errors1429June 14, 2007 - 14:10
Process Monitor1447June 11, 2007 - 15:27
WinMerge1280June 11, 2007 - 15:27

Comments

Display order: Newest first

halbarad - Saturday August 11, 2007 - 8:09

wise words indeed,

though it may be worth mentioning that sometimes the best (or only) way of debugging is to brute-force it: to slowly change back all the last things you edited until the game works again, not nice but sometimes necessary (is currently having to do it)

Sulherokhh (Team Chamber Member) - Thursday August 9, 2007 - 3:34

Heroes. All of you. :D
Thank you for writing it down.

Go to top

 

"One site to rule them all, one site to find them,
one site to host them all, and on the network bind them."

 
6:50:41