Skip to content

Crash: qFatal "Tried to show lockscreen surfaces without active lock" in WlSessionLock::updateSurfaces #975

Description

@Paritsingla7

What caused the crash

quickshell aborts (SIGABRT) via qFatal() in WlSessionLock::updateSurfaces when the
locked property is set to true from QML while the underlying native session lock
is not yet active.

Crash

quickshell-git 0.3.0.r20.g28771c7-2 (Qt 6.11.2), running as the Omarchy shell.
Two identical crashes on the same session, ~35 minutes apart, both with the exact
same stack trace.

Symbolized backtrace (debuginfod, gdb):

WlSessionLock::updateSurfaces (this=..., show=true, old=0x0)
    at src/wayland/session_lock.cpp:106
106     qFatal() << "Tried to show lockscreen surfaces without active lock";
WlSessionLock::qt_metacall (QMetaObject::WriteProperty) -> moc_session_lock.cpp:175
QQmlPropertyPrivate::write(...)
QV4::QObjectWrapper::setProperty / setQmlProperty / virtualPut
QV4::Lookup::setterFallback
... (QML property write triggered from JS) ...
QQmlBoundSignalExpression::evaluate
QQmlTimer::ticked / QQmlTimer::event
QCoreApplication::notifyInternal2 -> sendPostedEvents -> g_main_context_iteration
QCoreApplication::exec
qs::launch::launch

old=0x0 at the abort site confirms there was no active native lock object when
show=true was requested.

Trigger (QML side)

The QML that flips the property is a WlSessionLock user, e.g.:

WlSessionLock {
    id: sessionLock
    locked: false
    ...
}
// elsewhere:
sessionLock.locked = true

Setting locked = true here reaches updateSurfaces(true, ...) in the native
object while, apparently, the actual Wayland ext-session-lock-v1 object hadn't
been (re)established yet — plausibly right after quickshell restarted itself
from a prior crash, where the QML-level lock state and the native lock object's
lifecycle can get out of sync.

Expected behavior

A QML-level locked = true write racing ahead of the native lock's actual
readiness should not be a fatal, aborting condition — at minimum it should be
recoverable (queue/retry, or ignore with a warning) rather than calling qFatal()
and killing the process.

Environment

  • quickshell-git 0.3.0.r20.g28771c7-2
  • Qt 6.11.2 (qt6-base, qt6-declarative)
  • Compositor: Hyprland, via Omarchy's wayland-wm@hyprland.desktop.service
  • Two crashes same session: 2026-08-22 14:28 IST and 15:03 IST, identical stack
    both times (confirmed via coredumpctl + gdb with Arch's debuginfod server)
  • No OOM, no relevant package update at the crash times (last quickshell/Qt
    update was ~14 hours prior)

Reproduction

Not yet isolated to a minimal repro — happened twice organically during normal
use, both immediately reproducing the identical fatal path. Happy to provide the
core dump or the two quickshell crash log directories under
~/.cache/quickshell/crashes/ if useful.

Report file

report.txt

Configuration

No response

Backtrace

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcrash

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions