# VirtualBox crashes when Qt5 is built from source



## putin.is.a.thief (Jun 8, 2020)

Crashes on *FreeBSD 12.1-RELEASE*. QT5 is built from source, not installed as a dependency of some pkg. VirtualBox crashes in both build-from-source and installed-via-pkg forms:

```
$ virtualbox
Qt FATAL: ASSERT failure in [b]QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread[/b]. Current thread 0x0x808d5d3a0. Receiver '' (of type 'UITaskMediumEnumeration') was created in thread 0x0x8007f4050", file kernel/qcoreapplication.cpp, line 579
Qt FATAL: ASSERT failure in [b]QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread[/b]. Current thread 0x0x808d5d1a0. Receiver '' (of type 'UITaskMediumEnumeration') was created in thread 0x0x8007f4050", file kernel/qcoreapplication.cpp, line 579
Qt FATAL: Abort trap
```

Using quarterly ports branch (github.com/freebsd/freebsd-ports/tree/branches/2020Q2) and
quarterly pkg repo (pkg+http://pkg.freebsd.org/${ABI}/quarterly)
Versions:

```
$ pkg info|grep virtualbox
virtualbox-ose-5.2.34_4        General-purpose full virtualizer for x86 hardware
virtualbox-ose-kmod-5.2.34     VirtualBox kernel module for FreeBSD
```


```
$ pkg info|grep qt5
qt5-buildtools-5.13.2_1        Qt build tools
qt5-core-5.13.2_2              Qt core non-graphical module
qt5-dbus-5.13.2_1              Qt D-Bus inter-process communication module
qt5-declarative-5.13.2_1       Qt declarative framework for dynamic user interfaces
qt5-gui-5.13.2_3               Qt graphical user interface module
qt5-linguisttools-5.13.2_1     Qt localization tools
qt5-network-5.13.2             Qt network module
qt5-opengl-5.13.2              Qt 5-compatible OpenGL support module
qt5-printsupport-5.13.2        Qt print support module
qt5-qmake-5.13.2_2             Qt Makefile generator
qt5-sql-5.13.2                 Qt SQL database integration module
qt5-svg-5.13.2                 Qt SVG support module
qt5-testlib-5.13.2             Qt unit testing module
qt5-widgets-5.13.2_1           Qt C++ widgets module
qt5-x11extras-5.13.2           Qt platform-specific features for X11-based systems
qt5-xml-5.13.2                 Qt SAX and DOM implementations
qt5-xmlpatterns-5.13.2_1       Qt support for XPath, XQuery, XSLT and XML Schema
```

There is a guy telling this problem is related to Qt paths/versions conflict:
https://www.virtualbox.org/ticket/17149

Another discussion found:
https://stackoverflow.com/questions...nnot-send-events-to-objects-owned-by-a-differ


----------



## putin.is.a.thief (Jun 8, 2020)

VMs are actually available through VBoxManage headless run. However, this problem seems to exist longer  than 3 years.


----------



## putin.is.a.thief (Jun 8, 2020)

Duplicate: https://forums.virtualbox.org/viewtopic.php?f=40&t=98553


----------

