fix(session): guard null active session in xwayland primary output sync - #1306
Open
glyvut wants to merge 1 commit into
Open
fix(session): guard null active session in xwayland primary output sync#1306glyvut wants to merge 1 commit into
glyvut wants to merge 1 commit into
Conversation
|
Skipping CI for Draft Pull Request. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideGuard against a null active session in XWayland primary-output sync to prevent compositor crashes when outputs are removed and the active session has already been reset. Sequence diagram for guarded XWayland primary-output syncsequenceDiagram
participant Compositor
participant SessionManager
participant ActiveSession
participant XWayland
Compositor->>SessionManager: syncActiveSessionXWaylandPrimaryOutput()
SessionManager->>SessionManager: primaryOutput check
SessionManager->>ActiveSession: m_activeSession.lock()
alt session is null
SessionManager-->>Compositor: return (skip XWayland sync)
else session is valid
SessionManager->>XWayland: session.xwayland()
XWayland->>XWayland: xcbConnection()
XWayland->>XWayland: xcbScreen()
SessionManager-->>Compositor: XWayland primary output synced
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
glyvut
force-pushed
the
fix/xway-sync-null-active-session
branch
from
August 20, 2026 09:40
9c65767 to
2aa37e2
Compare
glyvut
marked this pull request as ready for review
August 20, 2026 10:52
zccrs
approved these changes
Aug 20, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: glyvut, zccrs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Check the weak_ptr lock result before dereferencing the active session. When an output is removed, primaryOutputChanged is delivered synchronously; if the active session was already reset (e.g. after a logind session was removed), calling ->xwayland() on the null session crashes the compositor. 输出移除时同步触发primaryOutputChanged,若活动会话已被重置, 对空指针调用->xwayland()会导致合成器崩溃,增加空指针守卫。 PMS: BUG-374551 Log: 修复输出移除(切 tty)时活动会话为空导致的崩溃
glyvut
force-pushed
the
fix/xway-sync-null-active-session
branch
from
August 21, 2026 01:01
2aa37e2 to
4d40d89
Compare
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.
Check the weak_ptr lock result before dereferencing the active session. When an output is removed, primaryOutputChanged is delivered synchronously; if the active session was already reset (e.g. after a logind session was removed), calling ->xwayland() on the null session crashes the compositor.
输出移除时同步触发primaryOutputChanged,若活动会话已被重置,
对空指针调用->xwayland()会导致合成器崩溃,增加空指针守卫。
Log: 修复输出移除时活动会话为空导致的崩溃
Summary by Sourcery
Bug Fixes: