joto / osmium

C++/Javascript framework for working with OSM files.
http://wiki.openstreetmap.org/wiki/Osmium
GNU General Public License v3.0
123 stars 31 forks source link

Ubuntu: Speicherzugriffsfehler #54

Closed fre391 closed 11 years ago

fre391 commented 11 years ago

Hi Jochen,

I might have found an issue as follows:

I downloaded some osm files from: http://download.geofabrik.de/openstreetmap/europe/germany/

When calling osmjs -l sparsetable -2 -m -j shape_export.js hamburg.osm osmjs throws an error like Speicherzugriffsfehler (Speicherabzug geschrieben)

For most of the downloaded files it runs fine. I just have the problem for: hamburg.osm brandenburg.osm sachsen-anhalt.osm sachsen.osm

All other files are processed without an error. As some of them are extremely more complex (like nordrhein-westfalen.osm) I don't think its an memory issue on my machine. There must be something wrong in the files?

Do you have an idea?

Greetings

Markus

joto commented 11 years ago

What version of Osmium are you using? If not the current git version, please try that one. Are you actually using the .osm files (ie the XML files and not the PBF files)? How much memory do you have? Are you on a 32 bit or 64 bit system? I just tried the current hamburg.osm.pbf and osm.bz2 and it worked for me. It needs about 2GB RAM. There is at least one memory leak that I know of in Osmium that gets triggered when there are invalid multipolygon relations. It could be that some files trigger this and others don't depending on how many invalid multipolygons they have. This could be independent of file size. But RAM would have to be really tight for this to matter. Please try to get a strack trace. After you run the program you get a "core" file. Install "gdb" (GNU debugger) and call it "gdb osmjs core". Type "bt" and send me the result.

fre391 commented 11 years ago

Hi Jochen,

well, as a novice in linux it took me a while to gather all the information :-)

at the reported time I was using Ubuntu 12.04 (32 bit) on a win 7 virtualbox (64 bit) with released memory of about 7 MB. I thought I was using the newest version of osmjs, but I might be wrong with it. And yes, I tried both - with pbf support and without.

Anyway, I have installed a fresh 12.04 (64 bit) version of ubuntu 12.04 meanwhile. Also I installed a fresh version of osmjs and now all files mentioned above run without any errors. Of course, except the usual geolocation issues :-) Even germany.osm runs now with my limited memory settings (with -l disk) - even in acceptable time. Great software...

Sorry, that I couldn't deliver more precise information. Would you still be interested into those? I would have a snapshot of my previous configuration to make some more tests. One question: What is the procedure to get the version number of osmjs installed on my machine?

Thanks for all your efforts...

Markus

joto commented 11 years ago

Osmium doesn't have version numbers. You'll have to look at the git commit you compiled it from, 'git log' would tell you that for instance.

I guess this was because some older version was used or a 32bit/64bit problem. It works now, so need to keep digging.

fre391 commented 11 years ago

Hi Jochen,

sorry, last sentence is a bit confusing for me...would you like me to give you more background information about the problem? It could read as if it works now, there is NO need to keep diggingminto the problem, right? Thx...

Markus

Am 01.11.2012 um 12:25 schrieb Jochen Topf notifications@github.com:

Osmium doesn't have version numbers. You'll have to look at the git commit you compiled it from, 'git log' would tell you that for instance.

I guess this was because some older version was used or a 32bit/64bit problem. It works now, so need to keep digging.

— Reply to this email directly or view it on GitHub.

joto commented 11 years ago

Sorry, I meant to say "no need". Case closed. :-)