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

Crash on treeModel()->update();

Tags: None
(comma "," separated)
lzars
Registered Member
Posts
2
Karma
0

Crash on treeModel()->update();

Thu Aug 07, 2014 11:23 pm
Any help on this: ASSERT: "last < m_placemarkModel.rowCount()" in file ..\..\..\..\src\lib\marble\PlacemarkLayout.cpp, line 271

Code

marble = new Marble::MarbleWidget(this);
this->ui.horizontalLayout_4->addWidget(marble);

marble->setProjection(Marble::Mercator);
marble->setMapThemeId("earth/openstreetmap/openstreetmap.dgml");//
marble->setCenterLatitude(qreal(29.604411));
marble->setCenterLongitude(qreal(-98.529422));
marble->setDistance(1);

marble->setShowPlaces(true);

Marble::GeoDataDocument *document = new Marble::GeoDataDocument;
Marble::GeoDataPlacemark* wa = new Marble::GeoDataPlacemark("WellAware");
document->append(wa);
wa->setCoordinate(29.604411, -98.529422, 0.0, Marble::GeoDataCoordinates::Degree);
marble->model()->treeModel()->update();

Thanks!
User avatar
Earthwings
KDE Developer
Posts
172
Karma
1
OS

Re: Crash on treeModel()->update();

Sat Aug 09, 2014 7:28 am
I agree it shouldn't crash on that call, but don't you want to run this instead of update()?
Code: Select all
marble->model()->treeModel()->addDocument(document);
lzars
Registered Member
Posts
2
Karma
0

Re: Crash on treeModel()->update();

Mon Aug 11, 2014 1:28 pm
Yes, at one point I had that code, but i guess accidentally removed it.
But my core problem presets, once added I don't see the Placemark visible on the map. Shouldn't it be?


Bookmarks



Who is online

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