google / google/s2-geometry-library-java
Infinite loop in coverer builder
Đang mở
- Ngôn ngữ chính
- Java
- Star
- 587
- Fork
- 231
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
```
S2RegionCoverer coverer = S2RegionCoverer.builder()
.setMinLevel(20)
.setMaxLevel(10)
.build();
S2Cap cap = S2Cap.fromAxisAngle(new S2Point(1, 0, 0), S1Angle.degrees(5));
S2CellUnion covering = coverer.getCovering(cap); // OutOfMemoryError
```
The coverer keeps trying to refine cells to reach minLevel(20), but maxLevel(10) prevents going past level 10, so it never satisfies the min level constraint and spirals until the JVM runs out of heap. Could be prevented by checking that min < max
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.