Skip to content

Fix CUDA 719 crash from unpumped Kit marker backend on non-Kit visualizers - #7149

Open
AntoineRichard wants to merge 1 commit into
developfrom
antoiner/fix-newton-gl-marker-cuda-crash
Open

Fix CUDA 719 crash from unpumped Kit marker backend on non-Kit visualizers#7149
AntoineRichard wants to merge 1 commit into
developfrom
antoiner/fix-newton-gl-marker-cuda-crash

Conversation

@AntoineRichard

Copy link
Copy Markdown
Collaborator

Description

Fixes a crash when using the Newton GL visualizer on a PhysX-backed task with debug-vis markers enabled: env.step() crashes on the very first call with CUDA error: unspecified launch failure (719) from PhysX's GpuArticulationView, preceded by FabricManager::initializePointInstancer mismatched prototypes warnings for the active debug-vis markers.

Root cause

VisualizationMarkers._ensure_backends_initialized() stood up a Kit/USD marker backend whenever sim.is_rendering was True — which is also true for non-Kit visualizers like newton_gl, since that flag is set by any active visualizer, not just Kit. With no real Kit visualizer instance to pump app.update() every frame, the Kit backend's raw USD marker writes (position/prototype-index attrs) were never digested by Fabric, desyncing its point-instancer prototype table. That desync corrupts shared Fabric/GPU-tensor interop state, and the very next PhysX GPU articulation step then crashes with CUDA error 719.

Reproduced on an independent machine/GPU (Linux, RTX 5000 Ada / sm_89) — different architecture than the originally reported RTX 5090 (sm_120) — with the identical crash signature and warning sequence, confirming this is architecture-independent. Confirmed causally: disabling the task's debug-vis markers eliminated the crash entirely.

Fix

_ensure_backends_initialized() now checks the concrete conditions that actually need a Kit-pumped marker backend (native GUI, RTX sensor rendering, XR, offscreen capture) plus the existing Kit-pumping-visualizer check, instead of the broader sim.is_rendering.

Fixes #(issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

…izers

VisualizationMarkers stood up a Kit/USD marker backend for any active
visualizer (via sim.is_rendering), including non-Kit-pumping ones like
newton_gl. With no Kit app.update() pump, the backend's raw USD marker
writes desynced Fabric's point-instancer prototype table, crashing the
next PhysX GPU step with "unspecified launch failure".
@AntoineRichard
AntoineRichard requested a review from a team August 18, 2026 14:36
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Aug 18, 2026
@greptile-apps

greptile-apps Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR narrows marker backend initialization so non-Kit visualizers no longer accidentally create an unpumped USD backend, while preserving Kit markers for GUI, RTX sensor, XR, offscreen, and Kit-pumping modes.

  • Replaces the broad SimulationContext.is_rendering check with concrete Kit-backend requirements.
  • Adds backend-selection regression coverage across rendering modes and supported visualizers.
  • Documents the Fabric point-instancer desynchronization and CUDA crash fix in the changelog.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking issues identified.

The new predicates preserve the established Kit-rendering modes while excluding non-Kit-pumping visualizers, and the added tests directly cover each backend-selection branch introduced by the change.

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/markers/visualization_markers.py Replaces broad rendering-state backend selection with explicit Kit-pumping/rendering predicates and retains independent Newton backend initialization.
source/isaaclab/test/markers/test_visualization_markers.py Expands integration coverage for GUI, RTX, XR, offscreen, Kit, Newton, Rerun, and Viser backend-selection cases.
source/isaaclab/changelog.d/fix-newton-gl-marker-cuda-crash.rst Records the unpumped Kit marker backend failure mechanism and the corrected selection behavior.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Marker visualization requested] --> B{SimulationContext exists?}
    B -- No --> K[Initialize Kit backend]
    B -- Yes --> C{GUI, RTX sensors, XR, offscreen, or Kit-pumping marker visualizer?}
    C -- Yes --> K
    C -- No --> D[Do not initialize Kit backend]
    K --> E{Enabled non-Kit-pumping marker visualizer?}
    D --> E
    E -- Yes --> N[Initialize Newton marker backend]
    E -- No --> F[Use selected backends]
    N --> F
Loading

Reviews (1): Last reviewed commit: "Fix CUDA 719 crash from unpumped Kit mar..." | Re-trigger Greptile

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isaac Lab Review Bot

The backend-selection change was traced through GUI, RTX sensor, XR, offscreen capture, Kit-pumping visualizer, and non-Kit visualizer paths. The patch directly addresses the Newton GL regression and adds focused selection coverage plus the required changelog fragment.

  • Design and architecture: Separating generic rendering activity from conditions that actually pump Kit is consistent with the backend architecture. Direct setting-key lookups create some coupling to SimulationContext configuration, but the candidate review does not establish an existing accessor or a concrete compatibility failure requiring action before merge.
  • API: No public marker API, configuration type, or export changes. The behavioral change is limited to backend creation, preserving Kit creation for the explicitly covered rendering modes while avoiding it for a Newton-only visualizer.
  • Implementation: The implementation and parametrized test consistently model the intended selection matrix. The claim that has_gui is necessarily a method is not supported by the supplied patch or current-file context, so the alleged always-truthy bound-method failure is not established.

No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.

Automated review; human maintainers own approval decisions.

@matthewtrepte matthewtrepte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants