processing / processing/processing4

Export path leaks streams in java/src/processing/mode/java/JavaBuild.java and can hang on malformed jar entries

Open
#1,451 2 comments 0 reactions 1 assignee View on GitHub

@avinxshKD is already working on this.

Since Feb 27, 2026.

Dominant language
Java
Stars
494
Forks
183
Avg merge
4h 39m
Merged PRs (30d)
3

Description

Not seeing this reported yet, so filing it.

While checking export code, spotted a few stream/zip handling bugs in java/src/processing/mode/java/JavaBuild.java:

  • new FileInputStream(...) is passed into saveStream() in multiple places, but that source stream is never closed.

  • ZipFile.getInputStream(entry) is also left open.

  • ZipFile itself is only closed on the happy path.

  • In the jar-entry read loop, if read() returns -1, remaining goes the wrong way and the loop can run forever.

This is in the Export Application path, so it’s not edge-only. Repeated exports can leak FDs/handles (worse on Windows due to file locks), and a bad/truncated jar can stall export.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.