Ticket #4807 (closed defect: obsolete)

Opened 9 years ago

Last modified 21 months ago

wglMakeCurrent fails when 3D acceleration is enabled

Reported by: bboaz Owned by:
Priority: major Component: 3D support
Version: VirtualBox 3.0.4 Keywords: OpenGL 3D acceleration
Cc: Guest type: other
Host type: other

Description (last modified by aeichner) (diff)

I'm trying to get a commercial visualization product running on a Windows XP32 (sp2) guest hosted by either Windows Vista64 or Windows 7. The render/paint method for a canvas is basically:





The method that enables the context first saves away the current rendering and device contexts by calling wglGetCurrentContext() and wglGetCurrentDC(); then it calls wglMakeCurrent to make the canvas's context current. This call to wglMakeCurrent succeeds.

However, when the disable context method is called after rendering, which tries to restore the context previously saved by the enable method, wglMakeCurrent fails.

All of this happens very soon after app startup, so it appears to crash almost immediately. However, since I can't debug the low-level code, I can't say for certain if the problem occurs on the first rendering pass, or very soon thereafter.

If the app is run outside of vbox - or if the app is run in vbox w/o 3D acceleration enabled - everything works dandy. (Obviously if run in vbox w/o 3D acceleration it is very slow).

A couple of possibilities come to mind for reasons why this issue occurs:

1) There's a good chance that on the first rendering pass the previous context is NULL; maybe your implementation of wglMakeCurrent is not handling a NULL context properly.

2) A threading issue. There's some small chance that the previous context is from a different thread. Are these vbox drivers threadsafe?

One other interesting tidbit from our internally generated log file (which may or may not be useful): right before the app crashes, the following is logged: OpenGL Warning: No pincher, please call crStateSetCurrentPointers() in your SPU


VBox.log Download (60.7 KB) - added by bboaz 9 years ago.

Change History

Changed 9 years ago by bboaz

comment:1 Changed 8 years ago by leonid

There had been lots of changes to the related code, could you retry if problem still exists with latest VirtualBox.

comment:2 Changed 8 years ago by Technologov

No response. Please Close.


comment:3 Changed 21 months ago by aeichner

  • Status changed from new to closed
  • Resolution set to obsolete
  • Description modified (diff)

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use