[Development] [Q] Good way to handle QEvent::DeferredDelete

Elvis Lee(KwangWoong Lee) kwangwoong.lee at lge.com
Mon Dec 30 02:44:15 CET 2013


>-----Original Message-----
>
 >You're actually describing a bug (which is on-topic for dev@). As I said
 >in my other email, there's a condition under which the loop level is 1.
 >The level is incremented by 1 on entry to the new loop, plus 1 more when
 >delivering events.
 >But there are certain types of events (I don't remember which) that are
 >delivered without the second increment -- probably directly delivered
 >events inside QtQml and QtQuick, instead of using the regular mechanisms.
 >
 >Can you post a backtrace of the call to deleteLater(), when the loopLevel
 >is 1?
 >

Here it is.
It's not complete. I hope this is enough.

#0  QObject::deleteLater (this=0x62efc2e8)
    at
/qtbase/5.0.0-r6.0/qtbase-opensource-src-5.0.0/src/corelib/kernel/qobject.cp
p:1934
#1  0x76d54da0 in QSGContext::textureFactoryDestroyed (this=0x49e40,
o=<optimized out>)
    at
/qtdeclarative/5.0.0-r0.5/qtdeclarative-opensource-src-5.0.0/src/quick/scene
graph/qsgcontext.cpp:225
#2  0x7660e924 in QMetaObject::activate (sender=0x76c81528,
signalOffset=<optimized out>, local_signal_index=<optimized out>,
argv=0x7e830400)
    at
/qtbase/5.0.0-r6.0/qtbase-opensource-src-5.0.0/src/corelib/kernel/qobject.cp
p:3441
#3  0x7660f06c in QObject::destroyed (this=<optimized out>, _t1=0x7660f06c
<QObject::destroyed(QObject*)+56>) at
.moc/release-shared/moc_qobject.cpp:203
#4  0x76614460 in QObject::~QObject (this=0x65b74440, __in_chrg=<optimized
out>)
    at
/qtbase/5.0.0-r6.0/qtbase-opensource-src-5.0.0/src/corelib/kernel/qobject.cp
p:771
#5  0x76d37e20 in QQuickTextureFactory::~QQuickTextureFactory
(this=0x62ed9778, __in_chrg=<optimized out>)
    at
/qtdeclarative/5.0.0-r0.5/qtdeclarative-opensource-src-5.0.0/src/quick/util/
qquickimageprovider.cpp:81
#6  0x76e857bc in ~QQuickDefaultTextureFactory (this=0x62ed9778,
__in_chrg=<optimized out>)
    at
.moc/release-shared/../../../../../qtdeclarative-opensource-src-5.0.0/src/qu
ick/util/qquickpixmapcache_p.h:62
#7  QQuickDefaultTextureFactory::~QQuickDefaultTextureFactory
(this=0x62ed9778, __in_chrg=<optimized out>)
    at
.moc/release-shared/../../../../../qtdeclarative-opensource-src-5.0.0/src/qu
ick/util/qquickpixmapcache_p.h:62
#8  0x76d1adc0 in ~QQuickPixmapData (this=<optimized out>,
__in_chrg=<optimized out>)
    at
/qtdeclarative/5.0.0-r0.5/qtdeclarative-opensource-src-5.0.0/src/quick/util/
qquickpixmapcache.cpp:259
#9  QQuickPixmapStore::shrinkCache (this=0x666f82b8, remove=-8294401)
    at
/qtdeclarative/5.0.0-r0.5/qtdeclarative-opensource-src-5.0.0/src/quick/util/
qquickpixmapcache.cpp:821
#10 0x76d1af50 in QQuickPixmapStore::unreferencePixmap (this=0x666f82b8,
data=0x62eddb88)
    at
/qtdeclarative/5.0.0-r0.5/qtdeclarative-opensource-src-5.0.0/src/quick/util/
qquickpixmapcache.cpp:780
#11 0x76d1b804 in QQuickPixmap::clear (this=0x65d031e0, obj=<optimized out>)
    at
