Hi David,

the crash also happens on git 1.1 and git master. I've filed the bug
here:
http://bugreports.qt.nokia.com/browse/QTMOBILITY-840

Unfortunately I wasn't aware that I have to use some markup, so now the
source code is messed up - sorry. Next time I know.

Cheers,
Conny


On Wed, 2010-12-08 at 23:55 +0100, [email protected] wrote:
> Hi,
> 
> If you're using Qt Mobility 1.1 it might be worth checking out the latest 
> code from the master branch in git and trying again.  If it still crashes, 
> please file a bug with the code and stack trace attached and we'll get on to 
> it.
> 
> Thanks for letting us know.
> 
> Cheers,
> 
> Dave
> 
> > -----Original Message-----
> > From: [email protected] [mailto:qt-mobility-
> > [email protected]] On Behalf Of ext Cornelius Hald
> > Sent: Wednesday, 8 December 2010 10:39 PM
> > To: [email protected]
> > Subject: [Qt-mobility-feedback] Removing map group objects == crash?
> > 
> > Hi,
> > 
> > I'm creating map group objects and add them to a map. Once I remove
> > them
> > my app segfaults. To me it looks like a bug, but before I file it it
> > would be nice if someone could tell me that I'm using the API
> > correctly.
> > 
> > In a subclass of QGraphicsGeoMap I'm creating map objects like this:
> > 
> > void MapWidget::addPoi(double lat, double lon, QString uuid)
> > {
> >     QGeoCoordinate coord(lat, lon);
> > 
> >     QPixmap pixmap(":qml/Common/img/poi_green.png");
> >     QGeoMapPixmapObject *pixMapObject = new QGeoMapPixmapObject(coord,
> > QPoint(-20,-70), pixmap);
> >     pixMapObject->setZValue(1);
> > 
> >     QGeoMapCircleObject *circle = new QGeoMapCircleObject(coord, 100);
> >     circle->setPen(QPen((QColor(255, 0, 0, 90))));
> >     circle->setBrush(QBrush(QColor(255, 0, 0, 90)));
> >     circle->setZValue(2);
> > 
> >     QGeoMapGroupObject *poi = new QGeoMapGroupObject();
> >     poi->addChildObject(circle);
> >     poi->addChildObject(pixMapObject);
> > 
> >     addMapObject(poi);
> > }
> > 
> > Now if I later call clearMapObjects() or removeMapObject() it crashes.
> > If I directly add circle objects or pixmap objects without using a
> > group
> > everything works fine.
> > 
> > Below is also a stack trace.
> > 
> > Cheers,
> > Conny
> > 
> > 
> > #0  0x00007ffff587f044 in QGraphicsItem::scene (this=0xe7f0e0) at
> > graphicsview/qgraphicsitem.cpp:1496
> > No locals.
> > #1  0x00007ffff58c916d in QGraphicsScene::removeItem (this=0xe79c00,
> > item=0xe7f0e0) at graphicsview/qgraphicsscene.cpp:2953
> >         newSceneVariant = {d = {data = {c = -112 '\220', i = -26224, u
> > =
> > 4294941072, b = 144, d = 6.9533558065393666e-310, f = -nan(0x7f9990),
> > real = 6.9533558065393666e-310, ll = 140737488329104, ull =
> > 140737488329104, o = 0x7fffffff9990, ptr = 0x7fffffff9990, shared =
> > 0x7fffffff9990}, type = 15256624, is_shared = 0, is_null = 0}}
> >         targetScene = <value optimized out>
> > #2  0x00007ffff7b600cc in
> > QtMobility::QGeoTiledMapObjectInfo::~QGeoTiledMapObjectInfo
> > (this=0xe7ed60, __in_chrg=<value optimized out>) at
> > maps/tiled/qgeotiledmapobjectinfo_p.cpp:69
> > No locals.
> > #3  0x00007ffff7b621d6 in
> > QtMobility::QGeoTiledMapPixmapObjectInfo::~QGeoTiledMapPixmapObjectInfo
> > (this=0xe7ed60, __in_chrg=<value optimized out>) at
> > maps/tiled/qgeotiledmappixmapobjectinfo_p.cpp:77
> > No locals.
> > #4  0x00007ffff7b7036c in QtMobility::QGeoMapObject::setMapData
> > (this=0xe7e0d0, mapData=0x0) at maps/qgeomapobject.cpp:229
> > No locals.
> > #5  0x00007ffff7b6f130 in QtMobility::QGeoMapGroupObject::setMapData
> > (this=0xe7e610, mapData=0x0) at maps/qgeomapgroupobject.cpp:201
> >         i = 0
> > #6  0x00007ffff7b6efd0 in
> > QtMobility::QGeoMapGroupObject::removeChildObject (this=0xe79c20,
> > childObject=0xe7e610) at maps/qgeomapgroupobject.cpp:166
> > No locals.
> > #7  0x00007ffff7b6c9ed in QtMobility::QGeoMapData::removeMapObject
> > (this=0xe7bd30, mapObject=0xe7e610) at maps/qgeomapdata.cpp:323
> > No locals.
> > #8  0x00007ffff7b886fb in QtMobility::QGraphicsGeoMap::removeMapObject
> > (this=0xe7bbd0, mapObject=0xe7e610) at maps/qgraphicsgeomap.cpp:438
> > No locals.
> > #9  0x000000000042b5b6 in MapWidget::clearPois (this=0xe7bbd0)
> > at ../../cuteschall/src/map_widget.cpp:135
> > 
> > _______________________________________________
> > Qt-mobility-feedback mailing list
> > [email protected]
> > http://lists.trolltech.com/mailman/listinfo/qt-mobility-feedback


_______________________________________________
Qt-mobility-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-mobility-feedback

Reply via email to