Skip to content

fix: SG-42890: Fix BADACCESS X error when running RVIO commands on Rocky Linux 9#1249

Open
eloisebrosseau wants to merge 2 commits intoAcademySoftwareFoundation:mainfrom
eloisebrosseau:fix-rvio
Open

fix: SG-42890: Fix BADACCESS X error when running RVIO commands on Rocky Linux 9#1249
eloisebrosseau wants to merge 2 commits intoAcademySoftwareFoundation:mainfrom
eloisebrosseau:fix-rvio

Conversation

@eloisebrosseau
Copy link
Copy Markdown
Contributor

SG-42890: Fix BADACCESS X error when running RVIO commands on Rocky Linux 9

Summarize your change.

  • Make the writer thread call MovieRV::uninit instead of the main thread
  • Replace dummyDev raw pointer with an FBOVideoDevice unique_ptr

Describe the reason for the change.

#310 added MovieRV::uninit in the main function of RVIO to fix a GL error on exit on Rocky Linux 9. However, in a more recent version of the Rocky Linux 9, we are now getting a BADACCESS X error when running RVIO commands from the command line. An alert panel is also being displayed when submitting an image sequence through Screening Room after each step. This was caused by the main thread trying to access the OpenGL rendering context used by the writer thread when calling MovieRV::uninit at the end of the main function.

It seems that the initial GL error was actually caused by the FBOVideoDevice raw pointer created as a dummy video device at the beginning of the main RVIO function by the main thread to avoid a segmentation fault. This raw pointer was never deleted, and this was causing a GL error when the GLSyncObjectARBSync destructor was called at the end of the program. Replacing the raw pointer with a unique_ptr fixed the leaking pointer that was the root cause of the GL error.

MovieRV::uninit was not technically needed to fix the original GL error, but it's a good practice to keep it to make sure we uninit any FBOs that were allocated. The only difference is that it should have been called by the writer thread instead of the main thread since it is the one that actually created and used the FBOVideoDevice and the OpenGL rendering context during the execution of RVIO.

Describe what you have tested and on which operating system.

Submitting an image sequence through Screening Room was tested on Rocky Linux 9.6, Windows 11, and macOS 26.3.
The following commands that were called during the submit process of Screening Room were also manually called from the command line to make sure no error remains:

  • rvio movie.####.dpx -o /tmp/thumb.#.jpg
  • rvio movie.####.dpx -o /tmp/out.mov
  • rvio movie.####.dpx -resize 240 132 -outres 1200 132 -o /tmp/filmstrip.jpg

@eloisebrosseau eloisebrosseau changed the title SG-42890: Fix BADACCESS X error when running RVIO commands on Rocky Linux 9 fix: SG-42890: Fix BADACCESS X error when running RVIO commands on Rocky Linux 9 Apr 30, 2026
Copy link
Copy Markdown
Contributor

@bernie-laberge bernie-laberge left a comment

Choose a reason for hiding this comment

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

Nice fix and cleanup !
Thank you @eloisebrosseau !

Copy link
Copy Markdown
Contributor

@rogernelson rogernelson left a comment

Choose a reason for hiding this comment

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

Nice and clean, good job!

Signed-off-by: Éloïse Brosseau <eloise.brosseau@autodesk.com>
Signed-off-by: Éloïse Brosseau <eloise.brosseau@autodesk.com>
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.

4 participants