[Marble-devel] Using Marble library with Qt Embedded

Jeremie Scheer jeremie.scheer at armadeus.com
Thu May 24 09:39:47 UTC 2012


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20120524/95757cc0/attachment-0001.html>


More information about the Marble-devel mailing list