[Interest] big trouble with QCoreApplication

Thiago Macieira thiago.macieira at intel.com
Sat Apr 9 23:44:10 CEST 2016

On sábado, 9 de abril de 2016 18:18:19 PDT Freddy Martinez wrote:
>     QSettings* settings = new
> QSettings(qApp->applicationDirPath()+"/config/server.ini",QSettings::IniFor
> mat);

[Unrelated] You don't need new here.

> #1  0x00007fffe9b1d9bd
> in QtWebEngine::initialize() () from
> /home/freddy/Qt5.5.1/5.5/gcc_64/lib/libQt5WebEngine.so.5 
> #2 
> 0x00007ffff4f63688 in QCoreApplication::init() () from
> /home/freddy/Qt5.5.1/5.5/gcc_64/lib/libQt5Core.so.5 

This is not possible. QCoreApplication::init() does not call QtWebEngine. It's 
simply impossible for it to call that function directly. So we conclude that 
the backtrace is missing information.

The best theory is that there's a qAddPreRoutine for that function. Which is 
the case:

Conclusion: you linked to QtWebEngine, but you're using QCoreApplication. One 
of the two must change. To fix:

option 1: don't link to QtWebEngine
option 2: use QGuiApplication or QApplication

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

More information about the Interest mailing list