processing / processing/processing4
curveVertex() causes OutOfMemory in P2D renderer
オープン
まだ誰も着手していません。
bug
core
- 主要言語
- Java
- スター
- 494
- フォーク
- 183
- 平均マージ
- 4時間 39分
- マージ済み PR(30日)
- 3
説明
Created by: Real-John-Cheung
Description
curveVertex() causes java.lang.OutOfMemoryError: Java heap space error when the vertex amount is big in P2D render. With the default Java2D render it works fine.
void setup(){
size(800,800, P2D);
beginShape();
for(int i = 0; i < 26000;i ++){
curveVertex(i * 0.1, 100);
}
endShape();
}
Above sketch crashes due to OutOfMemoryError, below sketches can be executed without problem:
void setup(){
size(800,800);
beginShape();
for(int i = 0; i < 26000;i ++){
curveVertex(i * 0.1, 100);
}
endShape();
}
void setup(){
size(800,800, P2D);
beginShape();
for(int i = 0; i < 2000;i ++){
curveVertex(i * 0.1, 100);
}
endShape();
}
Your Environment
- Processing version: 4.3
- Operating System and OS version: macOS 14.4.1
- Other information: on a Intel Mac
Possible Causes / Solutions
Might have something to do with how Catmull-Rom splines is calculated in P2D?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提供された Processing 4.3 のスケッチを P2D レンダラーで実行し、curveVertex() の 26,000 回と 2,000 回の呼び出し、および Java2D 版を比較します。beginShape()、curveVertex()、endShape() のエントリポイントを P2D レンダラー内で追跡します。大きなスケッチが Java heap を使い果たさなくなり、期待される曲線出力が維持されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- computer-graphics
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100