There IS actually a debug mode

I never thought that this game doesn't have one. That's why crashes dumped to Event Viewer show the same error code that pointed to the game executable itself: 0x80000003.

So I searched yesterday and today about "how to enable debug mode in battlefield 2", and this link is making me go through shortcut editing to insert additional commands before running the game. Next to a "+modpack blahblahblah" command line, there's something more that can help me do "stack traceback", figuring out what's wrong after doing sh*tty modifications on almost whole things for my own SP experience, if I ever be able to figure out how to fix the AI that randomly crashes the game (unfortunately, Google Search provides limited results on what I want).

Unfortunately, debugging is only possible (with an addition of output logs to show which object is conflicting, which geometry is missing, or which texture is missing) if you install BF2Editor and run BF2_r.exe from the Battlefield 2 game directory. The command lines for BF2_r.exe also works just like the original executable of Battlefield 2. Here's the ModDB button linked to that editor installation suite below.

Battlefield 2 Editor v1.3

Apparently, a lot of added weapons have changed how the game will read, and this is no joke. I just found 2 or 3 weapons with same item index ID mapped at the same time, and there is one that's really confusing af: US/EU Assault kit that has BFP4F M16A2 assault rifle has a conflict when run in a different platform/modpack such as Anime Mini-mod, otherwise it's running fine in a regular platform/modpack (bf2, just run the game without additional commands). I swear, though, before I found this, I've triple-checked every single lines and weapons data to prevent conflict with the item indexes, and turns out, it probably sourced from continuous editing, or maybe a weapon is already assigned, but for which one, I have no idea.

Debugging is really what I need now, since I have lots and lots of added weapons for my testing in vanilla BF2, making sure that I won't type wrong or something (typo). Turns out, crashes with this "corruption error code" (0x80000003) actually was because of this (a sample I got while testing xpack mod):

D:\DiceCanada\BoosterPack2\Code\BF2\Game\Objects\Game\kit.cpp(187): Debug: Game: checkIfPartExists found:bf4_xm25
D:\DiceCanada\BoosterPack2\Code\BF2\Game\Objects\Game\kit.cpp(101): Assert: Game: (!checkIfPartExists(child, itemIndex)) seal_AT_special Kit error, index conflic. Two or more weapons use the same item index:4 checked KitPart:fgm_javelin_top

I've made changes earlier that a Javelin mod from ModDB was edited its item index for Top-firing version of Javelin to 4, thus, conflicting with XM25 CDTE that was also on the same item index (which is 4 also). I could be finding more sh*t-stained things like this as I mod the game with a wide variety of hand-picked weapons I downloaded at ModDB or Gamebanana, but one thing for sure; I have no idea what went wrong when I play a map mod with US or EU in a game; I'll go check it out with the debugger soon.


To conclude, game that CTDs could be of any reason, but we don't know what reason it could be if we didn't use a debugger to find out. Games in PC are generic applications (executables or EXEs); applications do have a "debug mode" to trace activities such as loading resources and detecting errors. Battlefield 2 is one of them, the one and only (if there is another) moddable Battlefield series of game similar to Grand Theft Auto series and some that support user-generated content loading.

Anyway, I'll be expecting a new update for this blog and YouTube for next week and 2 weeks from now on, so I hope you enjoy this blog post. Don't take it personally if you have heard it, because I don't before this writing was made.

Comments

  1. Glad to see that you were/are still playing battlefield 2. I created the firebird mod which is available on moddb and I found your blog by chance for a unrelated search. Have a great day

    ReplyDelete

Post a Comment