Skip to content

fix: SG-43708: Prevent preloader threads from running in rvio - #1305

Merged
eloisebrosseau merged 1 commit into
AcademySoftwareFoundation:mainfrom
markreidvfx:nas_contrib_rvio_preloader_fix_v1
Jul 31, 2026
Merged

fix: SG-43708: Prevent preloader threads from running in rvio#1305
eloisebrosseau merged 1 commit into
AcademySoftwareFoundation:mainfrom
markreidvfx:nas_contrib_rvio_preloader_fix_v1

Conversation

@markreidvfx

Copy link
Copy Markdown
Contributor

Linked issues

N/A

Summarize your change.

Prevent startPreloadingMedia() background threads from running in rvio/batch mode where they race with synchronous session loading and cause heap corruption.

Describe the reason for the change.

startPreloadingMedia() starts background threads that preload media from disk. These are only safe in interactive RV, where session loading is deferred (delaySessionLoading=1). In rvio, session loading is synchronous (delaySessionLoading=0) and the preloader threads race with it, causing non-deterministic heap corruption and SIGABRT. The preload call was added in commit 512d4182 but only gated on progressiveSourceLoading, inadvertently enabling it in rvio. The fix adds delaySessionLoading to the condition.

Describe what you have tested and on which operating system.

Tested on Rocky Linux 9.

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

  • RvSession.cpp: Add delaySessionLoading check to the preload condition so rvio/batch mode never starts background preloader threads.

If possible, provide screenshots.

N/A

startPreloadingMedia() starts background threads that preload media
from disk. These threads are only safe in interactive RV, where session
loading is intentionally deferred (delaySessionLoading=1). In rvio,
session loading is synchronous (delaySessionLoading=0) and the
background threads race with it, causing heap corruption and SIGABRT.

commit 512d418 added this preload call during .rv session restore but
gated it only on progressiveSourceLoading, inadvertently enabling it
in rvio. The fix adds delaySessionLoading to the condition so rvio
never starts preloader threads.

Signed-off-by: Mark Reid <markreid@netflixanimation.com>
@bernie-laberge bernie-laberge changed the title fix: Prevent preloader threads from running in rvio fix: SG-43708: Prevent preloader threads from running in rvio Jun 15, 2026
@bernie-laberge bernie-laberge added PR: Acknowledged New PR has been acknowledge by the TSC community Contribution from the Open RV Community labels Jun 15, 2026
@eloisebrosseau eloisebrosseau added PR: Planned_P1 PR will be review and set soon. Expect 1 to 4 weeks delay. PR: In Progress PR is being reviewed by code reviewer. and removed PR: Acknowledged New PR has been acknowledge by the TSC PR: Planned_P1 PR will be review and set soon. Expect 1 to 4 weeks delay. labels Jul 13, 2026
@eloisebrosseau eloisebrosseau added PR: In Testing This PR is being built and tested by QA. and removed PR: In Progress PR is being reviewed by code reviewer. labels Jul 30, 2026

@bernie-laberge bernie-laberge 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.

LGTM
Thank you @markreidvfx !

@eloisebrosseau
eloisebrosseau merged commit 82c53b8 into AcademySoftwareFoundation:main Jul 31, 2026
17 checks passed
@eloisebrosseau eloisebrosseau removed the PR: In Testing This PR is being built and tested by QA. label Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Contribution from the Open RV Community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants