It looks like some operation is setting the GLContext to null, not sure which one yet.
If you add this property to the command line:
-Djogl.debug.GLContext.TraceSwitch=true
Then you'll see some debug statements logged to the console:
aquascript-SharedResourceRunner: GLContext.ContextSwitch[makeCurrent.0]: obj 0x742c5e37, ctx 0x0, surf 0x0 - <3037063f, 4d3ddedb>[count 0, qsz 0, owner <NULL>]
aquascript-SharedResourceRunner: Create GL context OK: obj 0x742c5e37, ctx 0x30001, surf 0x1b01bb1b for jogamp.opengl.windows.wgl.WindowsWGLContext - 4.5 (Compat profile, arb, ES2 compat, ES3 compat, FBO, hardware) - 4.5.0 NVIDIA 350.12
aquascript-SharedResourceRunner: GLContext.ContextSwitch: - setCurrent() - obj 0x742c5e37, ctx 0x30001
aquascript-SharedResourceRunner: GLContext.ContextSwitch[makeCurrent.X3]: obj 0x742c5e37, ctx 0x30001, surf 0x1b01bb1b - switch - CONTEXT_NOT_CURRENT - stateTracker.on false - <3037063f, 4d3ddedb>[count 1, qsz 0, owner <aquascript-SharedResourceRunner>]
aquascript-SharedResourceRunner: GLContext.ContextSwitch[release.0]: obj 0x742c5e37, ctx 0x30001, surf 0x1b01bb1b, inDestruction: false, <3037063f, 4d3ddedb>[count 1, qsz 0, owner <aquascript-SharedResourceRunner>]
aquascript-SharedResourceRunner: GLContext.ContextSwitch: - setCurrent() - NULL
aquascript-SharedResourceRunner: GLContext.ContextSwitch[release.X]: obj 0x742c5e37, ctx 0x30001, surf 0x0 - switch - <3037063f, 4d3ddedb>[count 0, qsz 0, owner <NULL>]
aquascript: GLContext.ContextSwitch: - setCurrent() - obj 0x43ccf040, ctx 0x0
There is a call to:
_canvas.getContext().release();
in ChartRendererOffscreen.getImate() after we get the saved image, but I don't know why this release() was being performed. My guess is that this line was added a long time ago in response to us trying to fix some other problem.
The fix for #2955 was assuming that we only needed to restore the context when creating the quadrics, but it looks like the quadrics require the context to be present at all times.
Another way to approach this would be to restore the context at the start of rendering when Mesa is being used & keep the release() call in place.
To followup:
Restoring the context at the start of rendering seems to resolve the problems with both test cases (Support Info Dialog -> render -> context lost, and the script above).
@matt: are similar changes required for VA?
@matt: are similar changes required for VA?
It's possible, tho' I haven't seen an example of this particular issue in VA.
I can add this same code to the BIChartRenderer render() method.
It's possible, tho' I haven't seen an example of this particular issue in VA.
I can add this same code to the BIChartRenderer render() method.
Issue #2957 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build 16.0.5-35 |
No time estimate |
It looks like some operation is setting the GLContext to null, not sure which one yet.
If you add this property to the command line:
-Djogl.debug.GLContext.TraceSwitch=true
Then you'll see some debug statements logged to the console:
aquascript-SharedResourceRunner: GLContext.ContextSwitch[makeCurrent.0]: obj 0x742c5e37, ctx 0x0, surf 0x0 - <3037063f, 4d3ddedb>[count 0, qsz 0, owner <NULL>]
aquascript-SharedResourceRunner: Create GL context OK: obj 0x742c5e37, ctx 0x30001, surf 0x1b01bb1b for jogamp.opengl.windows.wgl.WindowsWGLContext - 4.5 (Compat profile, arb, ES2 compat, ES3 compat, FBO, hardware) - 4.5.0 NVIDIA 350.12
aquascript-SharedResourceRunner: GLContext.ContextSwitch: - setCurrent() - obj 0x742c5e37, ctx 0x30001
aquascript-SharedResourceRunner: GLContext.ContextSwitch[makeCurrent.X3]: obj 0x742c5e37, ctx 0x30001, surf 0x1b01bb1b - switch - CONTEXT_NOT_CURRENT - stateTracker.on false - <3037063f, 4d3ddedb>[count 1, qsz 0, owner <aquascript-SharedResourceRunner>]
aquascript-SharedResourceRunner: GLContext.ContextSwitch[release.0]: obj 0x742c5e37, ctx 0x30001, surf 0x1b01bb1b, inDestruction: false, <3037063f, 4d3ddedb>[count 1, qsz 0, owner <aquascript-SharedResourceRunner>]
aquascript-SharedResourceRunner: GLContext.ContextSwitch: - setCurrent() - NULL
aquascript-SharedResourceRunner: GLContext.ContextSwitch[release.X]: obj 0x742c5e37, ctx 0x30001, surf 0x0 - switch - <3037063f, 4d3ddedb>[count 0, qsz 0, owner <NULL>]
aquascript: GLContext.ContextSwitch: - setCurrent() - obj 0x43ccf040, ctx 0x0
There is a call to:
_canvas.getContext().release();
in ChartRendererOffscreen.getImate() after we get the saved image, but I don't know why this release() was being performed. My guess is that this line was added a long time ago in response to us trying to fix some other problem.
The fix for #2955 was assuming that we only needed to restore the context when creating the quadrics, but it looks like the quadrics require the context to be present at all times.
Another way to approach this would be to restore the context at the start of rendering when Mesa is being used & keep the release() call in place.
To followup:
Restoring the context at the start of rendering seems to resolve the problems with both test cases (Support Info Dialog -> render -> context lost, and the script above).