JVM crash on large polyfills
まだ誰も着手していません。
評価
調査の方向性
まず、TestH3Core.java の大きな polyfill ケースでクラッシュを再現し、次に関連する testPolyfill.c ケースおよび h3Api.polyfill 呼び出しと比較します。失敗が Java wrapper にあるのか core library にあるのかを特定し、大きなポリゴンのリグレッションテストによって修正の完了を確認します。
索引モデルが issue の本文から書いたものです。
説明
When the following is added to TestH3Core.java, the jvm crashes out on h3Api.polyfill before completing the tests. The polyfill works at resolution 9.
@Test
public void testPolyfillLarge() {
List<Long> hexagons = h3.polyfill(
ImmutableList.<GeoCoord>of(
new GeoCoord(41.5, -70.4),
new GeoCoord(41.5, -69.8),
new GeoCoord(42.1, -69.8),
new GeoCoord(42.1, -70.4)
), null,
10
);
assertTrue(hexagons.size() > 1000);
}
Is this an issue with the java wrapper, or is this impossible to do with the core library?
I don't know C but adding a similar test to h3 naively copying the existing styles to testPolyfill.c at level 11 still seems to work. If I increase the resolution up past 11 it eventually segfaults there too.
GeoCoord capeCodVerts[] = {
{0.7243116395776468, -1.2287117934040082}, {0.7243116395776468, -1.218239817892042},
{0.7347836150896128, -1.218239817892042}, {0.7347836150896128, -1.2287117934040082}};
Geofence capeCodGeofence;
GeoPolygon capeCodGeoPolygon;
capeCodGeofence.numVerts = 4;
capeCodGeofence.verts = capeCodVerts;
capeCodGeoPolygon.geofence = capeCodGeofence;
capeCodGeoPolygon.numHoles = 0;
TEST(polyfillLarge) {
int numHexagons = H3_EXPORT(maxPolyfillSize)(&capeCodGeoPolygon, 12);
H3Index* hexagons = calloc(numHexagons, sizeof(H3Index));
H3_EXPORT(polyfill)(&capeCodGeoPolygon, 11, hexagons);
int actualNumHexagons = 0;
for (int i = 0; i < numHexagons; i++) {
if (hexagons[i] != 0) {
actualNumHexagons++;
}
}
t_assert(actualNumHexagons > 10000, "got lots of hexagons");
free(hexagons);
}
- 主要言語
- Java
- スター
- 333
- フォーク
- 68
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
uber/h3-java のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
似ている issue
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apache/flink-agents#1152 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
jenkinsci/blueocean-plugin#5417 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
objectionary/eo-graphs#75 ·