qzindustries / qz-print

Free browser applet for sending documents and raw commands to a printer.
Other
49 stars 4 forks source link

Print current page memory leak #29

Closed tresf closed 9 years ago

tresf commented 10 years ago

Using html5 printing multiple times over and over (i.e. 35 times in a row) causes Java's memory heap to grow in excess of 160MB eventually crashing the JVM. This bug exists in the 2.0 branch, but not in the 1.8 branch.

tresf commented 10 years ago

One possible cause is the applet seems to use the ByteBuffer incorrectly here: https://github.com/qzindustries/qz-print/blob/master/qz-print/src/qz/PrintApplet.java#L346

In either case of URL or Base64 encoded data, this shouldn't be wrapped into a ByteArray.

This will be a significant amount of work to change.

tresf commented 9 years ago

Closing, this bug exists solely on a non-maintained branch (master). https://github.com/qzind/qz-print has the latest (1.9 at the time of writing this).