VirtualBox

Ticket #8916 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

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

Reported by: hwti Owned by:
Priority: major Component: 3D support
Version: VirtualBox 4.0.8 Keywords:
Cc: Guest type: Linux
Host type: other

Description

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

comment:1 Changed 3 years ago by leonid

  • Status changed from new to closed
  • Resolution set to fixed
  • Summary changed from glGetString(GL_VERSION) must not depend on locale to glGetString(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.

www.oracle.com
ContactPrivacy policyTerms of Use