luciusDXL / TheForceEngine

Modern "Jedi Engine" replacement supporting Dark Forces, mods, and in the future Outlaws.

Home Page:https://TheForceEngine.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible bug in showing save preview images

Gerwin2k opened this issue · comments

Possible bug in showing save preview images.
Tested with AMD Radeon HD7750 Under Windows 7 x64. Which otherwise renders everything properly in all modes. Both with the official binary and my own build. Problem was not there in may 2023 and earlier.
The game trips over the GL-error check below, whichis also logged. Now I don't know if that error is valid, but at least when I change the code to allow it to continue regardless, it shows the preview images properly.

TFE_RenderBackend\Win32OpenGL\textureGpu.cpp / function TextureGpu::create

if (error != GL_NO_ERROR)
{
	TFE_System::logWrite(LOG_ERROR, "TextureGPU - OpenGL", "Failed to create texture - size: (%u, %u), format: %s.",
	m_width, m_height, c_texFormatStr[format]);
	// GB 2023, have to disable this to get savegame preview images...
	//glBindTexture(GL_TEXTURE_2D, 0);
	//return false;
}

Can you catch this in the debugger and post the error code?

The OpenGL error code should now be written in the error message if using the latest code on master. So if you can post that, I can take a look.

I noticed some very recent commits around this function and its error-handling. I will try them.

As for your request: "Can you catch this in the debugger and post the error code?"
I am not sure how to do so yet, and may not be able to work on this in the coming days...

Also, Thanks a lot for the proper fix of the other issue that I filed: audioPlaySoundFrame / #329

@Gerwin2k Don't worry about the debugger, the error message should now write out the code. So you can get it from there.

Also, Thanks a lot for the proper fix of the other issue that I filed: audioPlaySoundFrame / #329
Thank you for finding the issue. I bet this was the cause of various "random crashes" people have experienced now and then.

Good to hear that.

I just build the latest master source to try. Clicked on "Load" in the initial frontend UI. I notice the save preview images are now showing. So this minor issue is already solved on my end. I then quit the game and saved the log. These logs are attached and the line of interest is quoted below:

[Warning : TextureGPU - OpenGL] Pre-existing OpenGL error: 0x500 when calling TextureGpu::create().

the_force_engine_log_Win7x64.txt
the_force_engine_log_WinXPx86.txt

So its "solved" because the pre-existing error is being cleared out. Which means the real error really never had anything to do with the texture creation. This is most likely due to the shader compilation issue you were talking about before. But regardless, I'm going to close this issue since it is not a save preview bug.