[osmosis-dev] [PATCH] --log-progress --buffer results in OsmosisRuntimeException: initialize has not been called

Richard Hansen rhansen at bbn.com
Sat Jan 14 21:11:46 GMT 2012


Hi all,

With the latest Git revision (43089ed), I get an OsmosisRuntimeException 
when I use --log-progress followed by --buffer.  For example:

osmosis -v \
     --rb massachusetts.osm.pbf --sort \
     --rb connecticut.osm.pbf --sort \
     --merge --log-progress --buffer --wb _combined.osm.pbf
...
org.openstreetmap.osmosis.core.OsmosisRuntimeException: initialize has 
not been called
        at 
org.openstreetmap.osmosis.core.store.DataPostbox.put(DataPostbox.java:288)
        at 
org.openstreetmap.osmosis.core.buffer.v0_6.EntityBuffer.process(EntityBuffer.java:48)
        at 
org.openstreetmap.osmosis.core.progress.v0_6.EntityProgressLogger.process(EntityProgressLogger.java:70)
        at 
org.openstreetmap.osmosis.core.sort.v0_6.EntitySorter.complete(EntitySorter.java:71)
        at 
crosby.binary.osmosis.OsmosisBinaryParser.complete(OsmosisBinaryParser.java:35)
        at 
crosby.binary.file.BlockInputStream.process(BlockInputStream.java:37)
        at crosby.binary.osmosis.OsmosisReader.run(OsmosisReader.java:45)
        at java.lang.Thread.run(Thread.java:679)

If I remove the --log-progress argument, it works as expected.

I chased this down to a missing call to sink.initialize() in 
EntityProgressLogger.initialize().  Attached is a patch that I believe 
fixes this bug.

-Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-missing-call-to-sink.initialize-in-EntityProgres.patch
Type: text/x-patch
Size: 2098 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20120114/fd073a1e/attachment.bin>


More information about the osmosis-dev mailing list