Yesterday, I saw that there is a GPL-fork of GzDoom now, which I really like. So I wanted to try it out on my Ubuntu 16.04 box. However, the SDL port is broken, and the Git maintainer redirected me here. First graphics card info (as needed here)
OpenGL Information (from glmark2)
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce GT 630/PCIe/SSE2
GL_VERSION: 4.5.0 NVIDIA 364.19
Now, the bug:
Thread 1 "gzdoom" received signal SIGSEGV, Segmentation fault.
0x000000000071708c in FGLRenderer::RenderView (this=0x0, player=0x1087140 )
at src/gl/scene/gl_scene.cpp:905
905 gl_RenderState.SetVertexBuffer(mVBO);
Stuff from valgrind, with backtraces:
==4949== Invalid read of size 8
==4949== at 0x71704A: FGLRenderer::RenderView(player_t) (gl_scene.cpp:897)
==4949== by 0x71823F: FGLInterface::RenderView(player_t) (gl_scene.cpp:1292)
==4949== by 0x7847D8: D_Display() (d_main.cpp:771)
==4949== by 0x78533C: D_DoomLoop() (d_main.cpp:1014)
==4949== by 0x789383: D_DoomMain() (d_main.cpp:2643)
==4949== by 0x5B4EF6: main (i_main.cpp:317)
==4949== Address 0x12822d10 is 16 bytes inside a block of size 120 free'd
==4949== at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4949== by 0x86BB0A8: XFree (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==4949== by 0x869BA1A: XFreeEventData (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==4949== by 0x5AA06AF: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.4.0)
==4949== by 0x5AA1907: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.4.0)
==4949== by 0x5A322E6: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.4.0)
==4949== by 0x5A32334: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.4.0)
==4949== by 0x5B1E8A: I_GetEvent() (i_input.cpp:467)
==4949== by 0x5B1EDE: I_StartTic() (i_input.cpp:481)
==4949== by 0x78D37D: NetUpdate() (d_net.cpp:978)
==4949== by 0x78F407: TryRunTics() (d_net.cpp:1834)
==4949== by 0x785332: D_DoomLoop() (d_main.cpp:1010)
==4949== Block was alloc'd at
==4949== at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4949== by 0xAF428F9: ??? (in /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0)
==4949== by 0x86BAEB4: _XEnq (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==4949== by 0x86B7B7E: ??? (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==4949== by 0x86B8554: _XEventsQueued (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==4949== by 0x8699E49: XFlush (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==4949== by 0x5AA17C1: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.4.0)
==4949== by 0x5A322E6: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.4.0)
==4949== by 0x5A32334: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.4.0)
==4949== by 0x5B1E8A: I_GetEvent() (i_input.cpp:467)
==4949== by 0x5B1EDE: I_StartTic() (i_input.cpp:481)
==4949== by 0x78D37D: NetUpdate() (d_net.cpp:978)
==4949==
==4949== Invalid write of size 8
==4949== at 0x717085: FGLRenderer::RenderView(player_t) (gl_scene.cpp:902)
==4949== by 0x71823F: FGLInterface::RenderView(player_t) (gl_scene.cpp:1292)
==4949== by 0x7847D8: D_Display() (d_main.cpp:771)
==4949== by 0x78533C: D_DoomLoop() (d_main.cpp:1014)
==4949== by 0x789383: D_DoomMain() (d_main.cpp:2643)
==4949== by 0x5B4EF6: main (i_main.cpp:317)
==4949== Address 0x12822d10 is 16 bytes inside a block of size 120 free'd
==4949== at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4949== by 0x86BB0A8: XFree (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==4949== by 0x869BA1A: XFreeEventData (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==4949== by 0x5AA06AF: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.4.0)
==4949== by 0x5AA1907: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.4.0)
==4949== by 0x5A322E6: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.4.0)
==4949== by 0x5A32334: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.4.0)
==4949== by 0x5B1E8A: I_GetEvent() (i_input.cpp:467)
==4949== by 0x5B1EDE: I_StartTic() (i_input.cpp:481)
==4949== by 0x78D37D: NetUpdate() (d_net.cpp:978)
==4949== by 0x78F407: TryRunTics() (d_net.cpp:1834)
==4949== by 0x785332: D_DoomLoop() (d_main.cpp:1010)
==4949== Block was alloc'd at
==4949== at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4949== by 0xAF428F9: ??? (in /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0)
==4949== by 0x86BAEB4: _XEnq (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==4949== by 0x86B7B7E: ??? (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==4949== by 0x86B8554: _XEventsQueued (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==4949== by 0x8699E49: XFlush (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==4949== by 0x5AA17C1: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.4.0)
==4949== by 0x5A322E6: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.4.0)
==4949== by 0x5A32334: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.4.0)
==4949== by 0x5B1E8A: I_GetEvent() (i_input.cpp:467)
==4949== by 0x5B1EDE: I_StartTic() (i_input.cpp:481)
==4949== by 0x78D37D: NetUpdate() (d_net.cpp:978)
==4949==
==4949== Invalid read of size 8
==4949== at 0x71708C: FGLRenderer::RenderView(player_t) (gl_scene.cpp:905)
==4949== by 0x71823F: FGLInterface::RenderView(player_t) (gl_scene.cpp:1292)
==4949== by 0x7847D8: D_Display() (d_main.cpp:771)
==4949== by 0x78533C: D_DoomLoop() (d_main.cpp:1014)
==4949== by 0x789383: D_DoomMain() (d_main.cpp:2643)
==4949== by 0x5B4EF6: main (i_main.cpp:317)
==4949== Address 0xc0 is not stack'd, malloc'd or (recently) free'd
Stepping through the code, it appears that the global variable GLRenderer is never initialized on SDL.
SDL port broken
Moderator: Graf Zahl
-
- Developer
- Posts: 197
- Joined: Sun Nov 29, 2009 16:36
Re: SDL port broken
You didn't mention how did you get the crash. Can you elaborate? Does it happen only with the gzdoom gpl fork?
-
- Posts: 152
- Joined: Tue Oct 25, 2011 13:05
Re: SDL port broken
Also, does it happen with older builds? because it may be something like here where everything crashes after the commit aeb7df0
-
- Posts: 64
- Joined: Fri May 15, 2009 17:21
Re: SDL port broken
What I did. Start GZDoom, any IWAD seems broken. Then, there is no menu. Start a new game anyways [esc enter enter for doom 2]. SIGSEGV. I you speak about "Added hardware gamma option and improved window handling on Windows" commit, I also tried the GZGPL1.0. And it has the same issue. Can somebody tell where this variable is supposed to get initialized? Maybe it is just forgotten.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
Re: SDL port broken
Please test with real GZDoom, not GZGPL. First thing we need to confirm is whether the bug is in GZDoom or only in GZGPL. If this error was a common occurence we'd have heard of it already and this is a first.
Also, post the entire startup log, maybe it contains something. Keep in mind that GZGPL does not have a software renderer anymore and therefore possible failure cases it may not consider possible and which are not present in full GZDoom.
Also, post the entire startup log, maybe it contains something. Keep in mind that GZGPL does not have a software renderer anymore and therefore possible failure cases it may not consider possible and which are not present in full GZDoom.
-
- Posts: 64
- Joined: Fri May 15, 2009 17:21
Re: SDL port broken
That is why I suspected it is a GZGPL thing only, and reported the issue accordingly... I should give the full GZDoom a try.Graf Zahl wrote:Keep in mind that GZGPL does not have a software renderer anymore and therefore possible failure cases it may not consider possible and which are not present in full GZDoom.
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: SDL port broken
Please try to build Graf Zahl's GZDoom (from https://github.com/coelckers/gzdoom) and let us know if you're still having problems. If something needs to be fixed in GZGPL, I'm going to need some help because I have no idea what to do about it.
-
- Posts: 64
- Joined: Fri May 15, 2009 17:21
Re: SDL port broken
The official GZDoom (latest master) works. From the startup log, it is easy to see that the renderer is never started in the GPL version.
- Attachments
-
- startup_gpl.txt
- GPL version
- (1.21 KiB) Downloaded 49 times
-
- startup_official.txt
- Graf's version
- (9.31 KiB) Downloaded 53 times
-
- Posts: 64
- Joined: Fri May 15, 2009 17:21
Re: SDL port broken
Now, there is a pull request that fixes the issue
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: SDL port broken
Thanks for the fix. Those lines were commented out in LavenderMoon's work too, which was what GZGPL was based off of. And since I'm on Windows and never needed to use SDL, this problem didn't exist for me. Anyway, thanks again!