Fix CUDA 719 crash from unpumped Kit marker backend on non-Kit visualizers - #7149
Fix CUDA 719 crash from unpumped Kit marker backend on non-Kit visualizers#7149AntoineRichard wants to merge 1 commit into
Conversation
…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".
Greptile SummaryThe 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.
Confidence Score: 5/5The 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
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
Reviews (1): Last reviewed commit: "Fix CUDA 719 crash from unpumped Kit mar..." | Re-trigger Greptile |
There was a problem hiding this comment.
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_guiis 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.
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 withCUDA error: unspecified launch failure(719) from PhysX'sGpuArticulationView, preceded byFabricManager::initializePointInstancer mismatched prototypeswarnings for the active debug-vis markers.Root cause
VisualizationMarkers._ensure_backends_initialized()stood up a Kit/USD marker backend wheneversim.is_renderingwasTrue— which is also true for non-Kit visualizers likenewton_gl, since that flag is set by any active visualizer, not just Kit. With no real Kit visualizer instance to pumpapp.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 broadersim.is_rendering.Fixes #(issue)
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.mdor my name already exists there