Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Trivial Psychic on November 15, 2006, 05:24:22 am

Title: The Debug-to-English Thread
Post by: Trivial Psychic on November 15, 2006, 05:24:22 am
Also known as "what the hell does this debug message mean" thread.  Pretty much as advertised, I'd like to know what these messages mean:

Associated with placing a specific non-:V: model on the grid (CVS 2006/11/13 or older).

Assert: (header.pixel_depth == 16) || (header.pixel_depth == 24) || (header.pixel_depth == 32)
File: c:\fs2_open\code\tgautils\tgautils.cpp
Line: 558
[This filename points to the location of a file on the computer that built this executable]

... followed by:

Assert: be->handle == handle
File: c:\fs2_open\code\bmpman\bmpman.cpp
Line: 2650
[This filename points to the location of a file on the computer that built this executable]

Anyone (say, a coder) can translate this?

Anybody else, feel free to use this thread to post your own unknown debug error messages.


Title: Re: The Debug-to-English Thread
Post by: Bobboau on November 15, 2006, 05:33:07 am
one of it's tga textures is fubar?
Title: Re: The Debug-to-English Thread
Post by: karajorma on November 15, 2006, 05:35:12 am
I'd assume just from looking at it that your model has a TGA texture that is of a colour depth other than 16, 24 or 32 bit.

Take a look at the file info for them in photoshop or whatever you use.
Title: Re: The Debug-to-English Thread
Post by: FUBAR-BDHR on November 15, 2006, 12:33:59 pm
one of it's tga textures is fubar?

When did I become a tga texture?  :D
Title: Re: The Debug-to-English Thread
Post by: Trivial Psychic on November 16, 2006, 08:51:35 pm
Well, I couldn't see any obvious errors to the 2 tga textures on the models in question, but re-saving them as DDS caused the error messages to go away.  I also had some spline path errors, but I know how to fix those, and a couldn't open XXX texture, but it was a nameplate texture, so I just changed it to "invisible" in the pof.

Since no one else is using this thread for other debug error messages, maybe someone can give me a comprehensive explanation for the:

"X many normals caped to zero"

... error message.
Title: Re: The Debug-to-English Thread
Post by: taylor on November 16, 2006, 09:10:56 pm
Since no one else is using this thread for other debug error messages, maybe someone can give me a comprehensive explanation for the:

"X many normals caped to zero"

... error message.
Happens when it hits this:
Code: [Select]
int check_values(vec3d *N)
{
    // Values equal to -1.#IND0
    if((N->xyz.x * N->xyz.x) < 0 ||
       (N->xyz.y * N->xyz.y) < 0 ||
       (N->xyz.z * N->xyz.z) < 0 ||
       !is_valid_vec(N))
    {
        N->xyz.x = 1;
        N->xyz.y = 0;
        N->xyz.z = 0;
        return 1;
    }

    return 0;
}
So, if "X*X < 0" or "Y*Y < 0" or "X*X < 0" or any of "X|Y|Z == NaN" then it will fail the check and return an error for that normal (after setting the normal to a sane value)
Title: Re: The Debug-to-English Thread
Post by: Trivial Psychic on November 16, 2006, 09:24:34 pm
So its a problem with the creation of the model, not with anything post-POFing, so its out of my hands as far as fixing.  Its not realy anything serious is it?
Title: Re: The Debug-to-English Thread
Post by: Vasudan Admiral on November 17, 2006, 02:29:14 am
The seriousness of the error seems to depend on how bad/where the error is. Of all the model related errors I've encountered, this one was the hardest to find ever, but an easy fix once the problem area was located.

When I got it on one of my models, I think I eventually tracked it down to a few connected polygons that had become tangled and twisted - in my case it was the polygons forming the HUD of Nico's cockpit.

I'm still not entirely sure of the effect this particular error would have on a model in-game though. Ie, would it result in a bogus part on a collision mesh? A problematic, inverted or missing part of the rendered geometry? Bad per-vertex lighting problems? No visible effect at all?