Opened 10 years ago

Closed 10 years ago

#1434 closed defect (fixed)

merkaartor crashes opening a saved mdc file

Reported by: h@… Owned by: cbro@…
Priority: major Milestone:
Component: merkaartor Version:
Keywords: Cc:

Description

hi,

when i try to open my saved .mdc file, merkaartor just crashes on osx. i don´t know why. now, i have to do my whole work again..

Attachments (3)

backtrace.txt (11.3 KB) - added by Homme Zwaagstra 10 years ago.
Complete backtrace
crash.mdc.bz2 (242.9 KB) - added by Homme Zwaagstra 10 years ago.
bzip2 compressed mdc file causing the crash
RoadCommands.cpp.patch (1.2 KB) - added by Homme Zwaagstra 10 years ago.
A patch for the RoadAddTrackPointCommand::fromXML function

Download all attachments as: .zip

Change History (9)

comment:1 Changed 10 years ago by Homme Zwaagstra

Summary: merkaartor chrases opening a saved mdc filemerkaartor crashes opening a saved mdc file

I've had the same problem. I'm using version 0.13-SVN. I tried to upload the .mdc file, but at 1.8M it hits the trac maximum file upload size. I'd be happy to email it, however.

comment:2 in reply to:  1 Changed 10 years ago by Homme Zwaagstra

Replying to homme:

I've had the same problem. I'm using version 0.13-SVN. I tried to upload the .mdc file, but at 1.8M it hits the trac maximum file upload size. I'd be happy to email it, however.

I forgot to say I'm running on linux:

$ uname -a
Linux peaches 2.6.25-gentoo-r8 #1 PREEMPT Fri Oct 17 12:11:05 BST 2008 i686 AMD Athlon(tm) XP 2800+ AuthenticAMD GNU/Linux

comment:3 Changed 10 years ago by Homme Zwaagstra

Here is a simple backtrace of the crash:

#0  0x08097e67 in MapLayer::add (this=0x0, aFeature=0x9ef9f68) at /usr/include/qt4/QtCore/qlist.h:264
#1  0x080a7e1d in MapFeature::getWayOrCreatePlaceHolder (theDocument=0x9bd2480, theLayer=0x0, Id=@0xbffa64d8) at Map/MapFeature.cpp:575
#2  0x080763bf in RoadAddTrackPointCommand::fromXML (d=0x9bd2480, e=@0xbffa65cc) at Command/RoadCommands.cpp:97
#3  0x0806516f in CommandList::fromXML (d=0x9bd2480, e=@0xbffa66c4) at Command/Command.cpp:282
#4  0x080666c6 in CommandHistory::fromXML (d=0x9bd2480, e=@0xbffa674c, progress=@0xbffa6838) at Command/Command.cpp:459
#5  0x0809123d in MapDocument::fromXML (e=@0xbffa68dc, version=1.1000000000000001, aDock=0x85f4a90, progress=@0xbffa6838) at Map/MapDocument.cpp:163
#6  0x081205e1 in MainWindow::loadDocument (this=0xbffa69ac, fn=@0xbffa6978) at MainWindow.cpp:1417
#7  0x08121514 in MainWindow::loadFiles (this=0xbffa69ac, fileList=@0xbffa6c04) at MainWindow.cpp:720
#8  0x0810e93c in main (argc=-1234697216, argv=0x0) at Main.cpp:43
#9  0xb6568fdc in __libc_start_main (main=0x810e7e0 <main>, argc=2, ubp_av=0xbffa6cc4, init=0x81ebf10 <__libc_csu_init>, fini=0x81ebf00 <__libc_csu_fini>, rtld_fini=0xb7f9a050 <_dl_fini>, stack_end=0xbffa6cbc) at libc-start.c:229
#10 0x080622b1 in _start ()

Changed 10 years ago by Homme Zwaagstra

Attachment: backtrace.txt added

Complete backtrace

comment:4 Changed 10 years ago by Homme Zwaagstra

I get the following error when starting up the program with the .mdc file as an argument

Qt: Session management error: Could not open network socket getting: "qrc:/Html/ymap.html?WIDTH=512&HEIGHT=512&BBOX=0.000000,0.000000,180.000000,-85.051129"

One of the layers I had open in the saved document was the yahoo aerial imagery. It appears that from the backtrace the crash is happening because features are trying to be added to a layer that is null (theLayer=0x0). Could this null layer be the yahoo map layer?

Changed 10 years ago by Homme Zwaagstra

Attachment: crash.mdc.bz2 added

bzip2 compressed mdc file causing the crash

Changed 10 years ago by Homme Zwaagstra

Attachment: RoadCommands.cpp.patch added

A patch for the RoadAddTrackPointCommand::fromXML function

comment:5 Changed 10 years ago by Homme Zwaagstra

The patch seems to work for me. I made it after discovering that the problem stemmed from the following line in the .mdc file:

<RoadAddTrackPointCommand road="3405582" xml:id="{89af8527-1f74-484d-8ecb-8bd79f7cacb3}" oldlayer="{5be108d5-148c-48f6-b79a-4d98fe37d091}" trackpoint="{111bb26f-2ec6-4b91-9e00-6c96e0a26ead}" pos="3" >

I'm not sure if the patch is correct, as if there are both "layer" *and* "oldlayer" attributes in the element then the latter will be used.

comment:6 Changed 10 years ago by Chris Browet

Resolution: fixed
Status: newclosed

(In [13050]) FIX : Cache preferences values for quicker access. FIX : Crash wen reloading MDC when no layer specified in the command XML (fixes #1434) ADD : "Offline" mode switch. ADD : Add a "Separate Move Mode" preference to remove "Move" mode. Moving features will be done from the "Edit" mode if deactivated. Only selected feature can be moved, then.

Note: See TracTickets for help on using tickets.