Skip to content

fix: SG-45651: Fix crash with -debug profile on the Vulkan and Metal views - #1491

Merged
bernie-laberge merged 1 commit into
AcademySoftwareFoundation:mainfrom
bernie-laberge:SG-45651-fix-debug-profile-vulkan-metal
Nov 10, 2026
Merged

bernie-laberge merged 1 commit into
AcademySoftwareFoundation:mainfrom
bernie-laberge:SG-45651-fix-debug-profile-vulkan-metal

Conversation

@bernie-laberge

Copy link
Copy Markdown
Contributor

Linked issues

No GitHub issue. Tracked internally as SG-45651.

Summarize your change.

Fix the crash when RV is started with -debug profile and 10-bit presentation is enabled (Vulkan on Linux/Windows, Metal on macOS).

Describe the reason for the change.

Session::render() writes into the current profiling sample, which the viewport must open before each render. #1447 restored this in GLWindow::paintGL(), but VulkanWindow::render() and MetalView::render() never open one, so RV reads back() from an empty vector and crashes on the first frame.

Describe what you have tested and on which operating system.

macOS, 10-bit (Metal): rv -debug profile <media> no longer crashes, and the .rvprof file is written on exit.

Add a list of changes, and note any that might need special attention during the review.

  • VulkanWindow::render() and MetalView::render(): begin the profiling sample before session->render(), record render end, and record swap end after the frame is presented, as GLWindow does.
  • No change when profiling is off.

If possible, provide screenshots.

N/A

🤖 Generated with Claude Code

@bernie-laberge
bernie-laberge marked this pull request as ready for review November 10, 2026 01:53
…views

Open a profiling sample around each render in VulkanWindow::render() and
MetalView::render(), as GLWindow::paintGL() does (AcademySoftwareFoundation#1447). Without it,
Session::render() reads the current sample from an empty vector and RV
crashes on the first frame when 10-bit presentation is enabled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Bernard Laberge <bernard.laberge@autodesk.com>
@bernie-laberge
bernie-laberge force-pushed the SG-45651-fix-debug-profile-vulkan-metal branch from c20c4ac to ff516e8 Compare November 10, 2026 22:29
@bernie-laberge
bernie-laberge merged commit 6fdc9ba into AcademySoftwareFoundation:main Nov 10, 2026
18 of 19 checks passed
@bernie-laberge
bernie-laberge deleted the SG-45651-fix-debug-profile-vulkan-metal branch November 10, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants