[OpenMap Users] Re: OMGraphicList.findAllTest throwing Null Pointer Exception

From: OpenMap Support <openmap_at_bbn.com>
Date: Fri, 20 Feb 2009 12:19:10 -0500

Hi Paul,

I've updated the code to have the fix (it was actually fixed in a
different branch but mistakenly left out of the release). I've update
the beta in cvs with the fixed version, which you can check out from
the website.

Hope this helps,

Don


On Feb 19, 2009, at 10:51 AM, Denys, Paul wrote:

> I hope I am wrong on this but a couple years ago a message about an
> OpenMap bug in 4.6.3 in OMGraphicList.findAll(...) described a bug.
> The bug apparently was in OMGraphicList.findAllTest(...), as
> described below in the original message. OpenMap throws a Null
> Pointer Exception when your OMGraphicList contains graphics that are
> not visible.
>
> This bug still seems to be in 4.6.4. See OMGraphicList.java line
> 1236, where the exception occurs. "if ((omd==null)||..." should be
> added. Any ideas for a work around (as I can not modify the library)?
>
> Thanks,
> Paul
>
>
>
> Re: [OpenMap Users] OpenMap Bug
>
> * This message: [ Message body <https://owa.us.lmco.com/dana-cached/help/empty.html
> > ] [ More options <https://lmpassage1.external.lmco.com/dana-cached/help/empty.html
> > ]
> * Related messages: [ Next message <https://lmpassage1.external.lmco.com/dana/home/launch.cgi?actor=browsebar&url=//4861.html
> > ] [ Previous message <https://lmpassage1.external.lmco.com/dana/home/launch.cgi?actor=browsebar&url=//4859.html
> > ] [ In reply to <https://lmpassage1.external.lmco.com/dana/home/launch.cgi?actor=browsebar&url=//4822.html
> > ]
>
> From: Don Dietrick <dietrick_at_bbn.com <mailto:dietrick_at_bbn.com?Subject=Re:%20
> [OpenMap%20Users]%20OpenMap%20Bug> >
> Date: Fri May 19 2006 - 10:32:25 EDT
> Thanks Philip! I've integrated your fix into the next release.
> Best regards,
> Don
> On May 2, 2006, at 10:58 AM, Monte Philip V NPRI wrote:
>> One of our developers found this:
>>
>> OMGraphicList.findAll(int x, int y, float limit) throws null
>> pointer exception.
>>
>> This is because it uses OMGraphicList.findAllTest(int x, int y,
>> float limit, boolean resetSelect, OMGraphicList addTo,OMGeometry
>> omg, OMDist omd)
>>
>> which calls OMGraphicList.findClosestTest(OMDist current, int
>> index,OMGeometry graphic, int x, int y, float limit, boolean
>> resetSelect) which returns null when graphic is not visible. This
>> normal operation null return value is not properly tested for in
>> findAllTest leading to the exception.
>>
>> Solution: change line 1223 of OMGraphicList.java (openmap 4.6.3) from
>> if (omd.omg == null) {
>> to
>> if ((omd==null)||(omd.omg == null)) {
>>
>>
>>
>> Philip V. Monte
>>
>> Software Engineer
>> Code 2514, Warfare Interoperability Branch
>> NAVSEA Warfare Centers Division Newport
>> (401) 832-5325
>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri Feb 20 2009 - 12:21:52 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT