Skip to content
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

dhewm3 1.5.2rc1 segfaults when loading Resurrection of Evil #458

Closed
amak79 opened this issue May 23, 2022 · 3 comments
Closed

dhewm3 1.5.2rc1 segfaults when loading Resurrection of Evil #458

amak79 opened this issue May 23, 2022 · 3 comments

Comments

@amak79
Copy link

amak79 commented May 23, 2022

I have dhewm3 1.5.2rc1 installed via Flatpak. When I attempt to load Resurrection of Evil via the main menu (Mods->d3xp->Load Mod) I get a segfault. This doesn't occur with 1.5.1. However, I can run Resurrection of Evil directly with flatpak run org.dhewm3.Dhewm3 +set fs_game d3xp.

dhewm3-1.5.2rc1.log

DanielGibson added a commit that referenced this issue May 24, 2022
The assertion that triggered was "assert(iconvDesc == (SDL_iconv_t)-1);"
in Sys_InitInput() - because when loading a mod the window is recreated,
calling Com_ReloadEngine_f() -> idCommonLocal::InitGame()
 -> idCommonLocal::InitRenderSystem() -> idCommonLocal::InitOpenGL()
 -> R_InitOpenGL() -> Sys_InitInput()

Before that Com_ReloadEngine_f() calls commonLocal.ShutdownGame( true );
which calls the equivalent Shutdown() functions - except so far no one
called Sys_ShutdownInput() (which closes iconvDesc and resets it to -1).
Fixed that by making idRenderSystemLocal::ShutdownOpenGL() call it.
@DanielGibson
Copy link
Member

I just pushed a fix for this, can you test if it works for you?

@amak79
Copy link
Author

amak79 commented May 24, 2022

I'll need to ping the Flatpak maintainer to push a new test build. I'll report back once I test it.

@amak79
Copy link
Author

amak79 commented May 25, 2022

I can confirm that the fix works. Thank you very much.

I was also going to mention the Lost Mission loading issue but you have already explained why it doesn't work over in the Flatpak mod support issue. This has been fixed.

rorgoroth pushed a commit to rorgoroth/dhewm3 that referenced this issue Apr 8, 2023
The assertion that triggered was "assert(iconvDesc == (SDL_iconv_t)-1);"
in Sys_InitInput() - because when loading a mod the window is recreated,
calling Com_ReloadEngine_f() -> idCommonLocal::InitGame()
 -> idCommonLocal::InitRenderSystem() -> idCommonLocal::InitOpenGL()
 -> R_InitOpenGL() -> Sys_InitInput()

Before that Com_ReloadEngine_f() calls commonLocal.ShutdownGame( true );
which calls the equivalent Shutdown() functions - except so far no one
called Sys_ShutdownInput() (which closes iconvDesc and resets it to -1).
Fixed that by making idRenderSystemLocal::ShutdownOpenGL() call it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants