Hi Guys,
I'm trying to run a very basic QtLocation application. It contains only a QGraphicsView widget and I want to add a QGraphicsGeoMap item to this view's scene. The code compiles without errors but when I try to run the app I immediately get a segmentation fault.
Here's the code:
ui->setupUi(this);
ui->graphicsView->setScene(mapScene);
ui->graphicsView->setInteractive(true);
QGeoServiceProvider serviceProvider("nokia");
QGeoMappingManager *manager = serviceProvider.mappingManager();
QGraphicsGeoMap *geoMap = new QGraphicsGeoMap(manager);
ui->graphicsView->scene()->addItem(geoMap);
ui->setupUi(this);
QGraphicsScene *mapScene = new QGraphicsScene(this);
ui->graphicsView->setScene(mapScene);
ui->graphicsView->setInteractive(true);
QGeoServiceProvider serviceProvider("nokia");
QGeoMappingManager *manager = serviceProvider.mappingManager();
QGraphicsGeoMap *geoMap = new QGraphicsGeoMap(manager);
ui->graphicsView->scene()->addItem(geoMap);
To copy to clipboard, switch view to plain text mode
Here's the error:
Dump of assembler code for function ZNK10QtMobility29QGeoTiledMappingManagerEngine8tileSizeEv:
0x67022f08 <+0>: push %ebp
0x67022f09 <+1>: mov %esp,%ebp
0x67022f0b <+3>: mov 0x8(%ebp),%eax
0x67022f0e <+6>: mov 0x8(%eax),%eax
0x67022f11 <+9>: mov 0x30(%eax),%edx
0x67022f14 <+12>: mov 0x2c(%eax),%eax
0x67022f17 <+15>: leave
0x67022f18 <+16>: ret
0x67022f19 <+17>: nop
0x67022f1a <+18>: xchg %ax,%ax
End of assembler dump.
Dump of assembler code for function ZNK10QtMobility29QGeoTiledMappingManagerEngine8tileSizeEv:
0x67022f08 <+0>: push %ebp
0x67022f09 <+1>: mov %esp,%ebp
0x67022f0b <+3>: mov 0x8(%ebp),%eax
0x67022f0e <+6>: mov 0x8(%eax),%eax
0x67022f11 <+9>: mov 0x30(%eax),%edx
0x67022f14 <+12>: mov 0x2c(%eax),%eax
0x67022f17 <+15>: leave
0x67022f18 <+16>: ret
0x67022f19 <+17>: nop
0x67022f1a <+18>: xchg %ax,%ax
End of assembler dump.
To copy to clipboard, switch view to plain text mode
Last stack entries:
0 ZNK10QtMobility29QGeoTiledMappingManagerEngine8tileSizeEv C:\QtMobility\lib\QtLocation1.dll 0 0x67022f11
1 ZNK10QtMobility16QGeoTiledMapData22mapObjectsInScreenRectERK6QRectF C:\QtMobility\lib\QtLocation1.dll 0 0x6701bb77
2 ZN10QtMobility16QGeoTiledMapData8paintMapEP8QPainterPK24QStyleOptionGraphicsItem C:\QtMobility\lib\QtLocation1.dll 0 0x6701d26d
3 ZN10QtMobility15QGraphicsGeoMap11resizeEventEP25QGraphicsSceneResizeEvent C:\QtMobility\lib\QtLocation1.dll 0 0x670392be
4 ZN15QGraphicsWidget5eventEP6QEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6568af3f
5 ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6510fa38
6 ZN12QApplication6notifyEP7QObjectP6QEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6511825b
7 ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent C:\Qt\4.7.1\bin\QtCore4.dll 0 0x6a2b28f4
8 ZN15QGraphicsWidget11setGeometryERK6QRectF C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6568dbe8
9 ZN15QGraphicsWidget6resizeERK6QSizeF C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6568ba76
10 ZN15QGraphicsWidget10adjustSizeEv C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6568bbdf
11 ZN15QGraphicsWidget10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6568d11c
12 ZN14QGraphicsScene12setSceneRectERK6QRectF C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6565f800
13 ZN14QGraphicsScene9drawItemsEP8QPainteriPP13QGraphicsItemPK24QStyleOptionGraphicsItemP7QWidget C:\Qt\4.7.1\bin\QtGui4.dll 0 0x65666a10
14 ZN13QGraphicsView10paintEventEP11QPaintEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x65687590
15 ZN7QWidget5eventEP6QEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x651599ad
16 ZN6QFrame5eventEP6QEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x654901d9
17 ZN13QGraphicsView13viewportEventEP6QEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x65684100
18 ZN23QCoreApplicationPrivate29sendThroughObjectEventFiltersEP7QObjectP6QEvent C:\Qt\4.7.1\bin\QtCore4.dll 0 0x6a2b2013
19 ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6510fa1b
20 ZN12QApplication6notifyEP7QObjectP6QEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x651182f2
0 ZNK10QtMobility29QGeoTiledMappingManagerEngine8tileSizeEv C:\QtMobility\lib\QtLocation1.dll 0 0x67022f11
1 ZNK10QtMobility16QGeoTiledMapData22mapObjectsInScreenRectERK6QRectF C:\QtMobility\lib\QtLocation1.dll 0 0x6701bb77
2 ZN10QtMobility16QGeoTiledMapData8paintMapEP8QPainterPK24QStyleOptionGraphicsItem C:\QtMobility\lib\QtLocation1.dll 0 0x6701d26d
3 ZN10QtMobility15QGraphicsGeoMap11resizeEventEP25QGraphicsSceneResizeEvent C:\QtMobility\lib\QtLocation1.dll 0 0x670392be
4 ZN15QGraphicsWidget5eventEP6QEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6568af3f
5 ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6510fa38
6 ZN12QApplication6notifyEP7QObjectP6QEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6511825b
7 ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent C:\Qt\4.7.1\bin\QtCore4.dll 0 0x6a2b28f4
8 ZN15QGraphicsWidget11setGeometryERK6QRectF C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6568dbe8
9 ZN15QGraphicsWidget6resizeERK6QSizeF C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6568ba76
10 ZN15QGraphicsWidget10adjustSizeEv C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6568bbdf
11 ZN15QGraphicsWidget10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6568d11c
12 ZN14QGraphicsScene12setSceneRectERK6QRectF C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6565f800
13 ZN14QGraphicsScene9drawItemsEP8QPainteriPP13QGraphicsItemPK24QStyleOptionGraphicsItemP7QWidget C:\Qt\4.7.1\bin\QtGui4.dll 0 0x65666a10
14 ZN13QGraphicsView10paintEventEP11QPaintEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x65687590
15 ZN7QWidget5eventEP6QEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x651599ad
16 ZN6QFrame5eventEP6QEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x654901d9
17 ZN13QGraphicsView13viewportEventEP6QEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x65684100
18 ZN23QCoreApplicationPrivate29sendThroughObjectEventFiltersEP7QObjectP6QEvent C:\Qt\4.7.1\bin\QtCore4.dll 0 0x6a2b2013
19 ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x6510fa1b
20 ZN12QApplication6notifyEP7QObjectP6QEvent C:\Qt\4.7.1\bin\QtGui4.dll 0 0x651182f2
To copy to clipboard, switch view to plain text mode
I'm running Qt 4.7.1, QtMobility 1.1.0 and QtCreator 2.0.1 under Win 7.
I'd really appreciate any ideas how to solve this problem.
Bookmarks