Bug 324572 - .osm files can't be loaded in parallel
Summary: .osm files can't be loaded in parallel
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: 1.6 (KDE 4.11)
Platform: unspecified All
: NOR crash
Target Milestone: ---
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-05 20:26 UTC by Bernhard Beschow
Modified: 2014-08-03 11:35 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Beschow 2013-09-05 20:26:40 UTC
.osm files can't be loaded in parallel since OsmParser has global state

Reproducible: Always

Steps to Reproduce:
1. Select at least two .osm files in File->Open
Actual Results:  
Marble becomes instable, possibly crashes

Expected Results:  
All .osm files should be loaded cleanly w/o crash
Comment 1 Bernhard Beschow 2014-08-03 11:35:26 UTC
Git commit 8ed8617f1243e58e5205f19e828bb5d25e8680ae by Bernhard Beschow.
Committed on 02/08/2014 at 18:34.
Pushed by beschow into branch 'KDE/4.14'.

merge all-static classes into OsmParser, turning global into instance variables

* multiple parser instances won't step onto each other's toes (global variables) any more, avoiding crashes

(cherry picked from commit 409ae1fc2c0e57506e4c73949d07c6ff32fe74b5)

M  +0    -4    src/plugins/runner/osm/CMakeLists.txt
M  +81   -9    src/plugins/runner/osm/OsmParser.cpp
M  +31   -0    src/plugins/runner/osm/OsmParser.h
M  +0    -1    src/plugins/runner/osm/handlers/OsmBoundTagHandler.cpp
M  +3    -2    src/plugins/runner/osm/handlers/OsmBoundsTagHandler.cpp
D  +0    -90   src/plugins/runner/osm/handlers/OsmGlobals.cpp
D  +0    -48   src/plugins/runner/osm/handlers/OsmGlobals.h
M  +11   -8    src/plugins/runner/osm/handlers/OsmMemberTagHandler.cpp
M  +8    -6    src/plugins/runner/osm/handlers/OsmNdTagHandler.cpp
D  +0    -44   src/plugins/runner/osm/handlers/OsmNodeFactory.cpp
D  +0    -48   src/plugins/runner/osm/handlers/OsmNodeFactory.h
M  +7    -5    src/plugins/runner/osm/handlers/OsmNodeTagHandler.cpp
M  +4    -3    src/plugins/runner/osm/handlers/OsmOsmTagHandler.cpp
D  +0    -44   src/plugins/runner/osm/handlers/OsmRelationFactory.cpp
D  +0    -51   src/plugins/runner/osm/handlers/OsmRelationFactory.h
M  +8    -6    src/plugins/runner/osm/handlers/OsmRelationTagHandler.cpp
M  +24   -29   src/plugins/runner/osm/handlers/OsmTagTagHandler.cpp
M  +0    -1    src/plugins/runner/osm/handlers/OsmTagTagHandler.h
D  +0    -46   src/plugins/runner/osm/handlers/OsmWayFactory.cpp
D  +0    -50   src/plugins/runner/osm/handlers/OsmWayFactory.h
M  +8    -5    src/plugins/runner/osm/handlers/OsmWayTagHandler.cpp

http://commits.kde.org/marble/8ed8617f1243e58e5205f19e828bb5d25e8680ae