[Interest] Mac OS X Qt 5 QCoreApplication application crashes if linking with webenginewidgets

DAS Loop dasloop at gmail.com
Tue Apr 12 11:07:04 CEST 2016


Hi,

Instantiating a QApplication just for a dependency that will not be used is
too much. Removing the webenginewidgets requires some changes in the app
(move all the components that uses webenginewidgets to external dylibs and
load then on demand if we are using a QApplication instead of a
QCoreApplication).

If the current Qt behaviour is acceptable, I will change the app. But I´m
not sure about that. QtWebEngineCore::initialize uses QCoreApplication. It
seems to me that it should work without a full QApplication.

Thanks,

David

On Tue, Apr 12, 2016 at 10:31 AM, Croitor Alexandr <
alexandru.croitor at digia.com> wrote:

> Hi,
>
> Either remove the "QT += webenginewidgets" line so it does not link to the
> library,
> or replace the QCoreApplication with a QApplication instance.
>
> On 12 Apr 2016, at 10:18, DAS Loop <dasloop at gmail.com> wrote:
>
>
> Hi,
>
> While porting an app to Qt (Mac OS X SDK 10.11, QT 5.6) I have found a
> problem. A console app (no GUI) crashes because it loads a dylib that links
> with Qt WebEngine. The app never instantiates any object that uses Qt
> WebEngine. The crash happen in QtWebEngineCore::initialize because it tries
> to create a QOpenGLContext.
>
> There is any way to disable this behaviour other that changing my app?
>
> This sample reproduces the problem:
>
> console.pro
>
> TEMPLATE = app
> TARGET = console
> INCLUDEPATH += .
> SOURCES += main.cpp
> CONFIG += console
> CONFIG -= app_bundle
> QT += webenginewidgets
>
> main.cpp
>
> #include <QCoreApplication>
> #include <QWebEngineView>
>
> int main( int argc, char * argv[] )
> {
> QCoreApplication app( argc, argv );
> return 0;
> }
>
> Thanks,
>
> David
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
>


-- 
ALT David in a Loop
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160412/9d72aed8/attachment.html>


More information about the Interest mailing list