linuxdeepin / treeland

14 stars 17 forks source link

[Bug]: treeland偶现崩溃 #283

Open lbwtw opened 1 month ago

lbwtw commented 1 month ago

SUMMARY | 问题概要

崩溃堆栈如下:

Core was generated by `/home/xyb/Documents/Deepin/treeland/build_cmake/src/treeland'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00005e6c19ae8da8 in QScopedPointer<Waylib::Server::WObjectPrivate, QScopedPointerDeleter<Waylib::Server::WObjectPrivate> >::get (this=0x18) at /usr/include/qt6/QtCore/qscopedpointer.h:112
112             return d;
[Current thread is 1 (Thread 0x7c42bca8bbc0 (LWP 3612))]
(gdb) bt
#0  0x00005e6c19ae8da8 in QScopedPointer<Waylib::Server::WObjectPrivate, QScopedPointerDeleter<Waylib::Server::WObjectPrivate> >::get (this=0x18) at /usr/include/qt6/QtCore/qscopedpointer.h:112
#1  0x00007c42c3350dbf in qGetPtrHelper<QScopedPointer<Waylib::Server::WObjectPrivate, QScopedPointerDeleter<Waylib::Server::WObjectPrivate> > const> (ptr=...) at /usr/include/qt6/QtCore/qtclasshelpermacros.h:79
#2  0x00007c42c3382c66 in Waylib::Server::WSurface::d_func (this=0x0) at /home/xyb/Documents/Deepin/waylib/src/server/kernel/wsurface.h:31
#3  0x00007c42c33813f4 in Waylib::Server::WSurface::handle (this=0x0) at /home/xyb/Documents/Deepin/waylib/src/server/kernel/wsurface.cpp:247
#4  0x00007c42c33b830f in Waylib::Server::WSurfaceItem::onSurfaceCommit (this=0x5e6c53307530) at /home/xyb/Documents/Deepin/waylib/src/server/qtquick/wsurfaceitem.cpp:943
#5  0x00007c42c3487de7 in Waylib::Server::WXWaylandSurfaceItem::onSurfaceCommit (this=0x5e6c53307530) at /home/xyb/Documents/Deepin/waylib/src/server/qtquick/private/wquickxwayland.cpp:414
#6  0x00007c42c33c6dd3 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (Waylib::Server::WSurfaceItem::*)()>::call(void (Waylib::Server::WSurfaceItem::*)(), Waylib::Server::WSurfaceItem*, void**)
    (f=&virtual table offset 376, o=0x5e6c53307530, arg=0x7ffd37def798) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:145
#7  0x00007c42c33c5a9e in QtPrivate::FunctionPointer<void (Waylib::Server::WSurfaceItem::*)()>::call<QtPrivate::List<>, void>(void (Waylib::Server::WSurfaceItem::*)(), Waylib::Server::WSurfaceItem*, void**)
    (f=&virtual table offset 376, o=0x5e6c53307530, arg=0x7ffd37def798) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:182
#8  0x00007c42c33c3f5f in QtPrivate::QCallableObject<void (Waylib::Server::WSurfaceItem::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=1, this_=0x5e6c5316a680, r=0x5e6c53307530, a=0x7ffd37def798, ret=0x0) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:553
#9  0x00007c42c0bc018d in QtPrivate::QSlotObjectBase::call (this=<optimized out>, r=0x5e6c53307530, a=0x7ffd37def798, this=<optimized out>, r=<optimized out>, a=<optimized out>)
    at /home/xyb/Documents/Deepin/qtbase-6.7.0/src/corelib/kernel/qobjectdefs_impl.h:469
#10 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /home/xyb/Documents/Deepin/qtbase-6.7.0/src/corelib/kernel/qobject.cpp:4078
#11 0x00007c42c2d88b2d in QWLRoots::QWSurface::commit (this=0x5e6c531cf9e0) at /home/xyb/Documents/Deepin/qwlroots/build_cmake/src/qwlroots_autogen/GZRP3O7STM/moc_qwcompositor.cpp:405
#12 0x00007c42c2dc8760 in QWLRoots::QWSurfacePrivate::on_commit (this=0x5e6c531d6140) at /home/xyb/Documents/Deepin/qwlroots/src/types/qwcompositor.cpp:164
#13 0x00007c42c2e828c1 in QWLRoots::callSlot1 (wl_listener=0x5e6c53155e98, data=0x5e6c532e9580) at /home/xyb/Documents/Deepin/qwlroots/src/util/qwsignalconnector.cpp:29
#14 0x00007c42c360f01e in wl_signal_emit_mutable () at /usr/lib/libwayland-server.so.0
#15 0x00007c42c2b44acf in surface_commit_state (surface=0x5e6c532e9580, next=0x5e6c532e9700) at ../types/wlr_compositor.c:502
#16 0x00007c42c2b44b85 in surface_handle_commit (client=0x5e6c524d4a20, resource=0x5e6c532a9b40) at ../types/wlr_compositor.c:521
#17 0x00007c42bf23c596 in ??? () at /usr/lib/libffi.so.8
#18 0x00007c42bf23900e in ??? () at /usr/lib/libffi.so.8
#19 0x00007c42bf23bbd3 in ffi_call () at /usr/lib/libffi.so.8
#20 0x00007c42c360dada in ??? () at /usr/lib/libwayland-server.so.0
#21 0x00007c42c3612180 in ??? () at /usr/lib/libwayland-server.so.0
#22 0x00007c42c3610ae2 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#23 0x00007c42c3378114 in operator() (__closure=0x5e6c524e7310) at /home/xyb/Documents/Deepin/waylib/src/server/kernel/wserver.cpp:112
#24 0x00007c42c3379e83 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, Waylib::Server::WServerPrivate::init()::<lambda()> >::call(struct {...} &, void **) (f=..., arg=0x7ffd37df01d8)
    at /usr/include/qt6/QtCore/qobjectdefs_impl.h:137
#25 0x00007c42c3379e1d in QtPrivate::FunctorCallable<Waylib::Server::WServerPrivate::init()::<lambda()> >::call<QtPrivate::List<>, void>(struct {...} &, void *, void **) (f=..., arg=0x7ffd37df01d8)
    at /usr/include/qt6/QtCore/qobjectdefs_impl.h:345
#26 0x00007c42c3379d44 in QtPrivate::QCallableObject<Waylib::Server::WServerPrivate::init()::<lambda()>, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *)
    (which=1, this_=0x5e6c524e7300, r=0x5e6c519d35c0, a=0x7ffd37df01d8, ret=0x0) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:555
#27 0x00007c42c0bc018d in QtPrivate::QSlotObjectBase::call (this=<optimized out>, r=0x5e6c519d35c0, a=0x7ffd37df01d8, this=<optimized out>, r=<optimized out>, a=<optimized out>)
    at /home/xyb/Documents/Deepin/qtbase-6.7.0/src/corelib/kernel/qobjectdefs_impl.h:469
#28 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /home/xyb/Documents/Deepin/qtbase-6.7.0/src/corelib/kernel/qobject.cpp:4078
#29 0x00007c42c0db7935 in QAbstractEventDispatcher::aboutToBlock (this=0x5e6c519ca840) at /home/xyb/Documents/Deepin/qtbase-6.7.0/cmake_build/src/corelib/Core_autogen/include/moc_qabstracteventdispatcher.cpp:152
#30 QEventDispatcherGlib::processEvents (this=0x5e6c519ca840, flags=...) at /home/xyb/Documents/Deepin/qtbase-6.7.0/src/corelib/kernel/qeventdispatcher_glib.cpp:381
#31 0x00007c42c0b74a75 in QEventLoop::processEvents (this=0x7ffd37df0320, flags=...) at /home/xyb/Documents/Deepin/qtbase-6.7.0/src/corelib/kernel/qeventloop.cpp:100
#32 QEventLoop::exec (this=0x7ffd37df0320, flags=...) at /home/xyb/Documents/Deepin/qtbase-6.7.0/src/corelib/kernel/qeventloop.cpp:182
#33 0x00007c42c0b6f2d4 in QCoreApplication::exec () at /home/xyb/Documents/Deepin/qtbase-6.7.0/src/corelib/global/qflags.h:74
#34 0x00005e6c19aa787e in main (argc=1, argv=0x7ffd37df0668) at /home/xyb/Documents/Deepin/treeland/src/treeland.cpp:406
(gdb) frame 4
#4  0x00007c42c33b830f in Waylib::Server::WSurfaceItem::onSurfaceCommit (this=0x5e6c53307530) at /home/xyb/Documents/Deepin/waylib/src/server/qtquick/wsurfaceitem.cpp:943
warning: Source file is more recent than executable.
943         if (d->beforeRequestResizeSurfaceStateSeq < d->surface->handle()->handle()->current.seq) {
(gdb) p d->surface
$1 = {wp = {d = 0x0, value = 0x0}}

LAUNCH-WAY | 启动方式

unknown

BACKEND | 启动后端

X11

STEPS TO REPRODUCE | 复现步骤

1,以X11模式启动treeland 2,启动xcb方式qtcreator

 DISPLAY=:1 QT_SCALE_FACTOR=2 qtcreator -platform xcb

OBSERVED RESULT | 观察到的结果

偶现treeland崩溃

EXPECTED RESULT | 期望的结果

treeland不会崩溃退出

ADDITIONAL INFORMATION | 额外补充

No response

lbwtw commented 1 month ago

https://github.com/vioken/waylib/pull/331 maybe fix!