[H6 fix attempt] Make Newton ViewerGL context current before get_frame#5541
Closed
hujc7 wants to merge 2 commits intoisaac-sim:developfrom
Closed
[H6 fix attempt] Make Newton ViewerGL context current before get_frame#5541hujc7 wants to merge 2 commits intoisaac-sim:developfrom
hujc7 wants to merge 2 commits intoisaac-sim:developfrom
Conversation
Newton's ViewerGL.get_frame issues GL calls without first calling self._make_current(). When Kit's GLFW context is current (likely after env.step() runs Kit), those GL calls operate on Kit's context where Newton's FBO/PBO ids are invalid, returning zeros. This patch wraps get_frame in a conftest to call _make_current() first. If the visualizer test passes with this, the proper fix is upstream in Newton.
2 tasks
Collaborator
Author
|
Hypothesis disproven. With |
AntoineRichard
pushed a commit
that referenced
this pull request
May 8, 2026
#5538) ## Summary Two unrelated CI breakages on develop, bundled here so develop turns green in one PR. ### 1. Skip the failing viewergl test `test_cartpole_newton_visualizer_viewergl_rgb_motion[physx,newton]` started returning all-black frames on develop after `nvcr.io/nvidian/isaac-sim:latest-develop` flipped to a Kit 110.1.1 + USD 25.11 base. The failure has been deterministic across multiple PRs (#5523, #5495, #5408, …). Investigation so far has ruled out: - PR #5521 (revert in #5539 still failed) - Newton 1.0 → 1.2.0rc2 viewer code regression (only 7-line addition; ViewerGL alone yields 1.08M nonzero pixels) - warp 1.12 → 1.13 RegisteredGLBuffer ABI (byte-identical) - Module-load side effects of `isaaclab_physx.renderers` - CUDA-GL interop (PR #5540 diagnostic confirms direct CPU FBO readback also returns zeros, with `GL_NO_ERROR`) - GL context-currency (PR #5541 H6 attempt: still fails) - GL/CUDA sync (PR #5542 H4 attempt: still fails) Diagnostic output (PR #5540 v2): ``` [VIZDIAG] fbo=c_uint(8) pbo=None size=600x600 [VIZDIAG] glGetError before: GL_NO_ERROR [VIZDIAG] CPU-readback: nonzero=0/1080000 max=0 err=GL_NO_ERROR [VIZDIAG] PBO-result: nonzero=0/1080000 max=0 ``` The FBO itself is empty — Newton's pyglet/EGL renderer is not depositing pixels under Kit 110.1.1, even though `tiled_camera_rgb_non_black` (Kit RTX path) on the same env passes. Underlying root cause still being chased; this PR ships the skip to unblock develop. ### 2. Fix warp intersphinx 404 in docs build `https://nvidia.github.io/warp/objects.inv` started returning 404 — Warp's `objects.inv` only lives at `/stable/` and `/latest/` now. With Sphinx's `warnings_treated_as_errors`, the broken intersphinx fetch fails the docs build on every PR. Pinning to `/stable/` (matches the existing PyTorch `/docs/2.11/` workaround pattern in the same file). Verified `https://nvidia.github.io/warp/stable/objects.inv` returns 200. ## Test plan - [x] CI `isaaclab_visualizers` on this branch — was passing earlier with the skip; will re-verify with the bundled docs fix - [ ] CI `Build Latest Docs` on this branch — must turn green (was failing on every recent PR before this fix) ## Re-enable plan Once the underlying viewergl bug is identified and fixed, drop the `@pytest.mark.skip` decorator and remove the `jichuanh-disable-viewergl-flaky.skip` fragment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix-attempt PR for the viewergl-fully-black regression on develop.
Hypothesis: Newton's
ViewerGL.get_framedoes not callself._make_current(). If Kit's GLFW context is current whenget_frame()runs (afterenv.step()ticks Kit), Newton's GL calls (glBindFramebuffer,glReadPixels,RegisteredGLBuffer.map) operate on Kit's context — Newton's FBO/PBO IDs are invalid there, so the readback returns zeros. The bug presents as 'Viewer frame appears fully black'.This patch wraps
get_framevia a test conftest to call_make_current()first.If
test_cartpole_newton_visualizer_viewergl_rgb_motionpasses with this in place, the proper fix is upstream in Newton (newton/_src/viewer/viewer_gl.py:get_frameshould callself._make_current()at the start).Related diagnostic in #5540. PR #5521 hypothesis already disproven by #5539.
DO NOT MERGE — testing only.