forked from JACoders/OpenJK
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Crash when loading hdr lightmaps #59
Comments
SomaZ
added a commit
that referenced
this issue
Mar 7, 2024
Meh, forgot to co-author you. Sorry about that. Hope that's ok. |
taysta
pushed a commit
to taysta/TaystJK
that referenced
this issue
Mar 11, 2024
taysta
added a commit
to taysta/TaystJK
that referenced
this issue
Mar 11, 2024
* [rend2] Reset output in R_LoadHDRImage Fixes SomaZ#59 --------- Co-authored-by: SomaZ <17459161+SomaZ@users.noreply.github.com>
SomaZ
added a commit
that referenced
this issue
Mar 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's quite weird. I get this crash when loading my baked lighting on laptop. It doesn't happen on desktop PC (why??) and doesn't happen on laptop with lighting baked by SomaZ (for t1_rail). The crash happens when it tries to load non-existing sky texture, but I didn't dig deeper. Anyway, solution is quite simple.
R_FindImageFile function in tr_image.cpp tries to load HDR image and then checks if it succeed by testing output buffer:
The problem is, R_LoadHDRImage doesn't reset buffer to NULL if it failed.
So, in shared/rd-rend2/tr_image_stb.cpp need to add three lines:
The text was updated successfully, but these errors were encountered: