-
-
Notifications
You must be signed in to change notification settings - Fork 537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rare SIGSEGV caught #473
Comments
Looks like s is a NaN, and is then being normalised and cast to an int (ugh) to use as a table lookup. As soon as s is a NaN all bets are off. I can't see any obvious path by which s (or t) become NaNs in R_FogFactor, indeed given the value of t, s should be 0. This suggests it's already a NaN when passed in. Long story short, it looks like RB_CalcFogTexCoords is the source, but knowing exactly where and why is harder. It could be that a particular map or scene within a map (involving fog) is responsible. |
I don't have the specific line handy on mobile, but in OpenJK we fixed this by checking nan on s and t in calc fog texcoords function which is called in the chain above (and use 0 instead) but apparently it is inlined out to not be listed in the backtrace. EDIT Got lines on PC: |
I mean, I guess that stops it happening, but it doesn't actually address the cause. |
I don't think you can stop it. It's likely map related. |
Right, but the origin of the NaN is likely to be much further up the food chain where it's potentially causing other obscure and hard to track bugs. It would be better to find where this. My bet would be somewhere in tr.world->fogs. |
This thing has been puzzling me for a long time, on a simple map with a bunch of mapobjects and whatnot I'd very rarely get a SIGSEGV on ioquake3 client, on Linux 64, running native cgame / ref / ui, with ref DL on.
It literally happened once a month at most and today I managed to get a backtrace.
Maybe it will be of some use to someone who groks the ioq3 renderer (hint: not me).
The text was updated successfully, but these errors were encountered: