Solving D2Client\Engine\GfxUtil.cpp, line #1437 errors

This is the place to discuss all issues relating to the manipulation of graphics/animations, sounds, music and cinematics within Diablo 2.

Moderators: Nefarius, Necrolis

Post Reply
User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Solving D2Client\Engine\GfxUtil.cpp, line #1437 errors

Post by Nefarius » Thu Aug 11, 2005 2:45 am

Because of how tricky these errors are, I think the knowledge about how to solve them should be centralized somewhere.

I will post my personal approaches:



First of all, in the ideal case, the "essence of all evil" will show up in the debug file:

Either as -

Code: Select all

(ptCelContext->dwCel < ptGfxBlock->bNumCelsPerDir)
Couldn't get cel handle in for:(null)  TYPE:1  CLASS:293  MODE:2  FILE:C:\projects\D2\head\Diablo2\Source\D2CMP\Src\SpriteCache.cpp  LINE:1833
The above contains all the data you need:
Type: 1 (Monster)
Class: 293 (hcIdx 293 in MonStats.txt)
Mode: 2 (NU)

1=DT
2=NU
3=WL
4=GH
5=A1
6=A2
7=BL
8=SC
9=S1
10=S2
11=S3
12=S4
13=DD
14=KB [same as GH mode anim]
15=SQ [global mode for sequences]
16=RN

Note that this usually appears ABOVE the Assertion message, it is not part of the dump.

Actually, the animations it dumps out are only very rarely the reason for the crash, it simply dumps out the last animation passed on to the function, the crash however appears to occur when it reaches the frame where the layer-data becomes messed up, and this is seldom frame 1. This is the prime reason why 90% of the time the crashdump includes the animation your char was in at the moment of the crash...



Now, there are several common reasons why this occurs:

You should at all cost replace a1-7cmncof.d2 files with dummies. All 7 dummies only require this content.

Code: Select all

FF FF FF FF 00 00 00 00 2E 00 00 00 78 78 78 78 78 78 78 00 FF FF FF FF 01 01 08 14 01 F0 FD 7F
6F FF FF FF 6B 00 00 00 D0 FF FF FF 40 00 00 00 00 01 00 00 01 01 01 00 00 68 74 68 00 00 01 01
01 01 01 01 01 01 FF FF FF FF 00 00 00 00 B5 00 00 00 78 78 78 78 78 78 78 00 FF FF FF FF 01 10
08 14 00 00 13 00 3C FF FF FF 7D 00 00 00 46 FF FF FF 3E 00 00 00 00 01 00 00 01 01 01 00 00 68
74 68 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
Note that these files won't cause problems if you add new tokens 99% of the time, albeit they do contain animation data for tokens that don't exist... So getting rid of them is a good idea always.

I don't know for sure, but I think the game uses this to check the COF files and in case it is different from the cached one in the *.d2 file the later will be used, thus resulting in a crash.



The next approach is to check whenever the monster causing the problem has all the modes required for the skill, also it is important to check whenever all these modes have COF and animdata entries! Some monsters have unused modes (A2 on wraiths for example), many of them however lack appropriate entries in animdata.d2.


If the crash still wasen't solved, there are still a bunch of things that can cause this:

First of, bad animation data: Such as one direction being shorter then the others (16x8 monster with one direction only lasting 15 frames...)

Also, having wrong layering data in the COF files very often causes this, this is why you enter generate the COF files or write them from scratch, using existing ones from monsters can lead to problems (for example if you use an animation from a multilayer monster the game will crash while it tries to arrange the graphic on screen AFAIK).

The best way to check how many layers a cof file has is to look at the first byte, if this byte is 01 then the cof file has only TR.

Code: Select all

01 10 08 14 00 FF 00 00 00 FE FF FF 00 02 00 00 00 FE FF FF 00 02 00 00 00 01 00 00 01 01 01 00 00 68 74 68 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
Looks fine at first, however, a single byte here will cause the game to cough up an assertion:

Code: Select all

