From: OpenSG <tr...@op...> - 2013-03-12 07:57:59
|
#136: If Win32Window::activate() fails, a crash may follow ---------------------+------------------------------------------------------ Reporter: marcusl | Owner: unassigned Type: defect | Status: new Priority: major | Milestone: Close or reassign old tickets Component: System | Version: 2.0 Keywords: | ---------------------+------------------------------------------------------ Changes (by vossg): * milestone: => Close or reassign old tickets Old description: > If no gl-context is available for thread, the glGetString(GL_EXTENSIONS) > returns null, which isn't handled correctly. > > > The right way would be to check if activate() succeeds and not try to > render if it doesn't, something like the following (without calling > activate twice) > > {{{ > > m_win->activate(); > > if (wglGetCurrentContext()) { > > m_win->render(m_action); > > } > > }}} > > > I get this when I try to render from a different thread than what I > created the window in. (I'm working on the actual cause for this, > noticing the brittle error handling in the process.) New description: If no gl-context is available for thread, the glGetString(GL_EXTENSIONS) returns null, which isn't handled correctly. The right way would be to check if activate() succeeds and not try to render if it doesn't, something like the following (without calling activate twice) {{{ m_win->activate(); if (wglGetCurrentContext()) { m_win->render(m_action); } }}} I get this when I try to render from a different thread than what I created the window in. (I'm working on the actual cause for this, noticing the brittle error handling in the process.) -- -- Ticket URL: <http://www.opensg.org/ticket/136#comment:2> OpenSG <http://external.lite3d.com/opensg> OpenSG Project |