OperatorImportFromESRIShape causes java.lang.OutOfMemoryError
まだ誰も着手していません。
評価
調査の方向性
添付された data.zip と ShapeUtilTest1.java:68 の readShape メソッドを使って失敗を再現します。OperatorImportFromESRIShapeCursor.importFromESRIShapeMultiPath と AttributeStreamOfInt32 を追跡し、カーソルの反復中にヒープが枯渇する原因を特定します。添付されたシェープファイルを OutOfMemoryError なしでインポートでき、生成されたジオメトリが検証済みであれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hi together,
currently I play arround with your geometry-api-java (version 1.2.1 from maven) to read an entire shape file and stumbled over the following issue:
java.lang.OutOfMemoryError: Java heap space
at com.esri.core.geometry.AttributeStreamOfInt32.<init>(AttributeStreamOfInt32.java:61)
at com.esri.core.geometry.AttributeStreamBase.createIndexStream(AttributeStreamBase.java:465)
at com.esri.core.geometry.OperatorImportFromESRIShapeCursor.importFromESRIShapeMultiPath(OperatorImportFromESRIShapeCursor.java:268)
at com.esri.core.geometry.OperatorImportFromESRIShapeCursor.importFromESRIShape(OperatorImportFromESRIShapeCursor.java:190)
at com.esri.core.geometry.OperatorImportFromESRIShapeCursor.next(OperatorImportFromESRIShapeCursor.java:55)
at com.esri.core.geometry.ShapeUtilTest1.readShape(ShapeUtilTest1.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
The below snippet shows how I try to read the shape file.
public List<Geometry> readShape(InputStream shape) throws IOException
{
List<Geometry> geometries = new ArrayList<>();
ByteBuffer bb = ByteBuffer.wrap(IOUtils.toByteArray(shape));
GeometryCursor cursor = OperatorImportFromESRIShape.local().execute(0,
Geometry.Type.Unknown, new SimpleByteBufferCursor(bb));
Geometry geometry;
while ((geometry = cursor.next()) != null)
{
geometries.add(geometry);
}
return geometries;
}
I Hope you can help me out with my problem. I also attached the shape file.
- 主要言語
- Java
- スター
- 710
- フォーク
- 268
- 平均マージ
- 7日 23時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Esri/geometry-api-java のほかの issue
-
GeometryEngine.Difference throws GeometryException: internal error for closed polyline touching endpoint対応中かも @DavidHollman が 24 日前に担当しました。 オープンbug fixed_to_verify
Esri/geometry-api-java#328 · コメント 3 件 · 担当者 1 名 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
Esri/geometry-api-java#324 · コメント 17 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
Esri/geometry-api-java#321 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
Esri/geometry-api-java#320 · コメント 1 件 ·
-
cannot reproduce
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
Esri/geometry-api-java#316 · コメント 5 件 ·
Esri/geometry-api-java の issue をすべて見る
似ている issue
-
Update license yearオープン0 - Backlog 1 - Ready documentation good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
cbor
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
FasterXML/jackson-dataformats-binary#844 ·
メンテナーはふだん 1 日以内に返信
-
improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/iceberg#18351 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
repowise-dev/repowise#2945 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Interpolating settings.xml can lead to malformed XML when variable value contains double-hyphenオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/maven#13321 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信