[Marble-devel] Using Marble library with Qt Embedded
Dennis Nienhüser
earthwings at gentoo.org
Fri May 25 19:28:25 UTC 2012
Hi Jeremie,
I found a static QSettings in one of the Marble classes which I removed.
Can you update to latest master and see if it makes a difference? That
should either (after reverting the qsettings change) postpone the
settings related crash or maybe even avoid it totally.
The warnings on the shell sound very much like an incomplete or empty
installation directory: Possibly the map themes, images and other
resources are either not installed or Marble searches for them in a
different location. Note that you can start marble using the
--marbledatapath=/some/other/path command line argument in the latter
case (that happens if CMAKE_INSTALL_PREFIX is different to the final
location where it gets executed, e.g. if you move everything to a
different folder after installation). See the documentation in [1]
I committed another change to master that makes it load the cursor
bitmaps from qrc (the library itself). Therefore you won't get that
crash again if it was really caused by the invalid cursor images.
Regards,
Dennis
[1] http://edu.kde.org/marble/obtain.php
On 25.05.2012 11:54, Jeremie Scheer wrote:
> Hi,
>
> It finally works ! But only in a Qt Virtual Framebuffer for the
> moment, not yet in the embedded system.
>
> What I've done is not very clean, but it seemed to fix the issue.
> I simply commented the QMutex lock in qsettings.cpp (method getPath()
> l.1166) that was going into a deadlock because the same mutex was
> called twice.
>
> But now I have a Segmentation fault when I try to execute the same
> application on my ARM platform.
>
> Map theme file does not exist: ""
> QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch
> failed: No such file or directory
> QFileSystemWatcher: failed to add paths:
> /root/.local/share/marble/maps/earth/placemarks/
> Segmentation fault
>
> I also have the same warnings when launching the app in a QVFB but it
> does not crash:
>
> Map theme file does not exist: ""
>
> QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch
> failed: No such file or directory
>
> QFileSystemWatcher: failed to add paths:
> /home/jeremie/.local/share/marble/maps/earth/placemarks/
>
> QCursor: Cannot create bitmap cursor; invalid bitmap(s)
>
> ...
>
> Base tiles for "earth/hillshading" not available. Skipping.
>
> QFSFileEngine::open: No file name specified
>
> Cannot open file '', because: No file name specified
>
>
> It seems as if the segmentation fault is related to the warning
> QCursor: Cannot create bitmap cursor; invalid bitmap(s) : the app
> crashes just before this message should be displayed on ARM system.
>
> Any idea of what can cause this crash ?
>
> Regards,
>
> Jérémie SCHEER
>
>
> On 05/24/2012 11:39 AM, Jeremie Scheer wrote:
>> Hi,
>>
>> I tried to search a bit further to find what can cause the issue.
>> When I put a breakpoint in Qt sources on the QMutex error message, if
>> I follow up the call chain from the breakpoint, I find the
>> constructor of QSettings that may be in cause.
>>
>> And in Marble, I found that QSettings is instanciated 2 times in
>> qtmain.cpp (main method) and QtMarbleConfigDialog.cpp (that is also
>> initialized in main() at first).
>>
>> The only strange thing is that I directly use MarbleWidget in Marble
>> library, so Marble main() method must not be called and both
>> QSettings never instanciated...
>>
>> Regards,
>>
>> Jérémie SCHEER
>>
>>
>> On 05/23/2012 04:49 PM, Jeremie Scheer wrote:
>>> In fact, it is even not loading the map theme, as it crashes before
>>> the first instruction of the main() method : if I put breakpoints in
>>> main(), it doesn't break on them, even at the first instruction, it
>>> simply runs and crashes...
>>>
>>> Regards,
>>> --
>>> Jérémie Scheer
>>> Software Engineer
>>> Tel: +33 (0)9 72 29 41 44
>>> Fax: +33 (0)9 72 28 79 26
>>> Armadeus Systems - A new vision of the embedded world
>>> http://www.armadeus.com
>>>
>>>
>>> On 05/23/2012 04:17 PM, Jeremie Scheer wrote:
>>>> I tried that also but I'm really not lucky : whatever the map theme
>>>> I choose to load in Marble widget, it crashes. So it doesn't seem
>>>> to be related neither.
>>>>
>>>> Regards,
>>>> --
>>>> Jérémie Scheer
>>>> Software Engineer
>>>> Tel: +33 (0)9 72 29 41 44
>>>> Fax: +33 (0)9 72 28 79 26
>>>> Armadeus Systems - A new vision of the embedded world
>>>> http://www.armadeus.com
>>>>
>>>>
>>>> On 05/23/2012 03:51 PM, Dennis Nienhüser wrote:
>>>>> Hi,
>>>>>
>>>>> can you try whether using the plain.dgml theme
>>>>> ("earth/plain/plain.dgml") instead of openstreetmap.dgml helps?
>>>>> This map theme does not have any texture layers. The texture
>>>>> layers make use of threads as well.
>>>>>
>>>>> Regards,
>>>>> Dennis
>>>>>
>>>>> Am 23.05.2012 15:36, schrieb Jeremie Scheer:
>>>>>> Hi,
>>>>>>
>>>>>> Thank you for your answer.
>>>>>>
>>>>>> Unfortunately it doesn't seem to be the plugins that cause the
>>>>>> thread issue.
>>>>>> I tried what you suggested me to do but I always run into the
>>>>>> same error with QMutex.
>>>>>>
>>>>>> It is the same error that makes my application crash in a Qt
>>>>>> Virtual Framebuffer or on ARM platform.
>>>>>>
>>>>>> Regards,
>>>>>> --
>>>>>> Jérémie Scheer
>>>>>> Software Engineer
>>>>>> Tel: +33 (0)9 72 29 41 44
>>>>>> Fax: +33 (0)9 72 28 79 26
>>>>>> Armadeus Systems - A new vision of the embedded world
>>>>>> http://www.armadeus.com
>>>>>>
>>>>>>
>>>>>> On 05/23/2012 01:25 PM, Dennis Nienhüser wrote:
>>>>>>> I started looking into it yesterday but Qt Embedded wasn't
>>>>>>> compiling on my system due to some known bug where glib and
>>>>>>> webkit interfere.
>>>>>>>
>>>>>>> I'd suggest trying to move all marble plugins away first (just
>>>>>>> remove them from lib/marble/plugins in the installation
>>>>>>> directory of marble) and see if that changes things. Might be
>>>>>>> some threading issue, the parser plugins working on startup for
>>>>>>> example run in their own thread each.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Dennis
>>>>>>>
>>>>>>> Am 23.05.2012 11:12, schrieb Jeremie Scheer:
>>>>>>>> Any idea ?
>>>>>>>>
>>>>>>>> Is it simply possible to use Marble in a Qt Virtual Framebuffer
>>>>>>>> with Qt Embedded ?
>>>>>>>>
>>>>>>>> I think it should be, because I found this link on the Internet
>>>>>>>> http://wm161.net/2008/07/26/marble-under-qtembedded-linux/ . A
>>>>>>>> little bit old but it shows that Marble could run under Qt
>>>>>>>> Embedded.
>>>>>>>>
>>>>>>>> I can't see what is the origin of the bug because I've no
>>>>>>>> QThread or QMutex in my application. It can only come from the
>>>>>>>> compilation of Marble...
>>>>>>>>
>>>>>>>> My Qt Embedded is configured like this:
>>>>>>>>
>>>>>>>> configure -embedded x86_64 -no-cups -no-nis -depths 16,18
>>>>>>>> -qvfb -prefix /usr/local/Trolltech/QtEmbedded-4.7.2 -glib
>>>>>>>> -confirm-license -qt-sql-sqlite
>>>>>>>>
>>>>>>>>
>>>>>>>> And I configure Marble to build against Qt like this:
>>>>>>>>
>>>>>>>> PATH=/usr/local/Trolltech/QtEmbedded-4.7.2/bin:$PATH cmake
>>>>>>>> -DQTONLY=ON ../marble_qvfb/
>>>>>>>>
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> Jérémie SCHEER
>>>>>>>>
>>>>>>>>
>>>>>>>> On 05/22/2012 04:13 PM, Jeremie Scheer wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I'm currently trying to use a Marble library built against _Qt
>>>>>>>>> 4.7.4 Embedded x86_.
>>>>>>>>>
>>>>>>>>> My application using Marble is built against the same Qt and
>>>>>>>>> is running in a Qt Virtual Framebuffer with a QWS Server.
>>>>>>>>>
>>>>>>>>> In the Qt project file, I simply added : /LIBS =
>>>>>>>>> -lmarblewidget/ to link with Marble. And when running the
>>>>>>>>> application, I defined the environment variable
>>>>>>>>> /LD_LIBRARY_PATH=/usr/local/lib/ where Marble libraries are
>>>>>>>>> installed.
>>>>>>>>>
>>>>>>>>> The problem is : when I run the application, before any
>>>>>>>>> instruction can be executed, it crashes on :
>>>>>>>>>
>>>>>>>>> QMutex::lock: Deadlock detected in thread 0x7f1fe30bb740
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Here is my application code :
>>>>>>>>>
>>>>>>>>> #include <QtGui/QApplication>
>>>>>>>>> #include <marble/MarbleWidget.h>
>>>>>>>>> #include <marble/MarbleModel.h>
>>>>>>>>> #include <marble/global.h>
>>>>>>>>> #include <QWSServer>
>>>>>>>>>
>>>>>>>>> using namespace Marble;
>>>>>>>>>
>>>>>>>>> int main(int argc, char** argv)
>>>>>>>>> {
>>>>>>>>> QApplication app(argc,argv);
>>>>>>>>> QWSServer *sw = QWSServer::instance ();
>>>>>>>>>
>>>>>>>>> // Create a Marble QWidget without a parent
>>>>>>>>> MarbleWidget *mapWidget = new MarbleWidget();
>>>>>>>>>
>>>>>>>>> // Load the OpenStreetMap map
>>>>>>>>>
>>>>>>>>> mapWidget->setMapThemeId("earth/openstreetmap/openstreetmap.dgml");
>>>>>>>>> mapWidget->setProjection(Mercator);
>>>>>>>>>
>>>>>>>>> mapWidget->show();
>>>>>>>>>
>>>>>>>>> return app.exec();
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> If I build the same application (without the QWS Server) and
>>>>>>>>> Marble against Qt x86, it works well.
>>>>>>>>>
>>>>>>>>> Is there anything I did wrong with Qt Embedded ?
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> --
>>>>>>>>> Jérémie Scheer
>>>>>>>>> Software Engineer
>>>>>>>>> Tel: +33 (0)9 72 29 41 44
>>>>>>>>> Fax: +33 (0)9 72 28 79 26
>>>>>>>>> ARMadeus Systems - A new vision of the embedded world
>>>>>>>>> http://www.armadeus.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Marble-devel mailing list
>>>>>>>>> Marble-devel at kde.org
>>>>>>>>> https://mail.kde.org/mailman/listinfo/marble-devel
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Jérémie Scheer
>>>>>>>> Software Engineer
>>>>>>>> Tel: +33 (0)9 72 29 41 44
>>>>>>>> Fax: +33 (0)9 72 28 79 26
>>>>>>>> ARMadeus Systems - A new vision of the embedded world
>>>>>>>> http://www.armadeus.com
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Marble-devel mailing list
>>>>>>>> Marble-devel at kde.org
>>>>>>>> https://mail.kde.org/mailman/listinfo/marble-devel
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Marble-devel mailing list
>>>>>>> Marble-devel at kde.org
>>>>>>> https://mail.kde.org/mailman/listinfo/marble-devel
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Marble-devel mailing list
>>>>>> Marble-devel at kde.org
>>>>>> https://mail.kde.org/mailman/listinfo/marble-devel
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Marble-devel mailing list
>>>>> Marble-devel at kde.org
>>>>> https://mail.kde.org/mailman/listinfo/marble-devel
>>>>
>>>>
>>>> _______________________________________________
>>>> Marble-devel mailing list
>>>> Marble-devel at kde.org
>>>> https://mail.kde.org/mailman/listinfo/marble-devel
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Marble-devel mailing list
>>> Marble-devel at kde.org
>>> https://mail.kde.org/mailman/listinfo/marble-devel
>>
>>
>> --
>> Jérémie Scheer
>> Software Engineer
>> Tel: +33 (0)9 72 29 41 44
>> Fax: +33 (0)9 72 28 79 26
>> Armadeus Systems - A new vision of the embedded world
>> http://www.armadeus.com
>>
>>
>> _______________________________________________
>> Marble-devel mailing list
>> Marble-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/marble-devel
>
>
> --
> Jérémie Scheer
> Software Engineer
> Tel: +33 (0)9 72 29 41 44
> Fax: +33 (0)9 72 28 79 26
> Armadeus Systems - A new vision of the embedded world
> http://www.armadeus.com
>
>
> _______________________________________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/listinfo/marble-devel
More information about the Marble-devel
mailing list