Skip to content

[Bug]: qml内存异常引起崩溃 #535

@zzxyb

Description

@zzxyb

SUMMARY | 问题概要

warning: 479	./src/corelib/kernel/qproperty_p.h: 没有那个文件或目录
[Current thread is 1 (Thread 0x7ffb31935ec0 (LWP 11866))]
(gdb) bt
#0  0x00007ffb384bd504 in QPropertyBindingDataPointer::firstObserver (this=<optimized out>) at ./src/corelib/kernel/qproperty_p.h:479
#1  QtPrivate::QPropertyBindingData::~QPropertyBindingData (this=0x556ba03ac138, this=<optimized out>) at ./src/corelib/kernel/qproperty.cpp:472
#2  0x00007ffb384bd7df in QBindingStoragePrivate::Pair::~Pair (this=0x556ba03ac130, this=<optimized out>) at ./src/corelib/kernel/qproperty.cpp:2166
#3  QBindingStoragePrivate::destroy (this=<optimized out>) at ./src/corelib/kernel/qproperty.cpp:2263
#4  QBindingStorage::clear (this=0x556b9e3f23d0) at ./src/corelib/kernel/qproperty.cpp:2301
#5  0x00007ffb384b2017 in QObject::~QObject (this=0x556ba047ac60, this=<optimized out>) at ./src/corelib/kernel/qobject.cpp:1024
#6  0x00007ffb369e18fc in QQmlContext::~QQmlContext (this=0x556ba047ac60, this=<optimized out>) at ./src/qml/qml/qqmlcontext.cpp:131
#7  QQmlContextData::~QQmlContextData (this=0x556ba090e100, this=<optimized out>) at ./src/qml/qml/qqmlcontextdata.cpp:175
#8  0x00007ffb3691c688 in QQmlContextData::release (this=0x556ba090e100) at ./src/qml/qml/qqmlcontextdata_p.h:52
#9  QQmlContextData::release (this=0x556ba090e100) at ./src/qml/qml/qqmlcontextdata_p.h:52
#10 QV4::Heap::QQmlContextWrapper::destroy (this=0x7ffb03d38500) at ./src/qml/jsruntime/qv4qmlcontext.cpp:45
#11 QV4::QQmlContextWrapper::virtualDestroy (b=0x7ffb03d38500) at ./src/qml/jsruntime/qv4qmlcontext_p.h:61
#12 0x00007ffb369907c8 in QV4::Chunk::sweep (this=0x7ffb03d30000, engine=0x556b9c1b81e0) at ./src/qml/memory/qv4mm.cpp:308
#13 0x00007ffb3699289b in operator() (c=<optimized out>, __closure=<synthetic pointer>) at ./src/qml/memory/qv4mm.cpp:565
#14 std::__partition<__gnu_cxx::__normal_iterator<QV4::Chunk**, std::vector<QV4::Chunk*> >, QV4::BlockAllocator::sweep()::<lambda(QV4::Chunk*)> > (__pred=..., __last=0xff08183aff061336, __first=0x7ffb03d30000)
    at /usr/include/c++/12/bits/stl_algo.h:1477
#15 std::partition<__gnu_cxx::__normal_iterator<QV4::Chunk**, std::vector<QV4::Chunk*> >, QV4::BlockAllocator::sweep()::<lambda(QV4::Chunk*)> > (__pred=..., __last=Python Exception <class 'gdb.error'>: value has been optimized out
, __first=Python Exception <class 'gdb.error'>: value has been optimized out
) at /usr/include/c++/12/bits/stl_algo.h:4632
#16 QV4::BlockAllocator::sweep (this=0x556b9c255f00) at ./src/qml/memory/qv4mm.cpp:564
#17 0x00007ffb369a1819 in QV4::(anonymous namespace)::doSweep (that=0x556b9cd3f670) at ./src/qml/memory/qv4mm.cpp:878
#18 0x00007ffb3699d440 in QV4::GCStateMachine::transition (this=0x556b9cd3f670) at ./src/qml/memory/qv4mm.cpp:1495
#19 QV4::GCStateMachine::transition (this=0x556b9cd3f670) at ./src/qml/memory/qv4mm.cpp:1477
#20 0x00007ffb384b0f3f in QObject::event (this=0x556b9cc8cb30, e=0x556ba0a27000) at ./src/corelib/kernel/qobject.cpp:1419
#21 0x00007ffb3846e938 in QCoreApplication::notifyInternal2 (receiver=0x556b9cc8cb30, event=0x556ba0a27000) at ./src/corelib/kernel/qcoreapplication.cpp:1165
#22 0x00007ffb384767d7 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x556b9c12ccf0) at ./src/corelib/kernel/qcoreapplication.cpp:1965
#23 0x00007ffb38664817 in postEventSourceDispatch (s=0x556b9c137da0) at ./src/corelib/kernel/qeventdispatcher_glib.cpp:246
#24 0x00007ffb358dee0f in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007ffb358e0e97 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007ffb358e14b0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007ffb38662070 in QEventDispatcherGlib::processEvents (this=0x556b9c0e9d00, flags=...) at ./src/corelib/kernel/qeventdispatcher_glib.cpp:396
#28 0x00007ffb3847767a in QEventLoop::exec (this=0x7ffc5ff1ade0, flags=...) at ./src/corelib/global/qflags.h:34
#29 0x00007ffb38471768 in QCoreApplication::exec () at ./src/corelib/global/qflags.h:74
#30 0x0000556b790d0655 in main (argc=1, argv=0x7ffc5ff1b058) at /home/xyb/Documents/Code/Github/treeland/src/main.cpp:48
(gdb) 

LAUNCH-WAY | 启动方式

lightdm

BACKEND | 启动后端

Wayland

STEPS TO REPRODUCE | 复现步骤

偶现崩溃,无固定复现步骤

OBSERVED RESULT | 观察到的结果

No response

EXPECTED RESULT | 期望的结果

No response

ADDITIONAL INFORMATION | 额外补充

No response

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions