#592 Can't launch in Win32 OpenGL - OpenGL Extensions Limit

Always occurs!
closed-fixed
OpenGL (90)
3
2013-03-22
2011-10-06
Anonymous
No

BUG: A buffer overflow issue - modern videocards have a much longer OpenGL extensions string than what Legacy Doom expects (Running Legacy on a Win7 64-bit Core i5 notebook with Nvidia GeForce GT 525M, driver version = 285.27).
WORKAROUND: For quite a while already the Nvidia drivers don't have the Extensions Limit tweak, so had to use NVIDIA Inspector 1.9.5.5 to adjust SettingID="Extension limit" to SettingValue="0x000011A8" (a common value to fix this issue for many older games). With this limit on the length of OpenGL extensions string passed by the driver, Doom Legacy starts fine on OpenGL mode.
FIX: To be implemented by developer.

Discussion

  • Wesley Johnson
    Wesley Johnson
    2011-12-10

    Cannot find anywhere in DoomLegacy where an extensions string from the
    video card is gotten or handled. Cannot identify a SDL library call
    that performs that operation.
    DoomLegacy only gets video modes, which are short strings.
    The problem could be with the SDL library.
    Do other SDL games or demos (from SDL site) that use your library copy, behave better ??

     
  • Wesley Johnson
    Wesley Johnson
    2011-12-10

    • priority: 5 --> 3
     
  • Wesley Johnson
    Wesley Johnson
    2012-06-20

    Found in ogl_win.c and ogl_x11.c, where extension strings are indirectly printed
    to a log file. The print function uses a buffer of size 4096.
    Created a function to print the extension string by lines of 80 chars.
    Fixed the print functions so that the string is terminated properly
    when handling a buffer overrun.

     
  • Wesley Johnson
    Wesley Johnson
    2012-06-20

    • status: open --> pending
     
  • Wesley Johnson
    Wesley Johnson
    2013-03-22

    Fixed SVN935
    Fix buffer overrun of DBG_Printf strings by video card extensions.
    Create common function, Query_GL_info(), to get GL info strings,
    check renderer, and set gl_extensions string and oglflags.
    Create DBG_Print_lines() function to print extension strings on multiple
    lines, and prevent buffer overrun.
    Change SDL, Win32, X11 opengl port drivers, to use these functions.
    In DBG_Printf(), when verbose, print to stderr too;

     
  • Wesley Johnson
    Wesley Johnson
    2013-03-22

    • assigned_to: nobody --> wesleyjohnson
    • status: pending --> closed-fixed