[osmosis-dev] osmosis --tee option leads to NullPointerException

Brett Henderson brett at bretth.com
Tue Jan 31 11:20:09 GMT 2012


Hi Thorsten,

On 27 January 2012 07:04, Thorsten Kukuk <kukuk at suse.de> wrote:

>
> Hi,
>
> normally I merge the osc files in my local planet copy and afterwards
> I extract some areas with help of polygons. This worked fine until
> osmosis 0.39, with 0.40.1 I get the attached
> java.lang.NullPointerException.
>
> That's still the case with the latest devel snapshot. osmosis 0.39
> works fine on the same data. I see this on three different 64bit
> linux systems with IBM Java, Sun Java 1.6.0 and 1.7.0.
>
> Any ideas what goes wrong here?
>

Thanks for the report.  I broke object cloning just after 0.39 was released
(the offending change was committed at Mon May 9 13:44:50 2011).

In your case you are using a combination of the --tee task and the
--bounding-polygon task with clipIncompleteEntities=true.  The --tee task
marks data as read-only in case both branches of the pipeline try to modify
the same data.  The clipIncompleteEntities option means that data needs to
be modified.  In order to modify a read-only object, Osmosis creates a copy
of the object.  This cloning logic was broken causing the failure you saw.

I've added a unit test and fixed the offending code.  Can you try updating
the latest development version and see if it fixes your problem?

Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20120131/2cc42423/attachment.html>


More information about the osmosis-dev mailing list