Skip to content

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
eloisebrosseau:fix-stacked-displays-linux-crash
Apr 15, 2026
Merged

fix: SG-42902: Fix seg fault on Linux when displays are stacked in the system settings#1226
bernie-laberge merged 1 commit intoAcademySoftwareFoundation:mainfrom
eloisebrosseau:fix-stacked-displays-linux-crash

Conversation

@eloisebrosseau
Copy link
Copy Markdown
Contributor

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() and screenGeometry() were now deprecated and respectively replaced with the lambda function getScreenFromPoint() and the Qt function geometry(). 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.

Signed-off-by: Éloïse Brosseau <eloise.brosseau@autodesk.com>
@eloisebrosseau eloisebrosseau changed the title SG-42902: Fix seg fault on Linux when displays are stacked in the system settings fix: SG-42902: Fix seg fault on Linux when displays are stacked in the system settings Apr 13, 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.

LGTM and pretty safe
I would merge it without view testing once code reviewed.

@bernie-laberge bernie-laberge merged commit f37cc3f into AcademySoftwareFoundation:main Apr 15, 2026
13 of 16 checks passed
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.

3 participants