01 10 08 14 00 FF 00 00 00 FE FF FF 00 02 00 00 00 FE FF FF 00 02 00 00 00 01 00 00 01 01 01 00 00 68 74 68 00 [color=red]00[/color] 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
In the above COF, this small byte was missing.


Finally, a skill-sequence can also result in a crash, if so, change the entry to use a static animation like S1 or S2, or add a new sequence to monseq.txt.



I hope this post has been helpful to those out there who struggle with this forsaken little crash.
Last edited by Nefarius on Tue Sep 06, 2005 10:47 pm, edited 5 times in total.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
I_only_pressed_Esc
Forum Regular
Angel
Posts: 630
Joined: Wed Jan 28, 2004 2:47 am
Location: In the darkest corners of your mind

Re: Solving D2Client\Engine\GfxUtil.cpp, line #1437 errors

Post by I_only_pressed_Esc » Tue Sep 06, 2005 10:24 pm

I think you shoud append this to the sticky "Animation error list" as this quite informative and I never got to grips with this error :)
Custom health-mana bubbles. Custom loading video's. Custom Hireling graphics.
'Do what thou wilt shall be the whole of the Law'

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Re: Solving D2Client\Engine\GfxUtil.cpp, line #1437 errors

Post by Nefarius » Tue Sep 06, 2005 10:52 pm

Just made it sticky by itself.
I never got to grips with this error
You're not alone, my post may be informative, but I dread this one as much as anyone else does ;)
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
talonrage
Retired staff
Arch-Angel
Posts: 1511
Joined: Sat Jul 20, 2002 11:05 pm

Re: Solving D2Client\Engine\GfxUtil.cpp, line #1437 errors

Post by talonrage » Sun Jul 16, 2006 3:17 am

I've encountered a "wierd" ptGfxBlock->bNumCelsPerDir error

Type: 0
Class: 0
Mode: 18
Line: 1833

The above error was listed in the d2log, but I didnt notice any crashes or problems. Any ideas what this could be?

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Re: Solving D2Client\Engine\GfxUtil.cpp, line #1437 errors

Post by Nefarius » Sun Jul 16, 2006 3:06 pm

Looks like something with Amazon skill sequence (type 0 = char, class 0 = ama, mode 18 = sequence)
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
talonrage
Retired staff
Arch-Angel
Posts: 1511
Joined: Sat Jul 20, 2002 11:05 pm

Re: Solving D2Client\Engine\GfxUtil.cpp, line #1437 errors

Post by talonrage » Sun Jul 16, 2006 11:38 pm

That makes sence, as I was playing an Amazon at the time I got the error. I was testing a new skill as well. And I havent seen it since fixing the skill. Thanks for the insight :) .

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Re: Solving D2Client\Engine\GfxUtil.cpp, line #1437 errors

Post by Nefarius » Tue Aug 22, 2006 4:18 pm

A new cause for this error. GH (Get Hit) anims must be longer then 4 frames (5+ duh), the game expects at least 5 frames, if it is less, it'll flash and thus have a chance to lead to this crash.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Paul Siramy
Retired staff
Principality
Posts: 2828
Joined: Sat May 25, 2002 2:39 pm
Location: La Garenne Colombes (near Paris)
Contact:

Hand-picked

Re: Solving D2Client\Engine\GfxUtil.cpp, line #1437 errors

Post by Paul Siramy » Tue Aug 22, 2006 9:27 pm

It expects at least 5 frames in the DCC, or... does a DCC with 1 frame only but with a *duration* (anim speed set to very slow) of 5 frames work ?

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Re: Solving D2Client\Engine\GfxUtil.cpp, line #1437 errors

Post by Nefarius » Tue Aug 22, 2006 9:49 pm

I forgot to edit the above post. It depends on the AI used. Some AIs have specific number of frames for specific purposes. Like the Batdemon, which will crop away too many frames if it's S2, S3 and S4 anims are too long, if they are too short it will likely flash/crash too.

