[r1280M] Crash: Segmentation fault when closing

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
User avatar
Saya-chan
Posts: 10
Joined: Mon Dec 26, 2011 16:48
Location: Vigo, Galicia
Contact:

[r1280M] Crash: Segmentation fault when closing

Post by Saya-chan »

I recently built GZDoom on my 64-bit Arch, and I seem to be getting a segmentation fault every time I quit. This doesn't seem to happen in ZDoom, though.

I ran gdb and attached it to a running instance of the program, I got these two lines on exiting gzdoom:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
0x00007fcaacc41603 in SDL_JoystickClose () from /usr/lib/libSDL-1.2.so.0
Someone at #ZDoom suggested re-running with -nojoy, but it gives the same result.

This could seem unimportant if not for the fact that it prevents configurations from being saved.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: [r1280M] Crash: Segmentation fault when closing

Post by Gez »

The problem happens in SDL code, meaning that this is not going to be possible to investigate from Windows...
User avatar
Saya-chan
Posts: 10
Joined: Mon Dec 26, 2011 16:48
Location: Vigo, Galicia
Contact:

Re: [r1280M] Crash: Segmentation fault when closing

Post by Saya-chan »

If this could be of any help, doing some investigation I found out this is caused by calling SDL_JoystickClose() after SDL_Quit(), instead of doing it the other way around.
User avatar
Saya-chan
Posts: 10
Joined: Mon Dec 26, 2011 16:48
Location: Vigo, Galicia
Contact:

Re: [r1280M] Crash: Segmentation fault when closing

Post by Saya-chan »

I have traced down the problem. In sdl/sdlglvideo.cpp, the destructor function for SDLGLVideo calls SDL_Quit(), unlike the software one, whose destructor function doesn't do that call and thus, doesn't cause any problems.

GL

Code: Select all

SDLGLVideo::~SDLGLVideo ()
{
	if (GLRenderer != NULL) GLRenderer->FlushTextures();
	SDL_Quit( );
}
Software

Code: Select all

SDLVideo::~SDLVideo ()
{
}
I suppose only the texture flushing should be left untouched :/
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: [r1280M] Crash: Segmentation fault when closing

Post by Gez »

Thanks.
Locked

Return to “Closed Bugs”