Jump to content


Photo

[BGT] CTD, diagnostic and correction... HTH !

WeiDU.log CTD crash BGT

  • Please log in to reply
5 replies to this topic

#1 Perreim

Perreim
  • Member
  • 2 posts

Posted 12 February 2013 - 08:58 AM

Hi all,

 

I've been experiencing a CTD last week and managed to find what was the cause and solve the problem yesterday.

As I found most of the clues which helped me here on the forums, I wanted to post the details on how I corrected it, hopefully helping anyone experiencing the same problem...

 

This is the first time I'm installing and playing BGI and II with mods so any improvements and advices would be greatly appreciated ! :-)

 

I've installed the following mods and fixes in that order :

 

BG1 with latest patch
BG2 with latest patch
BG2 fixpack 9
BGT 1.15
BG1 Unfinished Business 1.3
BG2 Unfinished Business 1.9
TDD 1.14
Dark Horizon 207
DSotSC 216
Worldmap 9.01
BG2 tweaks 9
Widescreen 3.05

 

Upon entering Wyrm's Crossing when going to Baldur's Gate city in chapter 5, just after the loading of the area the game froze on a black screen forcing me to kill the "bgmain.exe" in windows task manager.

 

Looking in the game directory, I found an empty "Baldur.err" but no further ideas of what was going on...

 

While wandering here on the forum, I red a post from Miloch (here) explaining that the debug should be enabled in order to have details of the problem in the "Baldur.err" file... So I edited my "baldur.ini" and added the required entry :

 

[Program Options]
Logging On=1

 

I restarted BGII and reloaded my save in order to load the failing area and reproduce the freezing black screen, killed the process again and went to the "Baldur.err" file and found the following message :

 

---------------------Start Logging Session---------------------

ASSERTION FAILED!
File: ObjCreature.cpp
Line: 12162

Exp: pCreature != NULL && creatureSize > 0

Msg: no msg.
Run Debugger?

 

With a further search on the forum, I found another post from Miloch (here) explaining that must be an error creating a creature in the area.

 

I downloaded the last version of "NearInfinity" (from here) in order to have a closer look to the games files.

 

I opened the AR0900.ARE (area code of Wyrm's Crossing in Gamebanshee's walkthrough) in order to have a look at it, but the content of the area wasn't at all corresponding with what is supposed to be in the sector (like Umberlee priestess called Tenya and the Flaming Fist Mercenary of the bridge)

 

Remembering that the original files from BGI are imported into the BGII installation by BGT, I looked once again on the forum and found another post (from Miloch again!) giving the area codes for BGT and Tutu (here), giving me the new code for the Wyrm's Crossing area : AR7900.ARE

 

Opening AR7900.ARE in NI, I could not find any clues on each the listed actors of the area which could explain the crash : I opened each actor .CRE file, inventory item .ITM and .SPL with no detected error or problem...

 

I then wondered why the NPC Quayle wasn't displayed in the actor list, as this is the area where I'm supposed to meet him...

 

I searched around the related files of the area and found him in the area script AR7900.BCS file after the following scripts lines :

 

IF
	Global("CmElf900","GLOBAL",0)
THEN
	RESPONSE #100
		CreateCreature("CMELF01",[4033.3285],5) // Jhaeros Auglathla
		CreateCreature("CMELF02",[4119.3252],6) // Ygrainne Windstar
		CreateCreature("CMELF03",[4199.3242],5) // Elven Body Guard
		CreateCreature("CMELF04",[3987.3314],6) // Elven Body Guard
		CreateCreature("CMELF05",[4055.3232],6) // <NO TEXT> - If we can find it and return it to the playhouse, the reward offered by our Stagemistress, Raelis Shai, shall be yours.  Come, then, let us search for it: free money does not come often in the arts.
		SetGlobal("CmElf900","GLOBAL",1)
		Continue()
END

 

As I never encountered theses characters in the original BGI, I decided to have a further look to those .CRE files first, especially the last one "CMELF05" as it had a strange comment next to it

 

Upon opening the CMELF05.CRE file, NI displayed:

 

Error reading CMELF05.CRE
Unsupported version:ÿÿÿÿ

 

As advised in one of the previous post I red, I went into the console to execute the "WeiDU.exe --change-log CMELF05.CRE" command line and I got :

 

Mods affecting CMELF05.CRE:
00000: /* from game biffs */ ~SETUP-DARKHORIZONS.TP2~ 0 0 //  "Dark Horizons" Mod (Requires Tales of the Sword Coast, TuTu or BGT): BGT v207
00001: /* from game biffs */ ~BG2_TWEAKS/SETUP-BG2_TWEAKS.TP2~ 0 1210 // Use BG Walking Speeds (BETA): v9

 

I did a search of the CMELF05.CRE file in the BGII directory and found a saved file in the bg2_tweaks\backup directory.

 

As I could open the saved file using NI, I just knew I had to restore the original file and proceed manually with the changes BG2 tweaks should have done properly to the file.

 

In order to identify the changes I needed to do, I just had to make a few comparisons between the current CMELF04.CRE and the previous saved version of CMELF04.CRE and CMELF05.CRE files, as both .CRE are nearly the same (except a single attribute called "Script name")

 

It was finally easier to delete the corrupted CMELF05.CRE, to duplicate the current CMELF04.CRE, rename it and change the "Script name" Value.

 

I reloaded the game and save, went back to the Wyrm's Crossing... and the area loaded without a single trouble !

 

I'm still wondering how could BG2 tweaks corrupt CMELF05.CRE and neither CMELF04.CRE nor CMELF03.CRE despite them being the same but anyway, many thanks to the modders for their great work (and especially Miloch's posts, very useful in this crash case ! :-) )

 

Perreim


Edited by Perreim, 12 February 2013 - 03:40 PM.

