fix: SG-42902: Fix seg fault on Linux when displays are stacked in the system settings#1226
Merged
bernie-laberge merged 1 commit intoAcademySoftwareFoundation:mainfrom Apr 15, 2026
Conversation
Signed-off-by: Éloïse Brosseau <eloise.brosseau@autodesk.com>
bernie-laberge
approved these changes
Apr 13, 2026
Contributor
bernie-laberge
left a comment
There was a problem hiding this comment.
LGTM and pretty safe
I would merge it without view testing once code reviewed.
cedrik-fuoco-adsk
approved these changes
Apr 14, 2026
f37cc3f
into
AcademySoftwareFoundation:main
13 of 16 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SG-42902: Fix seg fault on Linux when displays are stacked in the system settings
Summarize your change.
Prevent accessing the screen index of a secondary monitor if it invalid (i.e. -1).
Describe the reason for the change.
Open RV would crash when trying to launch on Linux if a secondary monitor was stacked under the primary monitor in the system settings on Linux. The issue was introduced by the upgrade to Qt6 where
screenNumber()andscreenGeometry()were now deprecated and respectively replaced with the lambda functiongetScreenFromPoint()and the Qt functiongeometry(). With the previous implementation, Qt was falling back to using index 0 (i.e. the primary screen) if the index of the screen was invalid. However, I believe we are better by simply not computing any calculation if the screen index is -1 as comparing the values between the same screen wouldn't do anything.Note that I also moved
getScreenFromPoint()closer to where it was actually used to make the code a little bit more readable.Describe what you have tested and on which operating system.
Tested different configuration of arranging displays in the System Settings was tested on Linux, macOS and Windows.