[Solved] QObject::installEventFilter(): Cannot filter events for objects in a different thread.



  • Hi,

    I am just using a single thread but I get this warning:

    QObject::installEventFilter(): Cannot filter events for objects in a different thread.

    and my application just crashes after that.

    What should I look for to fix this?

    Regards


  • Moderators

    Hi,

    Did you make sure that you construct QCoreApplication/QGuiApplication/QApplication first, before doing anything else?

    Is this code for an application or a shared library?



    1. Yes
    2. Application


  • I will paste the backtrace if it helps:

    @
    #0 0x00007ffff5df0828 in QObject::installEventFilter (this=this@entry=0x3267ab0, obj=obj@entry=0x1e7d4c0) at kernel/qobject.cpp:1939
    #1 0x00007ffff6bbb3d1 in QAbstractItemView::commitData (this=<optimized out>, editor=0x3267ab0) at itemviews/qabstractitemview.cpp:2821
    #2 0x00007ffff6bb8788 in QAbstractItemView::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at .moc/moc_qabstractitemview.cpp:397
    #3 0x00007ffff5dea2a6 in QMetaObject::activate (sender=0x1e7d4c0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffffffb140) at kernel/qobject.cpp:3569
    #4 0x00007ffff5dea7d7 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7ffff706da40 QAbstractItemDelegate::staticMetaObject, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffffffb140) at kernel/qobject.cpp:3444
    #5 0x00007ffff6cfd13f in QAbstractItemDelegate::commitData (this=<optimized out>, _t1=0x3267ab0) at .moc/moc_qabstractitemdelegate.cpp:177
    #6 0x000000000098cf12 in wli::Characters_view_delegate::commit_and_close_editor (this=0x1e7d4c0) at /home/smita/wli/src/djinni_client/qt_ui/views/script/characters_view_delegate.cpp:252
    @



  • It was a memory corruption somewhere.
    Backtrace was misleading.

    Marking it as solved.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.