"All that glisters is not gold..." - William Shakespeare, The Merchant of Venice

 

Perreim


#2 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 12 February 2013 - 09:17 AM

Please do a changelog of CMELF05.CRE and attach all files (even the changelog folder here) :)

 

PS: Awesome job on taking the effort to debug btw! :coolthumb: What's the HTH in the title though?

 

PS2: There's a newer verison of BG2Tweaks btw... It fixes a lot of things the old version screws with :P

 

PS3: I had a look at CMELF05.CRE from the DarkHorizons package and it has another difference with the rest of the CMELF0Xs... 05 has a non-standard order of structures in its CRE file (the items block is after the item slots block and some offsets are nulled)

 

That's not a problem for the game engine (it will regard all the CMELFs as identical for all intents and purposes) but when a mod tries to parse the structures to make some change or something... shit hits the fan :lol:

 

The fault would still lie with the corrupter (in this case BG2Tweaks) and not DarkHorizons because it's the one trying to mod the file :P (and I'd guess this is already fixed in BG2Tweaks v10 though)


Edited by Lollorian, 12 February 2013 - 10:48 AM.

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#3 Perreim

Perreim
  • Member
  • 2 posts

Posted 12 February 2013 - 04:21 PM

Thanks for your answer Lollorian :)
 

Please do a changelog of CMELF05.CRE and attach all files (even the changelog folder here) :)

 
Sure ! Here it is : Attached File  change-log-CMELF05.CRE.zip   623K   324 downloads
 
As the manually modified file don't seems to appear in the change-log directory I added an override directory with the corrected file inside.

 

PS: Awesome job on taking the effort to debug btw! :coolthumb: What's the HTH in the title though?

 
Oups, sorry... stands for "Hope This Helps" :)
 

PS2: There's a newer verison of BG2Tweaks btw... It fixes a lot of things the old version screws with :P

 
Nice ! I should have a look at it then ! I suppose it would require me to have a fresh install of the game and restart the story from the beginning... so in a new install hopefully.
 

PS3: I had a look at CMELF05.CRE from the DarkHorizons package and it has another difference with the rest of the CMELF0Xs... 05 has a non-standard order of structures in its CRE file (the items block is after the item slots block and some offsets are nulled)
 
That's not a problem for the game engine (it will regard all the CMELFs as identical for all intents and purposes) but when a mod tries to parse the structures to make some change or something... shit hits the fan :lol:
 
The fault would still lie with the corrupter (in this case BG2Tweaks) and not DarkHorizons because it's the one trying to mod the file :P (and I'd guess this is already fixed in BG2Tweaks v10 though)

 
Hum... This could explain why I could hardly find any differences between them in NI whereas proceeding with an hex comparison gave me plenty differences... but I couldn't figure out why at first glance (didn't looked much though...)

 

 

 

BTW, as I'm pretty new on the forum, I don't know where to post a feedback/report on another crash I had when experimenting my installation a few months ago : I don't know if it is a know issue but it seems that the max CHA of 3 of the Anti-Paladin kit from "TDD character Kits" is conflicting with the "Minimum Stats Cheat" tweak from BG2Tweaks v9, should you install this tweak and define a value superior to 3... Can you suggest me where should I report this issue ?

 

 

Perreim


"All that glisters is not gold..." - William Shakespeare, The Merchant of Venice

 

Perreim


#4 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 12 February 2013 - 09:57 PM

Heh, I thought the HTH was a typo for WTH :P

 

Since BG2Tweaks seems late in your install order, you might actually get away with overwriting the old version with the newer one and then [R]e-installing ;)

You should report whether the new BG2Tweaks corrupts the CRE like the v9... Then we could start looking at your changelog and identifying the component that causes the corruption (and if the v11 does the same thing, fix it :D) - BG Walking speeds

 

Go to View -> Show Hex Offsets in NearInfinity to well... show hex offsets :lol: (they show up in the edit tab of files you open)

 

Report the min stats problem to their forums :cheers: (which should be linked in the mod's readme as well :D)


Edited by Lollorian, 12 February 2013 - 10:07 PM.

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#5 Mike1072

Mike1072
  • Modder
  • 539 posts

Posted 12 February 2013 - 10:52 PM

The fault would still lie with the corrupter (in this case BG2Tweaks) and not DarkHorizons because it's the one trying to mod the file :P
A file could be readable by the game but still broken.

e.g.

Let's say an item has an effects offset that points to the start of the file (an absurd place where effects do not belong). The engine might be perfectly happy with that file if the file so long as it has 0 effects. But when some other mod comes along and tries to add an effect, it inserts it in that absurd location and completely mangles the whole file.

Should the mod have expected the file would contain garbage values?
(and I'd guess this is already fixed in BG2Tweaks v10 though)
It's not listed in the changelog, so I wouldn't bet on it.

#6 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 12 February 2013 - 11:38 PM

Considering that whatever tool the DarkHorizon's author used to create the creature was responsible for the garbage values (assuming they didn't put in the garbage values on purpose :lol:) yes I'd think the onus lies on BG2Tweaks to consider that the file may be borked :) Also considering that DH is not the only mod out of CoM that may use said CRE creation tool :P

 

A check to see if the effect block offset was >= 0x2d4 (the length of the CRE header) before adding in the new effect would prevent this :P (considering that most problems with corruption arise when offsets are nulled - which IIRC affects CMELF05 as well)

 

That also doesn't mean one should simply ignore that the file could be corrupted and skip reporting to DH's author as well though :D (and request him to get a better CRE creating tool :P)

 

I've rearranged to offsets and blocks on my end and will attach the properly ordered CRE later in the day so this specific case doesn't repeat though (and yes, the reordered CRE looks exactly like CMELF04 bar some script names :D)


"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod