[ 
https://issues.apache.org/jira/browse/LUCENE-8227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16417255#comment-16417255
 ] 

Karl Wright commented on LUCENE-8227:
-------------------------------------

Adding x-bounds logging yields the following dump:

{code}
   [junit4]   1> Computing new x bound for plane [A=0.6890973226271416, 
B=-0.6795484036912525; C=-0.2517118332315264; D=0.0]
   [junit4]   1>  x-bound point1: [X=-0.7253404115923568, 
Y=-0.6473134187879598, Z=-0.2381665352265543]
   [junit4]   1>  x-bound point2: [X=0.7253404115923568, Y=0.6473134187879598, 
Z=0.2381665352265543]
   [junit4]   1> Computing new x bound for plane [A=0.0, B=-0.6626477256017624; 
C=-0.7489312329945998; D=0.0]
   [junit4]   1>  x-bound point1: [X=-1.0011188539924791, Y=-0.0, Z=-0.0]
   [junit4]   1>  x-bound point2: [X=1.0011188539924791, Y=0.0, Z=0.0]
   [junit4]   1> Computing new x bound for plane [A=0.0, B=-1.0; 
C=2.5073042927637435E-16; D=0.0]
   [junit4]   1>  x-bound point1: [X=-1.0011188539924791, Y=-0.0, Z=0.0]
   [junit4]   1>  x-bound point2: [X=1.0011188539924791, Y=0.0, Z=-0.0]
   [junit4]   1> Computing new x bound for plane [A=-0.12218735010855987, 
B=-0.9604628616740691; C=-0.25016263273779726; D=0.0]
   [junit4]   1>  x-bound point1: [X=-0.9936143682718389, 
Y=0.11842468105083435, Z=0.030638463267361405]
   [junit4]   1>  x-bound point2: [X=0.9936143682718389, 
Y=-0.11842468105083435, Z=-0.030638463267361405]
   [junit4]   1> Computing new x bound for plane [A=-0.2623138822938212, 
B=-0.9602137546257182; C=0.09581739186350438; D=0.0]
   [junit4]   1>  x-bound point1: [X=-0.9660600853870557, 
Y=0.26132624795300813, Z=-0.02590253971121584]
   [junit4]   1>  x-bound point2: [X=0.9660600853870557, 
Y=-0.26132624795300813, Z=0.02590253971121584]
   [junit4]   1> Computing new x bound for plane [A=0.6890973226271416, 
B=-0.6795484036912525; C=-0.2517118332315264; D=0.0]
   [junit4]   1>  x-bound point1: [X=-0.7253404115923568, 
Y=-0.6473134187879598, Z=-0.2381665352265543]
   [junit4]   1>  x-bound point2: [X=0.7253404115923568, Y=0.6473134187879598, 
Z=0.2381665352265543]
   [junit4]   1> Computing new x bound for plane [A=0.0, B=-0.6626477256017624; 
C=-0.7489312329945998; D=0.0]
   [junit4]   1>  x-bound point1: [X=-1.0011188539924791, Y=-0.0, Z=-0.0]
   [junit4]   1>  x-bound point2: [X=1.0011188539924791, Y=0.0, Z=0.0]
   [junit4]   1> Computing new x bound for plane [A=0.0, B=-1.0; 
C=2.5073042927637435E-16; D=0.0]
   [junit4]   1>  x-bound point1: [X=-1.0011188539924791, Y=-0.0, Z=0.0]
   [junit4]   1>  x-bound point2: [X=1.0011188539924791, Y=0.0, Z=-0.0]
   [junit4]   1> Computing new x bound for plane [A=-0.12218735010855987, 
B=-0.9604628616740691; C=-0.25016263273779726; D=0.0]
   [junit4]   1>  x-bound point1: [X=-0.9936143682718389, 
Y=0.11842468105083435, Z=0.030638463267361405]
   [junit4]   1>  x-bound point2: [X=0.9936143682718389, 
Y=-0.11842468105083435, Z=-0.030638463267361405]
   [junit4]   1> Computing new x bound for plane [A=-0.2623138822938212, 
B=-0.9602137546257182; C=0.09581739186350438; D=0.0]
   [junit4]   1>  x-bound point1: [X=-0.9660600853870557, 
Y=0.26132624795300813, Z=-0.02590253971121584]
   [junit4]   1>  x-bound point2: [X=0.9660600853870557, 
Y=-0.26132624795300813, Z=0.02590253971121584]
   [junit4]   1> Computing new x bound for plane [A=0.6890973226271416, 
B=-0.6795484036912525; C=-0.2517118332315264; D=0.0]
   [junit4]   1>  x-bound point1: [X=-0.7253404115923568, 
Y=-0.6473134187879598, Z=-0.2381665352265543]
   [junit4]   1>  x-bound point2: [X=0.7253404115923568, Y=0.6473134187879598, 
Z=0.2381665352265543]
   [junit4]   1> Computing new x bound for plane [A=0.0, B=-0.6626477256017624; 
C=-0.7489312329945998; D=0.0]
   [junit4]   1>  x-bound point1: [X=-1.0011188539924791, Y=-0.0, Z=-0.0]
   [junit4]   1>  x-bound point2: [X=1.0011188539924791, Y=0.0, Z=0.0]
   [junit4]   1> Computing new x bound for plane [A=0.0, B=-1.0; 
C=2.5073042927637435E-16; D=0.0]
   [junit4]   1>  x-bound point1: [X=-1.0011188539924791, Y=-0.0, Z=0.0]
   [junit4]   1>  x-bound point2: [X=1.0011188539924791, Y=0.0, Z=-0.0]
   [junit4]   1> Computing new x bound for plane [A=-0.12218735010855987, 
B=-0.9604628616740691; C=-0.25016263273779726; D=0.0]
   [junit4]   1>  x-bound point1: [X=-0.9936143682718389, 
Y=0.11842468105083435, Z=0.030638463267361405]
   [junit4]   1>  x-bound point2: [X=0.9936143682718389, 
Y=-0.11842468105083435, Z=-0.030638463267361405]
   [junit4]   1> Computing new x bound for plane [A=-0.2623138822938212, 
B=-0.9602137546257182; C=0.09581739186350438; D=0.0]
   [junit4]   1>  x-bound point1: [X=-0.9660600853870557, 
Y=0.26132624795300813, Z=-0.02590253971121584]
   [junit4]   1>  x-bound point2: [X=0.9660600853870557, 
Y=-0.26132624795300813, Z=0.02590253971121584]
   [junit4]   1> Computing new x bound for plane [A=0.6890973226271416, 
B=-0.6795484036912525; C=-0.2517118332315264; D=0.0]
   [junit4]   1>  x-bound point1: [X=-0.7253404115923568, 
Y=-0.6473134187879598, Z=-0.2381665352265543]
   [junit4]   1>  x-bound point2: [X=0.7253404115923568, Y=0.6473134187879598, 
Z=0.2381665352265543]
   [junit4]   1> Computing new x bound for plane [A=0.0, B=-0.6626477256017624; 
C=-0.7489312329945998; D=0.0]
   [junit4]   1>  x-bound point1: [X=-1.0011188539924791, Y=-0.0, Z=-0.0]
   [junit4]   1>  x-bound point2: [X=1.0011188539924791, Y=0.0, Z=0.0]
   [junit4]   1> Computing new x bound for plane [A=0.0, B=-1.0; 
C=2.5073042927637435E-16; D=0.0]
   [junit4]   1>  x-bound point1: [X=-1.0011188539924791, Y=-0.0, Z=0.0]
   [junit4]   1>  x-bound point2: [X=1.0011188539924791, Y=0.0, Z=-0.0]
   [junit4]   1> Computing new x bound for plane [A=-0.12218735010855987, 
B=-0.9604628616740691; C=-0.25016263273779726; D=0.0]
   [junit4]   1>  x-bound point1: [X=-0.9936143682718389, 
Y=0.11842468105083435, Z=0.030638463267361405]
   [junit4]   1>  x-bound point2: [X=0.9936143682718389, 
Y=-0.11842468105083435, Z=-0.030638463267361405]
   [junit4]   1> Computing new x bound for plane [A=-0.2623138822938212, 
B=-0.9602137546257182; C=0.09581739186350438; D=0.0]
   [junit4]   1>  x-bound point1: [X=-0.9660600853870557, 
Y=0.26132624795300813, Z=-0.02590253971121584]
   [junit4]   1>  x-bound point2: [X=0.9660600853870557, 
Y=-0.26132624795300813, Z=0.02590253971121584]
{code}

