View Issue Details

IDProjectCategoryView StatusLast Update
0000578Gameplay + OpenGL[All Projects] Bugpublic2017-04-14 08:32
ReporterSlaveJobs 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Summary0000578: Warn user the minimun OpenGL version required
DescriptionTrying to run gzdoom on an intel igpu with OpenGL 2.1 results in a segfault without any messages:
$ gzdoom
GZDoom 2.5pre-340-gd407aa3 - 2017-04-13 22:16:26 +0200 - SDL version
Compiled on Apr 14 2017

M_LoadDefaults: Load system defaults.
W_Init: Init WADfiles.
 adding /usr/share/games/doom-data/gzdoom.pk3, 711 lumps
 adding /home/lucas/.config/gzdoom/doom2.wad, 2919 lumps
I_Init: Setting up machine state.
CPU Vendor ID: GenuineIntel
  Name: Intel(R) Core(TM)2 CPU T7600 @ 2.33GHz
  Family 6, Model 15, Stepping 6
  Features: MMX SSE SSE2 SSE3 SSSE3
I_InitSound: Initializing OpenAL
  Opened device No Output
  EFX enabled
V_Init: allocate screen.
S_Init: Setting up sound.
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
script parsing took 220.50 ms
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading custom status bar definition.
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
Using video driver x11


*** Fatal Error ***
!!! Failed to exec debug process
Segmentation fault

The gdb stack indicates a segfault at function CollectExtensions() from gl_interface.cpp:
CollectExtensions () at /var/tmp/portage/games-fps/gzdoom-9999/work/gzdoom-9999/src/gl/system/gl_interface.cpp:55

55	in /var/tmp/portage/games-fps/gzdoom-9999/work/gzdoom-9999/src/gl/system/gl_interface.cpp
(gdb) s
[New Thread 0x7fffe73a5700 (LWP 22734)]
[Thread 0x7fffe6ba4700 (LWP 22733) exited]
56	in /var/tmp/portage/games-fps/gzdoom-9999/work/gzdoom-9999/src/gl/system/gl_interface.cpp
(gdb) s
[Thread 0x7fffe73a5700 (LWP 22734) exited]
[New Thread 0x7fffe73a5700 (LWP 22853)]

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()

Probably because GL_NUM_EXTENSIONS is not defined on OpenGL < 3.0.
TagsNo tags attached.

Relationships

Activities

_mental_

_mental_

2017-04-14 02:47

developer   ~0001349

It crashes because glGetIntegerv is nullptr for some reason.
You can confirm this by setting a breakpoint in gl_load.c at line 2523 and check value of _ptrc_glGetIntegerv variable.

Probably we should query required functions like glLoadGen does and abort with fatal error if they are not available.
SlaveJobs

SlaveJobs

2017-04-14 07:57

reporter   ~0001355

I found this error only because I forgot to compile libsdl2 with opengl support on gentoo.

The game runs fine after that. More than 60 fps on a 3rd gen gpu - Intel Corporation Mobile 945GM/GMS, default settings, OpenGL renderer. Not bad.
Graf Zahl

Graf Zahl

2017-04-14 08:32

administrator   ~0001357

... or just check the return value of ogl_LoadFunctions and abort if it failed...?

Issue History

Date Modified Username Field Change
2017-04-14 00:19 SlaveJobs New Issue
2017-04-14 02:39 _mental_ Description Updated View Revisions
2017-04-14 02:47 _mental_ Note Added: 0001349
2017-04-14 07:57 SlaveJobs Note Added: 0001355
2017-04-14 08:32 Graf Zahl Note Added: 0001357
2017-04-14 08:32 Graf Zahl Status new => resolved
2017-04-14 08:32 Graf Zahl Resolution open => fixed