[Interest] [SOLVED] Crash in QAbstractEventDispatcher::filterNativeEvent when trying to show a QMessageBox

Rainer Wiesenfarth rainer_wiesenfarth at trimble.com
Thu Apr 14 21:06:00 CEST 2022

On Thu, Apr 14, 2022 at 5:01 PM Thiago Macieira <thiago.macieira at intel.com>

> On Thursday, 14 April 2022 06:24:29 PDT Rainer Wiesenfarth wrote:
> > However, I am using QThread, and the crash happens
> > in a slot connected (queued connection) to a signal emitted by the thread
> > (m_pWorkerThread)
> Are you sure it was queued?
> Your backtrace stops in the QMessageBox::information, so we can't tell
> what it
> was called from.[...]

Hi, I finally found the root cause of the issue: I have an object created
in one thread, and destroyed in another one (by delete, not using
deleteLater()). This object happens to own a QFileSystemWatcher, and this
probably causes the crash - unfortunately some time later when the main
event loop is working on pending events...

After making sure the object is created and deleted by the same thread, the
problem vanishes.

Cheers, Rainer


Rainer Wiesenfarth
Senior Software Engineer
Geospatial Division

Rotebühlstr. 81, 70178 Stuttgart

Rainer_Wiesenfarth at trimble.com

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim, Eingetragen beim
Amtsgericht Darmstadt unter HRB 83893, Geschäftsführer: Rob Reeder, Jürgen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220414/8263123e/attachment.htm>

More information about the Interest mailing list