[Interest] qtwayland compositor crashes on quit
Alexander Dyagilev
alervdvcw at gmail.com
Tue Apr 18 18:04:27 CEST 2023
Hello,
My suggestion for you: downgrade your app as much as possible to get a
minimal reproduce example. You can find the reason while you will be
doing this. Just cut cut and cut :)
On 4/17/2023 9:32 PM, Florian Hänel via Interest wrote:
> Hi,
>
>
> I am seeing our qtwayland/quick compositor crash when I issue quit and
> have clients still connected.
>
> It appears that surface destruction tries to remove itself from views
> and/or outputs but the output is already destroyed by deleteChildren
> from the quick application shutdown.
>
>
> What could I be missing? Do I need to manually disconnect clients upon
> shutdown?
>
> Valgrind log follows:
>
>
> ==1687982== Invalid write of size 4
> ==1687982== at 0x4946280: erase (qvector.h:936)
> ==1687982== by 0x4946280: remove (qvector.h:478)
> ==1687982== by 0x4946280:
> QWaylandOutputPrivate::removeView(QWaylandView*, QWaylandSurface*)
> (qwaylandoutput.cpp:237)
> ==1687982== by 0x4949B32: QWaylandView::~QWaylandView()
> (qwaylandview.cpp:95)
> ==1687982== by 0x4949B6C: QWaylandView::~QWaylandView()
> (qwaylandview.cpp:100)
> ==1687982== by 0x4977CA7: cleanup (qscopedpointer.h:60)
> ==1687982== by 0x4977CA7: ~QScopedPointer (qscopedpointer.h:107)
> ==1687982== by 0x4977CA7: ~QWaylandQuickItemPrivate
> (qwaylandquickitem_p.h:98)
> ==1687982== by 0x4977CA7: ~QWaylandQuickShellSurfaceItemPrivate
> (qwaylandquickshellsurfaceitem_p.h:56)
> ==1687982== by 0x4977CA7:
> QWaylandQuickShellSurfaceItemPrivate::~QWaylandQuickShellSurfaceItemPrivate()
> (qwaylandquickshellsurfaceitem_p.h:56)
> ==1687982== by 0xFA5A428: ~QQmlElement (qqmlprivate.h:144)
> ==1687982== by 0xFA5A428:
> QQmlPrivate::QQmlElement<QWaylandQuickShellSurfaceItem>::~QQmlElement()
> (qqmlprivate.h:144)
> ==1687982== by 0x59015FD: QObjectPrivate::deleteChildren() (in
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.6)
> ==1687982== by 0x590D743: QObject::~QObject() (in
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.6)
> ==1687982== by 0x63A5168: ??? (in
> /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5.15.6)
> ==1687982== by 0x59015FD: QObjectPrivate::deleteChildren() (in
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.6)
> ==1687982== by 0x590D743: QObject::~QObject() (in
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.6)
> ==1687982== by 0xFA68A6A: ~QWaylandQuickCompositor
> (qwaylandquickcompositor.h:42)
> ==1687982== by 0xFA68A6A:
> ~QWaylandQuickCompositorQuickExtensionContainer
> (qwaylandquickcompositorplugin.cpp:69)
> ==1687982== by 0xFA68A6A: ~QQmlElement (qqmlprivate.h:144)
> ==1687982== by 0xFA68A6A:
> QQmlPrivate::QQmlElement<QWaylandQuickCompositorQuickExtensionContainer>::~QQmlElement()
> (qqmlprivate.h:144)
> ==1687982== by 0x53F407D: QQmlApplicationEnginePrivate::cleanUp()
> (in /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5.15.6)
> ==1687982== Address 0xacd77a4 is 4 bytes inside a block of size 240
> free'd
> ==1687982== at 0x484727F: free (in
> /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==1687982== by 0x4944F4B: ~QVector (qvector.h:73)
> ==1687982== by 0x4944F4B: ~QVector (qvector.h:73)
> ==1687982== by 0x4944F4B:
> QWaylandOutputPrivate::~QWaylandOutputPrivate() (qwaylandoutput.cpp:104)
> ==1687982== by 0x494503C:
> QWaylandOutputPrivate::~QWaylandOutputPrivate() (qwaylandoutput.cpp:104)
> ==1687982== by 0xFA5AE1E: ~QWaylandQuickOutput
> (qwaylandquickoutput.h:43)
> ==1687982== by 0xFA5AE1E: ~QQmlElement (qqmlprivate.h:144)
> ==1687982== by 0xFA5AE1E:
> QQmlPrivate::QQmlElement<QWaylandQuickOutput>::~QQmlElement()
> (qqmlprivate.h:144)
> ==1687982== by 0x59015FD: QObjectPrivate::deleteChildren() (in
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.6)
> ==1687982== by 0x590D743: QObject::~QObject() (in
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.6)
> ==1687982== by 0xFA68A6A: ~QWaylandQuickCompositor
> (qwaylandquickcompositor.h:42)
> ==1687982== by 0xFA68A6A:
> ~QWaylandQuickCompositorQuickExtensionContainer
> (qwaylandquickcompositorplugin.cpp:69)
> ==1687982== by 0xFA68A6A: ~QQmlElement (qqmlprivate.h:144)
> ==1687982== by 0xFA68A6A:
> QQmlPrivate::QQmlElement<QWaylandQuickCompositorQuickExtensionContainer>::~QQmlElement()
> (qqmlprivate.h:144)
> ==1687982== by 0x53F407D: QQmlApplicationEnginePrivate::cleanUp()
> (in /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5.15.6)
> ==1687982== by 0x53F40CB:
> QQmlApplicationEngine::~QQmlApplicationEngine() (in
> /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5.15.6)
> ==1687982== by 0x11A30B: main (main.cpp:76)
> ==1687982== Block was alloc'd at
> ==1687982== at 0x4844899: malloc (in
> /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==1687982== by 0x56F42C1: QArrayData::allocate(unsigned long,
> unsigned long, unsigned long, QFlags<QArrayData::AllocationOption>)
> (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.6)
> ==1687982== by 0x49488DE: allocate (qarraydata.h:224)
> ==1687982== by 0x49488DE:
> QVector<QWaylandSurfaceViewMapper>::realloc(int,
> QFlags<QArrayData::AllocationOption>) (qvector.h:699)
> ==1687982== by 0x494642D: append (qvector.h:806)
> ==1687982== by 0x494642D:
> QWaylandOutputPrivate::addView(QWaylandView*, QWaylandSurface*)
> (qwaylandoutput.cpp:225)
> ==1687982== by 0x4949FB6: QWaylandView::setOutput(QWaylandOutput*)
> (qwaylandview.cpp:200)
> ==1687982== by 0x4950744: QWaylandQuickItem::handleSurfaceChanged()
> (qwaylandquickitem.cpp:950)
> ==1687982== by 0x590F6FE: ??? (in
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.6)
> ==1687982== by 0x494CD91:
> QWaylandQuickItem::setSurface(QWaylandSurface*)
> (qwaylandquickitem.cpp:422)
> ==1687982== by 0x12576A:
> QuickEmbeddedShellIntegration::QuickEmbeddedShellIntegration(QWaylandQuickShellSurfaceItem*)
> (embeddedshellextension.cpp:120)
> ==1687982== by 0x125947:
> EmbeddedShellSurface::createIntegration(QWaylandQuickShellSurfaceItem*)
> (embeddedshellextension.cpp:83)
> ==1687982== by 0x49774C5:
> QWaylandQuickShellSurfaceItem::setShellSurface(QWaylandShellSurface*)
> (qwaylandquickshellsurfaceitem.cpp:141)
> ==1687982== by 0x49BCBF2:
> QWaylandQuickShellSurfaceItem::qt_metacall(QMetaObject::Call, int,
> void**) (moc_qwaylandquickshellsurfaceitem.cpp:199)
> ==1687982==
>
>
> ==1687982== Invalid read of size 8
> ==1687982== at 0x49462D3: erase (qvector.h:914)
> ==1687982== by 0x49462D3: remove (qvector.h:478)
> ==1687982== by 0x49462D3: removeOne (qvector.h:185)
> ==1687982== by 0x49462D3:
> QWaylandOutputPrivate::removeView(QWaylandView*, QWaylandSurface*)
> (qwaylandoutput.cpp:233)
> ==1687982== by 0x4949B32: QWaylandView::~QWaylandView()
> (qwaylandview.cpp:95)
> ==1687982== by 0x4949B6C: QWaylandView::~QWaylandView()
> (qwaylandview.cpp:100)
> ==1687982== by 0x4977CA7: cleanup (qscopedpointer.h:60)
> ==1687982== by 0x4977CA7: ~QScopedPointer (qscopedpointer.h:107)
> ==1687982== by 0x4977CA7: ~QWaylandQuickItemPrivate
> (qwaylandquickitem_p.h:98)
> ==1687982== by 0x4977CA7: ~QWaylandQuickShellSurfaceItemPrivate
> (qwaylandquickshellsurfaceitem_p.h:56)
> ==1687982== by 0x4977CA7:
> QWaylandQuickShellSurfaceItemPrivate::~QWaylandQuickShellSurfaceItemPrivate()
> (qwaylandquickshellsurfaceitem_p.h:56)
> ==1687982== by 0xFA5A428: ~QQmlElement (qqmlprivate.h:144)
> ==1687982== by 0xFA5A428:
> QQmlPrivate::QQmlElement<QWaylandQuickShellSurfaceItem>::~QQmlElement()
> (qqmlprivate.h:144)
> ==1687982== by 0x59015FD: QObjectPrivate::deleteChildren() (in
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.6)
> ==1687982== by 0x590D743: QObject::~QObject() (in
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.6)
> ==1687982== by 0x63A5168: ??? (in
> /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5.15.6)
> ==1687982== by 0x59015FD: QObjectPrivate::deleteChildren() (in
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.6)
> ==1687982== by 0x590D743: QObject::~QObject() (in
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.6)
> ==1687982== by 0xFA68A6A: ~QWaylandQuickCompositor
> (qwaylandquickcompositor.h:42)
> ==1687982== by 0xFA68A6A:
> ~QWaylandQuickCompositorQuickExtensionContainer
> (qwaylandquickcompositorplugin.cpp:69)
> ==1687982== by 0xFA68A6A: ~QQmlElement (qqmlprivate.h:144)
> ==1687982== by 0xFA68A6A:
> QQmlPrivate::QQmlElement<QWaylandQuickCompositorQuickExtensionContainer>::~QQmlElement()
> (qqmlprivate.h:144)
> ==1687982== by 0x53F407D: QQmlApplicationEnginePrivate::cleanUp()
> (in /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5.15.6)
> ==1687982== Address 0xacd77c0 is 32 bytes inside a block of size 240
> free'd
> ==1687982== at 0x484727F: free (in
> /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==1687982== by 0x4944F4B: ~QVector (qvector.h:73)
> ==1687982== by 0x4944F4B: ~QVector (qvector.h:73)
> ==1687982== by 0x4944F4B:
> QWaylandOutputPrivate::~QWaylandOutputPrivate() (qwaylandoutput.cpp:104)
> ==1687982== by 0x494503C:
> QWaylandOutputPrivate::~QWaylandOutputPrivate() (qwaylandoutput.cpp:104)
> ==1687982== by 0xFA5AE1E: ~QWaylandQuickOutput
> (qwaylandquickoutput.h:43)
> ==1687982== by 0xFA5AE1E: ~QQmlElement (qqmlprivate.h:144)
> ==1687982== by 0xFA5AE1E:
> QQmlPrivate::QQmlElement<QWaylandQuickOutput>::~QQmlElement()
> (qqmlprivate.h:144)
> ==1687982== by 0x59015FD: QObjectPrivate::deleteChildren() (in
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.6)
> ==1687982== by 0x590D743: QObject::~QObject() (in
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.6)
> ==1687982== by 0xFA68A6A: ~QWaylandQuickCompositor
> (qwaylandquickcompositor.h:42)
> ==1687982== by 0xFA68A6A:
> ~QWaylandQuickCompositorQuickExtensionContainer
> (qwaylandquickcompositorplugin.cpp:69)
> ==1687982== by 0xFA68A6A: ~QQmlElement (qqmlprivate.h:144)
> ==1687982== by 0xFA68A6A:
> QQmlPrivate::QQmlElement<QWaylandQuickCompositorQuickExtensionContainer>::~QQmlElement()
> (qqmlprivate.h:144)
> ==1687982== by 0x53F407D: QQmlApplicationEnginePrivate::cleanUp()
> (in /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5.15.6)
> ==1687982== by 0x53F40CB:
> QQmlApplicationEngine::~QQmlApplicationEngine() (in
> /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5.15.6)
> ==1687982== by 0x11A30B: main (main.cpp:76)
> ==1687982== Block was alloc'd at
> ==1687982== at 0x4844899: malloc (in
> /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==1687982== by 0x56F42C1: QArrayData::allocate(unsigned long,
> unsigned long, unsigned long, QFlags<QArrayData::AllocationOption>)
> (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.6)
> ==1687982== by 0x49488DE: allocate (qarraydata.h:224)
> ==1687982== by 0x49488DE:
> QVector<QWaylandSurfaceViewMapper>::realloc(int,
> QFlags<QArrayData::AllocationOption>) (qvector.h:699)
> ==1687982== by 0x494642D: append (qvector.h:806)
> ==1687982== by 0x494642D:
> QWaylandOutputPrivate::addView(QWaylandView*, QWaylandSurface*)
> (qwaylandoutput.cpp:225)
> ==1687982== by 0x4949FB6: QWaylandView::setOutput(QWaylandOutput*)
> (qwaylandview.cpp:200)
> ==1687982== by 0x4950744: QWaylandQuickItem::handleSurfaceChanged()
> (qwaylandquickitem.cpp:950)
> ==1687982== by 0x590F6FE: ??? (in
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.6)
> ==1687982== by 0x494CD91:
> QWaylandQuickItem::setSurface(QWaylandSurface*)
> (qwaylandquickitem.cpp:422)
> ==1687982== by 0x12576A:
> QuickEmbeddedShellIntegration::QuickEmbeddedShellIntegration(QWaylandQuickShellSurfaceItem*)
> (embeddedshellextension.cpp:120)
> ==1687982== by 0x125947:
> EmbeddedShellSurface::createIntegration(QWaylandQuickShellSurfaceItem*)
> (embeddedshellextension.cpp:83)
> ==1687982== by 0x49774C5:
> QWaylandQuickShellSurfaceItem::setShellSurface(QWaylandShellSurface*)
> (qwaylandquickshellsurfaceitem.cpp:141)
> ==1687982== by 0x49BCBF2:
> QWaylandQuickShellSurfaceItem::qt_metacall(QMetaObject::Call, int,
> void**) (moc_qwaylandquickshellsurfaceitem.cpp:199)
>
>
More information about the Interest
mailing list