Lucene - Core
  1. Lucene - Core
  2. LUCENE-6520

Geo3D GeoPath: co-linear end-points result in NPE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.2
    • Fix Version/s: 5.3
    • Component/s: modules/spatial
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      FAILED: org.apache.lucene.spatial.spatial4j.Geo3dRptTest.testOperations

      {#2 seed=[4AB0FA45EF43F0C3:2240DF3E6EDF83C]}
      Stack Trace:
      java.lang.NullPointerException
              at __randomizedtesting.SeedInfo.seed([4AB0FA45EF43F0C3:2240DF3E6EDF83C]:0)
              at org.apache.lucene.spatial.spatial4j.geo3d.GeoPath$SegmentEndpoint.<init>(GeoPath.java:480)
              at org.apache.lucene.spatial.spatial4j.geo3d.GeoPath.done(GeoPath.java:121)
              at org.apache.lucene.spatial.spatial4j.Geo3dRptTest.randomQueryShape(Geo3dRptTest.java:195)
              at org.apache.lucene.spatial.prefix.RandomSpatialOpStrategyTestCase.testOperationRandomShapes(RandomSpatialOpStrategyTestCase.java:53)
              at org.apache.lucene.spatial.spatial4j.Geo3dRptTest.testOperations(Geo3dRptTest.java:100)
      

      Karl Wright says:

      This is happening because the endpoints that define two path segments are co-linear. There's a check for that too, but clearly it's not firing properly in this case for some reason.

        Issue Links

          Activity

          Hide
          David Smiley added a comment -

          First patch from Karl is here: https://reviews.apache.org/r/34994/

          Show
          David Smiley added a comment - First patch from Karl is here: https://reviews.apache.org/r/34994/
          Hide
          David Smiley added a comment -

          This patch has Karl's fix plus a test I wrote based on the randomized test failure that triggered it. If it looks good to you Karl, I'll commit.

          Show
          David Smiley added a comment - This patch has Karl's fix plus a test I wrote based on the randomized test failure that triggered it. If it looks good to you Karl, I'll commit.
          Hide
          Karl Wright added a comment -

          Looks fine to me. Thanks!

          Show
          Karl Wright added a comment - Looks fine to me. Thanks!
          Hide
          ASF subversion and git services added a comment -

          Commit 1683532 from David Smiley in branch 'dev/trunk'
          [ https://svn.apache.org/r1683532 ]

          LUCENE-6520: Geo3D GeoPath.done() would throw an NPE if adjacent path segments were co-linear

          Show
          ASF subversion and git services added a comment - Commit 1683532 from David Smiley in branch 'dev/trunk' [ https://svn.apache.org/r1683532 ] LUCENE-6520 : Geo3D GeoPath.done() would throw an NPE if adjacent path segments were co-linear
          Hide
          ASF subversion and git services added a comment -

          Commit 1683533 from David Smiley in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1683533 ]

          LUCENE-6520: Geo3D GeoPath.done() would throw an NPE if adjacent path segments were co-linear

          Show
          ASF subversion and git services added a comment - Commit 1683533 from David Smiley in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1683533 ] LUCENE-6520 : Geo3D GeoPath.done() would throw an NPE if adjacent path segments were co-linear
          Hide
          ASF subversion and git services added a comment -

          Commit 1684482 from David Smiley in branch 'dev/trunk'
          [ https://svn.apache.org/r1684482 ]

          LUCENE-6520: back-port to 5.2.1

          Show
          ASF subversion and git services added a comment - Commit 1684482 from David Smiley in branch 'dev/trunk' [ https://svn.apache.org/r1684482 ] LUCENE-6520 : back-port to 5.2.1
          Hide
          ASF subversion and git services added a comment -

          Commit 1684483 from David Smiley in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1684483 ]

          LUCENE-6520: back-port to 5.2.1

          Show
          ASF subversion and git services added a comment - Commit 1684483 from David Smiley in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1684483 ] LUCENE-6520 : back-port to 5.2.1
          Hide
          David Smiley added a comment -

          Woops; I started back-porting this but then realized that this bug is related to the WGS84 feature (BNGS-6487) which is in 5.3. I'll revert my commits to CHANGES.tx.

          Show
          David Smiley added a comment - Woops; I started back-porting this but then realized that this bug is related to the WGS84 feature (BNGS-6487) which is in 5.3. I'll revert my commits to CHANGES.tx.
          Hide
          ASF subversion and git services added a comment -

          Commit 1684485 from David Smiley in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1684485 ]

          LUCENE-6520: woops; revert attempted back-port (only CHANGES.txt)

          Show
          ASF subversion and git services added a comment - Commit 1684485 from David Smiley in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1684485 ] LUCENE-6520 : woops; revert attempted back-port (only CHANGES.txt)
          Hide
          ASF subversion and git services added a comment -

          Commit 1684488 from David Smiley in branch 'dev/trunk'
          [ https://svn.apache.org/r1684488 ]

          LUCENE-6520: woops; revert attempted back-port (only CHANGES.txt)

          Show
          ASF subversion and git services added a comment - Commit 1684488 from David Smiley in branch 'dev/trunk' [ https://svn.apache.org/r1684488 ] LUCENE-6520 : woops; revert attempted back-port (only CHANGES.txt)
          Hide
          ASF subversion and git services added a comment -

          Commit 1684491 from David Smiley in branch 'dev/trunk'
          [ https://svn.apache.org/r1684491 ]

          LUCENE-6535: Fix Geo3D bug in LUCENE-6520

          Show
          ASF subversion and git services added a comment - Commit 1684491 from David Smiley in branch 'dev/trunk' [ https://svn.apache.org/r1684491 ] LUCENE-6535 : Fix Geo3D bug in LUCENE-6520
          Hide
          Karl Wright added a comment -

          The fix for LUCENE-6535 makes no sense without this ticket. I think basically it would be hard to do this without going the whole way to the new code base.

          Show
          Karl Wright added a comment - The fix for LUCENE-6535 makes no sense without this ticket. I think basically it would be hard to do this without going the whole way to the new code base.
          Hide
          ASF subversion and git services added a comment -

          Commit 1684492 from David Smiley in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1684492 ]

          LUCENE-6535: Fix Geo3D bug in LUCENE-6520

          Show
          ASF subversion and git services added a comment - Commit 1684492 from David Smiley in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1684492 ] LUCENE-6535 : Fix Geo3D bug in LUCENE-6520
          Hide
          Shalin Shekhar Mangar added a comment -

          Bulk close for 5.3.0 release

          Show
          Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release

            People

            • Assignee:
              David Smiley
              Reporter:
              David Smiley
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development