Hi,

Merkaartor revision 12405 (on linux i686 using QT 4.4.3) crashes reproducibly 
on the first mouseclick on any map object.


Here is a backtrace:

0x0815a247 in PropertiesDock::resetValues (this=0x83e7b38) at 
PropertiesDock.cpp:463
463                             QWidget* w = TrackPointUi.variableLayout-
>takeAt(0)->widget();

#0  0x0815a247 in PropertiesDock::resetValues (this=0x83e7b38) at 
PropertiesDock.cpp:463
#1  0x0815b85f in PropertiesDock::switchUi (this=0x83e7b38) at 
PropertiesDock.cpp:357
#2  0x0815c3ac in PropertiesDock::setSelection (this=0x83e7b38, 
aFeature=0x87b6ed8) at PropertiesDock.cpp:207
#3  0x080f6304 in EditInteraction::snapMousePressEvent (this=0x8973a60, 
ev=0xbfffe398, aLast=0x87b6ed8)
    at Interaction/EditInteraction.cpp:63
#4  0x080e81c1 in GenericFeatureSnapInteraction<MapFeature>::mousePressEvent 
(this=0x8973a60, event=0xbfffe398)
    at ./Interaction/Interaction.h:94
#5  0x080da6af in MapView::mousePressEvent (this=0x83ce450, event=0xbfffe398) 
at MapView.cpp:489
#6  0xb77b4a49 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#7  0x080dacd5 in MapView::event (this=0x83ce450, event=0xbfffe398) at 
MapView.cpp:769
#8  0xb775c8fc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () 
from /usr/lib/libQtGui.so.4
#9  0xb7765111 in QApplication::notify(QObject*, QEvent*) () from 
/usr/lib/libQtGui.so.4
#10 0xb71df961 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from 
/usr/lib/libQtCore.so.4
#11 0xb776439e in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, 
QWidget*, QWidget*, QWidget**, QPointer<QWidget>&) () from 
/usr/lib/libQtGui.so.4
#12 0xb77ce716 in ?? () from /usr/lib/libQtGui.so.4
#13 0xb77cdac5 in QApplication::x11ProcessEvent(_XEvent*) () from 
/usr/lib/libQtGui.so.4
#14 0xb77f608a in ?? () from /usr/lib/libQtGui.so.4
#15 0xb6fef9a8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#16 0xb6ff3063 in ?? () from /usr/lib/libglib-2.0.so.0
#17 0xb6ff3221 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#18 0xb7209fb8 in 
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () 
from /usr/lib/libQtCore.so.4
#19 0xb77f5785 in ?? () from /usr/lib/libQtGui.so.4
#20 0xb71de01a in 
QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from 
/usr/lib/libQtCore.so.4
#21 0xb71de1da in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () 
from /usr/lib/libQtCore.so.4
#22 0xb71e0895 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#23 0xb775c777 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#24 0x0812d34c in main (argc=Cannot access memory at address 0x1
) at Main.cpp:79

The attached patch seems to fix the problem.

All the best

Thomas


-- 
Dr. Thomas Siegmund
DeveloGen AG
Manager Bioinformatics


E-Mails können unvollständ

--- PropertiesDock.cpp.orig	2008-12-18 10:37:30.000000000 +0100
+++ PropertiesDock.cpp	2008-12-18 10:48:04.000000000 +0100
@@ -457,13 +457,14 @@
 			TrackPointUi.Id->setText(Pt->id());
 			TrackPointUi.Latitude->setText(QString::number(intToAng(Pt->position().lat()),'g',8));
 			TrackPointUi.Longitude->setText(QString::number(intToAng(Pt->position().lon()),'g',8));
 			TrackPointUi.TagView->setModel(theModel);
 			TrackPointUi.TagView->setItemDelegate(delegate);
-
-			QWidget* w = TrackPointUi.variableLayout->takeAt(0)->widget();
-			w->deleteLater();
+			while (TrackPointUi.variableLayout->takeAt(0)) {
+				QWidget* w = TrackPointUi.variableLayout->takeAt(0)->widget();
+				delete w;
+			}
 			if (theTemplates)
 				TrackPointUi.variableLayout->addWidget(theTemplates->getWidget(Pt));
 
 			CurrentTagView = TrackPointUi.TagView;
  
@@ -475,26 +476,28 @@
 		{
 			RoadUi.Id->setText(R->id());
 			//RoadUi.Name->setText(R->tagValue("name",""));
 			RoadUi.TagView->setModel(theModel);
 			RoadUi.TagView->setItemDelegate(delegate);
-
-			QWidget* w = RoadUi.variableLayout->takeAt(0)->widget();
-			w->deleteLater();
+			while (RoadUi.variableLayout->takeAt(0)) {
+				QWidget* w = RoadUi.variableLayout->takeAt(0)->widget();
+				delete w;
+			}
 			if (theTemplates)
 				RoadUi.variableLayout->addWidget(theTemplates->getWidget(R));
 
 			CurrentTagView = RoadUi.TagView;
 		}
 		else if (Relation* R = dynamic_cast<Relation*>(FullSelection[0]))
 		{
 			RelationUi.MembersView->setModel(R->referenceMemberModel(Main));
 			RelationUi.TagView->setModel(theModel);
 			RelationUi.TagView->setItemDelegate(delegate);
-
-			QWidget* w = RelationUi.variableLayout->takeAt(0)->widget();
-			w->deleteLater();
+			while (RoadUi.variableLayout->takeAt(0)) {
+				QWidget* w = RelationUi.variableLayout->takeAt(0)->widget();
+				delete w;
+			}
 			if (theTemplates)
 				RelationUi.variableLayout->addWidget(theTemplates->getWidget(R));
 			
 			CurrentTagView     = RelationUi.TagView;
 			CurrentMembersView = RelationUi.MembersView;
_______________________________________________
Merkaartor mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/merkaartor

Reply via email to