This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Qt Marble app hangs with latest marble

Tags: None
(comma "," separated)
Philippe Renon
Registered Member
Posts
23
Karma
0
OS
Hi,

We recently took the latest Marble version and now our Qt application hangs at startup.

Here is backtrace that shows the issue:

Code: Select all
(gdb) backtrace
#0  0xb775a424 in __kernel_vsyscall ()
#1  0xb6409d4b in pthread_cond_wait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:187
#2  0xb64b5568 in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /home/filnet/OpenPilot/build/openpilotgcs_debug/bin/../lib/qt5/libQt5Core.so.5
#3  0xb64ae2ba in QSemaphore::acquire(int) ()
   from /home/filnet/OpenPilot/build/openpilotgcs_debug/bin/../lib/qt5/libQt5Core.so.5
#4  0xb670a9a9 in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const ()
   from /home/filnet/OpenPilot/build/openpilotgcs_debug/bin/../lib/qt5/libQt5Core.so.5
#5  0xb6710c91 in QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) ()
   from /home/filnet/OpenPilot/build/openpilotgcs_debug/bin/../lib/qt5/libQt5Core.so.5
#6  0xb6f4fabe in QNetworkConfigurationManagerPrivate::updateConfigurations() ()
   from /home/filnet/OpenPilot/build/openpilotgcs_debug/bin/../lib/qt5/libQt5Network.so.5
#7  0xb6f50031 in QNetworkConfigurationManagerPrivate::initialize() ()
   from /home/filnet/OpenPilot/build/openpilotgcs_debug/bin/../lib/qt5/libQt5Network.so.5
#8  0xb6f4b49c in qNetworkConfigurationManagerPrivate() ()
   from /home/filnet/OpenPilot/build/openpilotgcs_debug/bin/../lib/qt5/libQt5Network.so.5
#9  0xb6f4b56a in QNetworkConfigurationManager::QNetworkConfigurationManager(QObject*) ()
   from /home/filnet/OpenPilot/build/openpilotgcs_debug/bin/../lib/qt5/libQt5Network.so.5
#10 0xb6f064b9 in QNetworkAccessManager::QNetworkAccessManager(QObject*) ()
   from /home/filnet/OpenPilot/build/openpilotgcs_debug/bin/../lib/qt5/libQt5Network.so.5
#11 0xa97a25ec in Marble::HttpDownloadManager::Private::Private (this=0x99c98e8, policy=0x99b6964)
    at /home/filnet/OpenPilot/marble-master/src/lib/marble/HttpDownloadManager.cpp:55
#12 0xa97a2b0f in Marble::HttpDownloadManager::HttpDownloadManager (this=0x99b6974, policy=0x99b6964)
    at /home/filnet/OpenPilot/marble-master/src/lib/marble/HttpDownloadManager.cpp:96
#13 0xa97a94c9 in Marble::RemoteIconLoader::RemoteIconLoader (this=0x99c9890, parent=0x0)
    at /home/filnet/OpenPilot/marble-master/src/lib/marble/RemoteIconLoader.cpp:39
#14 0xa95acf1f in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535)
    at /home/filnet/OpenPilot/marble-master/src/lib/marble/geodata/data/GeoDataIconStyle.cpp:56
#15 _GLOBAL__sub_I_GeoDataIconStyle.cpp(void) ()
    at /home/filnet/OpenPilot/marble-master/src/lib/marble/geodata/data/GeoDataIconStyle.cpp:210
#16 0xb7769d77 in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0xbfd3ca84,
    env=env@entry=0xbfd3ca8c) at dl-init.c:78
#17 0xb7769e64 in call_init (env=0xbfd3ca8c, argv=0xbfd3ca84, argc=1, l=<optimized out>) at dl-init.c:36
#18 _dl_init (main_map=main_map@entry=0x99ca148, argc=1, argv=0xbfd3ca84, env=0xbfd3ca8c) at dl-init.c:126
---Type <return> to continue, or q <return> to quit---
#19 0xb776de8e in dl_open_worker (a=0xbfd3c20c) at dl-open.c:577
#20 0xb7769c26 in _dl_catch_error (objname=objname@entry=0xbfd3c204, errstring=errstring@entry=0xbfd3c208,
    mallocedp=mallocedp@entry=0xbfd3c203, operate=operate@entry=0xb776db90 <dl_open_worker>,
    args=args@entry=0xbfd3c20c) at dl-error.c:187
#21 0xb776d684 in _dl_open (
    file=0x9997a90 "/home/filnet/OpenPilot/build/openpilotgcs_debug/lib/openpilotgcs/plugins/OpenPilot/libMapGadget.so", mode=-2147483647, caller_dlopen=0xb66fad8f, nsid=<optimized out>, argc=1, argv=0xbfd3ca84, env=0xbfd3ca8c)
    at dl-open.c:661
