[Development] Problem loading plugins with gcc 4.9.2
Sergio Martins
sergio.martins at kdab.com
Tue Mar 3 23:14:55 CET 2015
On Tuesday, March 03, 2015 11:45:49 Thiago Macieira wrote:
> On Tuesday 03 March 2015 13:55:29 Sergio Martins wrote:
> > Hi,
> >
> > So that you don't waste time pulling your hair out: plugin loading is
> > broken with gcc 4.9.2
> >
> > There's some clash between global static QFactoryLoader instances.
> > Reproduced on Archlinux (and on Fedora by jpnurmi).
>
> Please explain the problem.
The problem is that:
(gdb) bt
#0 (anonymous namespace)::Q_QGS_loader::innerFunction () at
accessible/qaccessible.cpp:462
#1 0x00007ffff6ff2250 in QGlobalStatic<QFactoryLoader, (anonymous
namespace)::Q_QGS_loader::innerFunction(), (anonymous
namespace)::Q_QGS_loader::guard>::operator()() (this=0x7ffff75d54f0 <_ZL6loader>)
at ../../include/QtCore/../../src/corelib/global/qglobalstatic.h:129
#2 0x00007ffff70020ab in QPlatformIntegrationFactory::create (platform=...,
paramList=..., argc=@0x7fffffffdd1c: 1, argv=0x7fffffffde28, platformPluginPath=...) at
kernel/qplatformintegrationfactory.cpp:73
#3 0x00007ffff700db47 in init_platform (pluginArgument=..., platformPluginPath=...,
platformThemeName=..., argc=@0x7fffffffdd1c: 1, argv=0x7fffffffde28) at
kernel/qguiapplication.cpp:1010
#4 0x00007ffff700ed7a in QGuiApplicationPrivate::createPlatformIntegration
(this=0x601a80) at kernel/qguiapplication.cpp:1165
In frame #2, we do loader(), which should create an instance of the "/platforms"
QFactoryLoader, but instead, it calls innerFunction() of a global static of another translation
unit (QFactoryLoader of "/accessible" plugins).
A simple fix is to use "loader" instead of "loader()"
Regards,
--
Sérgio Martins | sergio.martins at kdab.com | Software Engineer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150303/66d2a85a/attachment.html>
More information about the Development
mailing list