Opened 13 years ago

Closed 13 years ago

#8916 closed defect (fixed)

glGetString(GL_VERSION) must not depend on locale -> Fixed in SVN

Reported by: Loïc Yhuel Owned by:
Component: 3D support Version: VirtualBox 4.0.8
Keywords: Cc:
Guest type: Linux Host type: other


With LANG=fr_FR, glGetString(GL_VERSION) returns "2,0 Chromium 1.9" instead of "2.1 Chromium 1.9"
It's not visible with glxinfo since there is no setlocale call, but it makes gnome-shell segfault on start : clutter uses a NULL pointer when trying to call glBlendEquation (it only sets the pointer if it detects OpenGL >= 1.2, and it doesn't support the comma so detected version is 0.0).

In src/VBox/Additions/common/crOpenGL/pack/packspu_getstring.c :

  • in packspu_GetString, using sprintf with "%.1f Chromium %s" depends on the language
  • in GetVersionString, usage of crStrToFloat is probably wrong since the string uses '.' (I did not test, but I suppose "2.1" is converted to 2.0f here)

In src/VBox/GuestHost/OpenGL/state_tracker/state_limits.c :

  • in crStateComputeVersion, same thing as above, CR_OPENGL_VERSION_STRING is "2.1", which doesn't work with crStrToFloat(atof) for all languages

Change History (1)

comment:1 by Leonid Lobachev, 13 years ago

Resolution: fixed
Status: newclosed
Summary: glGetString(GL_VERSION) must not depend on localeglGetString(GL_VERSION) must not depend on locale -> Fixed in SVN

Fixed in SVN, thank you for report.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use