#22 0xb55dccbc in dlopen_doit (a=0xbfd3c3c0) at dlopen.c:66
#23 0xb7769c26 in _dl_catch_error (objname=0x97b9e14, errstring=0x97b9e18, mallocedp=0x97b9e10,
    operate=0xb55dcc30 <dlopen_doit>, args=0xbfd3c3c0) at dl-error.c:187
#24 0xb55dd37c in _dlerror_run (operate=operate@entry=0xb55dcc30 <dlopen_doit>, args=args@entry=0xbfd3c3c0)
    at dlerror.c:163
#25 0xb55dcd71 in __dlopen (
    file=0x9997a90 "/home/filnet/OpenPilot/build/openpilotgcs_debug/lib/openpilotgcs/plugins/OpenPilot/libMapGadget.so", mode=1) at dlopen.c:87
#26 0xb66fad8f in ?? () from /home/filnet/OpenPilot/build/openpilotgcs_debug/bin/../lib/qt5/libQt5Core.so.5
#27 0xb66f1a74 in ?? () from /home/filnet/OpenPilot/build/openpilotgcs_debug/bin/../lib/qt5/libQt5Core.so.5
#28 0xb66f2306 in ?? () from /home/filnet/OpenPilot/build/openpilotgcs_debug/bin/../lib/qt5/libQt5Core.so.5
#29 0xb66e68ab in QPluginLoader::load() ()
   from /home/filnet/OpenPilot/build/openpilotgcs_debug/bin/../lib/qt5/libQt5Core.so.5
#30 0xb767eccc in ExtensionSystem::Internal::PluginSpecPrivate::loadLibrary (this=0x990dfc0)
    at /home/filnet/OpenPilot/ground/openpilotgcs/src/libs/extensionsystem/pluginspec.cpp:812
#31 0xb7677222 in ExtensionSystem::Internal::PluginManagerPrivate::loadPlugin (this=0x990b850, spec=0x9911700,
    destState=ExtensionSystem::PluginSpec::Loaded)
    at /home/filnet/OpenPilot/ground/openpilotgcs/src/libs/extensionsystem/pluginmanager.cpp:687
#32 0xb76762e7 in ExtensionSystem::Internal::PluginManagerPrivate::loadPlugins (this=0x990b850)
    at /home/filnet/OpenPilot/ground/openpilotgcs/src/libs/extensionsystem/pluginmanager.cpp:585
#33 0xb7674da6 in ExtensionSystem::PluginManager::loadPlugins (this=0xbfd3c998)
    at /home/filnet/OpenPilot/ground/openpilotgcs/src/libs/extensionsystem/pluginmanager.cpp:245
#34 0x08056db5 in main (argc=1, argv=0xbfd3ca84) at /home/filnet/OpenPilot/ground/openpilotgcs/src/app/main.cpp:561


The version we upgraded from is 93282bd67217327c2dcbca308e558d8070b73ba8 so the issue was probably introduced after that commit.

PS: we are compiling Marble with Qt 5.3.1 and Qt 5.2.1 : hang happens in both cases.

Regards,
Philippe.

Last edited by Philippe Renon on Sat Aug 23, 2014 10:50 pm, edited 1 time in total.
Philippe Renon
Registered Member
Posts
23
Karma
0
OS
I suspect that the introduction of RemoteIconLoader is somehow involved in the issue.

Could it be that the static RemoteIconLoader initialization happens too early (i.e. when the library is loaded) triggering the hang?

Code: Select all
class GeoDataIconStylePrivate
{
  public:
    GeoDataIconStylePrivate()
        : m_scale( 1.0 ),
        m_iconPath( MarbleDirs::path( "bitmaps/default_location.png" ) ),
        m_heading( 0 )
    {
    }

    GeoDataIconStylePrivate( const QImage& icon, const QPointF &hotSpot )
        : m_scale( 1.0 ),
          m_icon( icon ),
          m_hotSpot( hotSpot ),
          m_heading( 0 )
    {
    }

    const char* nodeType() const
    {
        return GeoDataTypes::GeoDataIconStyleType;
    }

    float            m_scale;

    QImage           m_icon;
    QString          m_iconPath;
    GeoDataHotSpot   m_hotSpot;
    int              m_heading;
    static RemoteIconLoader *m_remoteIconLoader;
};

RemoteIconLoader* GeoDataIconStylePrivate::m_remoteIconLoader = new RemoteIconLoader();
Philippe Renon
Registered Member
Posts
23
Karma
0
OS
Making the RemoteIconLoader non static fixes the issue.

But I am unsure of the implications of such a change. If many GeoDataIconStyle objects are created then as many RemoteIconLoader will be created with unknown side effects...
Philippe Renon
Registered Member
Posts
23
Karma
0
OS
A fix patch has been submitted.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Thanks for debugging and developing a fix for this. Has your patch been committed to the upstream repository?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Earthwings
KDE Developer
Posts
172
Karma
1
OS
Yes, I pushed review request 119922 as commit bee49c0.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]