I fixed the above problem I had by using another AI.
Last edited by Nefarius on Tue Aug 22, 2006 9:50 pm, edited 1 time in total.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
brappy
Forum Regular
Angel
Posts: 658
Joined: Fri Oct 28, 2005 11:27 pm
Location: Oswego, NY
Contact:

Post by brappy » Mon Mar 12, 2007 11:29 pm

I've encountered a strange error related to this...

Couldn't get cel handle in for:null TYPE:3 CLASS:944 MODE:0

It happens when I open the portal to Tristram. I have edited Tristram, but I'm not sure if it is related to that. I have no idea what may have caused this, my best guess is the portal missile plugin, but I haven't seen anyone complaining about that, so...

Edit: removing clt/srvdofuncs from the cairnstones missiles causes the error to go away, and the portal still appears. I'd still like to know what this error means, though.
Last edited by brappy on Mon Mar 12, 2007 11:36 pm, edited 1 time in total.
Currently working on Tricet of Apocalypse (Latest patch: Beta 0.9) | Mod thread
A=B, A²=AB, A²-B²=AB-B², (A+B)(A-B)=B(A-B), A+B=B, A+A=A, 2A=A, 2=1

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Re: Solving D2Client\Engine\GfxUtil.cpp, line #1437 errors

Post by Nefarius » Tue Mar 13, 2007 9:03 am

Thats pretty weird, how many missiles do you have in missiles.txt? Since that error refers to MISSILE #944.

Just for everyone here to know:
0 = player, 1 = monster, 2 = object, 3 = missile, 4 = item, 5 = tile
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
brappy
Forum Regular
Angel
Posts: 658
Joined: Fri Oct 28, 2005 11:27 pm
Location: Oswego, NY
Contact:

Post by brappy » Wed Mar 14, 2007 1:15 pm

Missile 944 has nothing to do with the cairn stones. It's for a spell.
Currently working on Tricet of Apocalypse (Latest patch: Beta 0.9) | Mod thread
A=B, A²=AB, A²-B²=AB-B², (A+B)(A-B)=B(A-B), A+B=B, A+A=A, 2A=A, 2=1

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Re: Solving D2Client\Engine\GfxUtil.cpp, line #1437 errors

Post by Nefarius » Wed Mar 14, 2007 2:55 pm

You probably got that linked to the crainstones in someway (typo, Id mixup, reuse of a 'unused' missile that wasen't really unused, etc), as the log doesn't lie ;)
Last edited by Nefarius on Wed Mar 14, 2007 2:56 pm, edited 1 time in total.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

Danlem
Posts: 5
Joined: Fri Oct 26, 2018 7:07 pm
Russia

Re: Solving D2Client\Engine\GfxUtil.cpp, line #1437 errors

Post by Danlem » Sun Jan 13, 2019 3:57 pm

hello, i have error
17:32:51.235 (ptCelContext->dwCel < ptGfxBlock->bNumCelsPerDir)
17:32:51.235 Couldn't get cel handle in for:null TYPE:3 CLASS:691 MODE:3 FILE:C:\projects\D2\head\Diablo2\Source\D2CMP\Src\SpriteCache.cpp LINE:1833

User avatar
Necrolis
Site Admin
Throne
Posts: 8987
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: Solving D2Client\Engine\GfxUtil.cpp, line #1437 errors

Post by Necrolis » Sun Jan 13, 2019 5:09 pm

Danlem wrote:
Sun Jan 13, 2019 3:57 pm
hello, i have error
17:32:51.235 (ptCelContext->dwCel < ptGfxBlock->bNumCelsPerDir)
17:32:51.235 Couldn't get cel handle in for:null TYPE:3 CLASS:691 MODE:3 FILE:C:\projects\D2\head\Diablo2\Source\D2CMP\Src\SpriteCache.cpp LINE:1833
The first post literally tells you how to decode this error... And necromancing an 11 year old post to on top of that. Consider this an official warning; read before you post something; if language is an issues ask on Discord in your native tongue.
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

Post Reply

Return to “Multimedia”