/qtdeclarative/5.0.0-r0.5/qtdeclarative-opensource-src-5.0.0/src/quick/util/
qquickpixmapcache.cpp:1248
#12 0x76dd70fc in QQuickImageBase::load (this=0x65d04b90)
    at
/qtdeclarative/5.0.0-r0.5/qtdeclarative-opensource-src-5.0.0/src/quick/items
/qquickimagebase.cpp:189
#13 0x76dd6e44 in QQuickImageBase::setSource (this=0x65d04b90, url=...)
    at
/qtdeclarative/5.0.0-r0.5/qtdeclarative-opensource-src-5.0.0/src/quick/items
/qquickimagebase.cpp:111
#14 0x76e95858 in QQuickImageBase::qt_metacall (this=0x65d04b90,
_c=QMetaObject::WriteProperty, _id=1, _a=0x7e8306d8) at
.moc/release-shared/moc_qquickimagebase_p.cpp:251
#15 0x76e95a9c in QQuickImage::qt_metacall (this=0x65d04b90,
_c=QMetaObject::WriteProperty, _id=<optimized out>, _a=0x7e8306d8) at
.moc/release-shared/moc_qquickimage_p.cpp:200
#16 0x765ee01c in metacall (argv=<optimized out>, idx=<optimized out>,
cl=<optimized out>, object=<optimized out>)
    at
/qtbase/5.0.0-r6.0/qtbase-opensource-src-5.0.0/src/corelib/kernel/qmetaobjec
t.cpp:307
#17 QMetaObject::metacall (object=<optimized out>,
cl=QMetaObject::WriteProperty, idx=43, argv=0x7e8306d8)
    at
/qtbase/5.0.0-r6.0/qtbase-opensource-src-5.0.0/src/corelib/kernel/qmetaobjec
t.cpp:302
#18 0x76b20574 in QQmlPropertyPrivate::write (object=0x65d04b90,
property=..., value=..., context=0x65d00120, flags=...)
    at
/qtdeclarative/5.0.0-r0.5/qtdeclarative-opensource-src-5.0.0/src/qml/qml/qqm
lproperty.cpp:1331
#19 0x76c1f3e8 in StoreProperty (engine=0x4c2f8, object=0x65d04b90,
property=0x65d2d9bc, value=...)
    at
/qtdeclarative/5.0.0-r0.5/qtdeclarative-opensource-src-5.0.0/src/qml/qml/v8/
qv8qobjectwrapper.cpp:693
#20 0x76c1ff2c in QV8QObjectWrapper::SetProperty (engine=0x4c2f8,
object=0x65d04b90, property=..., context=<optimized out>, value=...,
revisionMode=QV8QObjectWrapper::IgnoreRevision)
    at
/qtdeclarative/5.0.0-r0.5/qtdeclarative-opensource-src-5.0.0/src/qml/qml/v8/
qv8qobjectwrapper.cpp:741
#21 0x76c200d8 in QV8QObjectWrapper::Setter (property=..., value=...,
info=...)
    at
/qtdeclarative/5.0.0-r0.5/qtdeclarative-opensource-src-5.0.0/src/qml/qml/v8/
qv8qobjectwrapper.cpp:804
#22 0x762051fc in v8::internal::JSObject::SetPropertyWithInterceptor
(this=<optimized out>, name=<optimized out>, value=<optimized out>,
attributes=NONE, strict_mode=v8::internal::kNonStrictMode)
    at
/qtjsbackend/5.0.0-r1.0/qtjsbackend-opensource-src-5.0.0/src/3rdparty/v8/src
/objects.cc:1924
#23 0x7628ed44 in v8::internal::StoreInterceptorProperty (args=...,
isolate=<optimized out>)
    at
/qtjsbackend/5.0.0-r1.0/qtjsbackend-opensource-src-5.0.0/src/3rdparty/v8/src
/stub-cache.cc:1130
#24 0x3b60a0a8 in ?? ()
#25 0x3b60a0a8 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

I don't know what's here.
3b60a000-3b60b000 rwxp 00000000 00:00 0
3b60b000-3b60c000 ---p 00000000 00:00 0

Thanks.
Elvis.




More information about the Development mailing list