There are a number of points which would extend the bounds sufficiently, but 
they seemingly are discarded because they're outside of the membership of the 
plane intersection.  The one we accept is this one:

{code}
[junit4]   1> Computing new x bound for plane [A=-0.12218735010855987, 
B=-0.9604628616740691; C=-0.25016263273779726; D=0.0]
[junit4]   1>  x-bound point1: [X=-0.9936143682718389, Y=0.11842468105083435, 
Z=0.030638463267361405]
[junit4]   1>  x-bound point2: [X=0.9936143682718389, Y=-0.11842468105083435, 
Z=-0.030638463267361405]
{code}

But we apparently reject this one (and shouldn't):

{code}
[junit4]   1> Computing new x bound for plane [A=-0.2623138822938212, 
B=-0.9602137546257182; C=0.09581739186350438; D=0.0]
[junit4]   1>  x-bound point1: [X=-0.9660600853870557, Y=0.26132624795300813, 
Z=-0.02590253971121584]
[junit4]   1>  x-bound point2: [X=0.9660600853870557, Y=-0.26132624795300813, 
Z=0.02590253971121584]
{code}


> TestGeo3DPoint.testGeo3DRelations() reproducing failures
> --------------------------------------------------------
>
>                 Key: LUCENE-8227
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8227
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: general/test, modules/spatial3d
>            Reporter: Steve Rowe
>            Assignee: Karl Wright
>            Priority: Major
>
> Three failures: two NPEs and one assert "assess edge that ends in a crossing 
> can't both up and down":
> 1.a. (NPE) From 
> [https://builds.apache.org/job/Lucene-Solr-NightlyTests-master/1512/]:
> {noformat}
>    [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestGeo3DPoint 
> -Dtests.method=testGeo3DRelations -Dtests.seed=C1F88333EC85EAE0 
> -Dtests.multiplier=2 -Dtests.nightly=true -Dtests.slow=true 
> -Dtests.linedocsfile=/home/jenkins/jenkins-slave/workspace/Lucene-Solr-NightlyTests-master/test-data/enwiki.random.lines.txt
>  -Dtests.locale=ga -Dtests.timezone=America/Ojinaga -Dtests.asserts=true 
> -Dtests.file.encoding=UTF-8
>    [junit4] ERROR   10.4s J1 | TestGeo3DPoint.testGeo3DRelations <<<
>    [junit4]    > Throwable #1: java.lang.NullPointerException
>    [junit4]    >      at 
> __randomizedtesting.SeedInfo.seed([C1F88333EC85EAE0:7187FEA763C8447C]:0)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$DualCrossingEdgeIterator.countCrossingPoint(GeoComplexPolygon.java:1382)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$DualCrossingEdgeIterator.matches(GeoComplexPolygon.java:1283)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$Node.traverse(GeoComplexPolygon.java:564)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$Node.traverse(GeoComplexPolygon.java:572)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$Node.traverse(GeoComplexPolygon.java:569)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$Tree.traverse(GeoComplexPolygon.java:660)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$Tree.traverse(GeoComplexPolygon.java:646)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon.isWithin(GeoComplexPolygon.java:370)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoBaseMembershipShape.isWithin(GeoBaseMembershipShape.java:36)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoBaseShape.getBounds(GeoBaseShape.java:35)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon.getBounds(GeoComplexPolygon.java:440)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.TestGeo3DPoint.testGeo3DRelations(TestGeo3DPoint.java:225)
>    [junit4]    >      at java.lang.Thread.run(Thread.java:748)
> {noformat}
> 1.b. (NPE) From 
> [https://builds.apache.org/job/Lucene-Solr-SmokeRelease-7.x/184/]:
> {noformat}
>    [smoker]    [junit4]   2> NOTE: reproduce with: ant test  
> -Dtestcase=TestGeo3DPoint -Dtests.method=testGeo3DRelations 
> -Dtests.seed=F2A368AB96A2FD75 -Dtests.multiplier=2 -Dtests.locale=fr-ML 
> -Dtests.timezone=America/Godthab -Dtests.asserts=true 
> -Dtests.file.encoding=UTF-8
>    [smoker]    [junit4] ERROR   0.99s J0 | TestGeo3DPoint.testGeo3DRelations 
> <<<
>    [smoker]    [junit4]    > Throwable #1: java.lang.NullPointerException
>    [smoker]    [junit4]    >  at 
> __randomizedtesting.SeedInfo.seed([F2A368AB96A2FD75:42DC153F19EF53E9]:0)
>    [smoker]    [junit4]    >  at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$DualCrossingEdgeIterator.countCrossingPoint(GeoComplexPolygon.java:1382)
>    [smoker]    [junit4]    >  at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$DualCrossingEdgeIterator.matches(GeoComplexPolygon.java:1283)
>    [smoker]    [junit4]    >  at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$Node.traverse(GeoComplexPolygon.java:564)
>    [smoker]    [junit4]    >  at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$Node.traverse(GeoComplexPolygon.java:572)
>    [smoker]    [junit4]    >  at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$Node.traverse(GeoComplexPolygon.java:572)
>    [smoker]    [junit4]    >  at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$Tree.traverse(GeoComplexPolygon.java:660)
>    [smoker]    [junit4]    >  at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$Tree.traverse(GeoComplexPolygon.java:646)
>    [smoker]    [junit4]    >  at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon.isWithin(GeoComplexPolygon.java:370)
>    [smoker]    [junit4]    >  at 
> org.apache.lucene.spatial3d.geom.GeoBaseMembershipShape.isWithin(GeoBaseMembershipShape.java:36)
>    [smoker]    [junit4]    >  at 
> org.apache.lucene.spatial3d.geom.GeoBaseShape.getBounds(GeoBaseShape.java:43)
>    [smoker]    [junit4]    >  at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon.getBounds(GeoComplexPolygon.java:440)
>    [smoker]    [junit4]    >  at 
> org.apache.lucene.spatial3d.TestGeo3DPoint.testGeo3DRelations(TestGeo3DPoint.java:224)
>    [smoker]    [junit4]    >  at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    [smoker]    [junit4]    >  at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>    [smoker]    [junit4]    >  at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>    [smoker]    [junit4]    >  at 
> java.base/java.lang.reflect.Method.invoke(Method.java:564)
>    [smoker]    [junit4]    >  at 
> java.base/java.lang.Thread.run(Thread.java:844)
> {noformat}
> 2. (both up&down) From 
> [https://jenkins.thetaphi.de/job/Lucene-Solr-7.x-Linux/1598/]:
> {noformat}
>    [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestGeo3DPoint 
> -Dtests.method=testGeo3DRelations -Dtests.seed=BACC479CC2D38CCA 
> -Dtests.multiplier=3 -Dtests.slow=true -Dtests.badapples=true 
> -Dtests.locale=lv -Dtests.timezone=SystemV/AST4ADT -Dtests.asserts=true 
> -Dtests.file.encoding=UTF-8
>    [junit4] FAILURE 3.01s J2 | TestGeo3DPoint.testGeo3DRelations <<<
>    [junit4]    > Throwable #1: java.lang.AssertionError: assess edge that 
> ends in a crossing can't both up and down
>    [junit4]    >      at 
> __randomizedtesting.SeedInfo.seed([BACC479CC2D38CCA:AB33A084D9E2256]:0)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$DualCrossingEdgeIterator.countCrossingPoint(GeoComplexPolygon.java:1438)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$DualCrossingEdgeIterator.matches(GeoComplexPolygon.java:1283)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$Node.traverse(GeoComplexPolygon.java:564)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$Tree.traverse(GeoComplexPolygon.java:660)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon$Tree.traverse(GeoComplexPolygon.java:646)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon.isWithin(GeoComplexPolygon.java:370)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoBaseMembershipShape.isWithin(GeoBaseMembershipShape.java:36)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoBaseShape.getBounds(GeoBaseShape.java:43)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.geom.GeoComplexPolygon.getBounds(GeoComplexPolygon.java:440)
>    [junit4]    >      at 
> org.apache.lucene.spatial3d.TestGeo3DPoint.testGeo3DRelations(TestGeo3DPoint.java:224)
>    [junit4]    >      at java.lang.Thread.run(Thread.java:748)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to