{"action":"created","issue":{"url":"https://api.github.com/repos/jai-imageio/jai-imageio-jpeg2000/issues/2","labels_url":"https://api.github.com/repos/jai-imageio/jai-imageio-jpeg2000/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/jai-imageio/jai-imageio-jpeg2000/issues/2/comments","events_url":"https://api.github.com/repos/jai-imageio/jai-imageio-jpeg2000/issues/2/events","html_url":"https://github.com/jai-imageio/jai-imageio-jpeg2000/pull/2","id":59473602,"number":2,"title":"Jmabrey memory leak","user":{"login":"stain","id":253413,"avatar_url":"https://avatars.githubusercontent.com/u/253413?v=3","gravatar_id":"","url":"https://api.github.com/users/stain","html_url":"https://github.com/stain","followers_url":"https://api.github.com/users/stain/followers","following_url":"https://api.github.com/users/stain/following{/other_user}","gists_url":"https://api.github.com/users/stain/gists{/gist_id}","starred_url":"https://api.github.com/users/stain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stain/subscriptions","organizations_url":"https://api.github.com/users/stain/orgs","repos_url":"https://api.github.com/users/stain/repos","events_url":"https://api.github.com/users/stain/events{/privacy}","received_events_url":"https://api.github.com/users/stain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-02T12:13:29Z","updated_at":"2015-03-03T02:28:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jai-imageio/jai-imageio-jpeg2000/pulls/2","html_url":"https://github.com/jai-imageio/jai-imageio-jpeg2000/pull/2","diff_url":"https://github.com/jai-imageio/jai-imageio-jpeg2000/pull/2.diff","patch_url":"https://github.com/jai-imageio/jai-imageio-jpeg2000/pull/2.patch"},"body":"An update of jai-imageio/jai-imageio-core#2 from @jmabrey \r\n\r\n\r\n\r\n.. but this breaks the build in all tests:\r\n\r\n```\r\nTests in error: \r\n  ConverterTest.testname:32 » IO closed\r\n  Jpeg2000WriteTest.lossless:64 » IO closed\r\n  Jpeg2000WriteTest.lossyWrite:93 » IO closed\r\n```\r\n\r\n\r\nDetails:\r\n\r\n```\r\nRunning com.github.jaiimageio.jpeg2000.Jpeg2000WriteTest\r\nTests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 4.249 sec <<< FAILURE! - in com.github.jaiimageio.jpeg2000.Jpeg2000WriteTest\r\nlossless(com.github.jaiimageio.jpeg2000.Jpeg2000WriteTest)  Time elapsed: 2.72 sec  <<< ERROR!\r\njava.io.IOException: closed\r\n\tat javax.imageio.stream.ImageInputStreamImpl.checkClosed(ImageInputStreamImpl.java:110)\r\n\tat javax.imageio.stream.ImageInputStreamImpl.close(ImageInputStreamImpl.java:857)\r\n\tat javax.imageio.stream.FileImageInputStream.close(FileImageInputStream.java:151)\r\n\tat javax.imageio.ImageIO.read(ImageIO.java:1451)\r\n\tat javax.imageio.ImageIO.read(ImageIO.java:1308)\r\n\tat com.github.jaiimageio.jpeg2000.Jpeg2000WriteTest.lossless(Jpeg2000WriteTest.java:64)\r\n\r\nlossyWrite(com.github.jaiimageio.jpeg2000.Jpeg2000WriteTest)  Time elapsed: 1.528 sec  <<< ERROR!\r\njava.io.IOException: closed\r\n\tat javax.imageio.stream.ImageInputStreamImpl.checkClosed(ImageInputStreamImpl.java:110)\r\n\tat javax.imageio.stream.ImageInputStreamImpl.close(ImageInputStreamImpl.java:857)\r\n\tat javax.imageio.stream.FileImageInputStream.close(FileImageInputStream.java:151)\r\n\tat javax.imageio.ImageIO.read(ImageIO.java:1451)\r\n\tat javax.imageio.ImageIO.read(ImageIO.java:1308)\r\n\tat com.github.jaiimageio.jpeg2000.Jpeg2000WriteTest.lossyWrite(Jpeg2000WriteTest.java:93)\r\n\r\nRunning com.github.jaiimageio.jpeg2000.ConverterTest\r\n[, image/png, image/vnd.wap.wbmp, image/jpeg, image/x-portable-graymap, image/bmp, image/pcx, image/gif, image/x-windows-bmp, image/x-windows-pcx, image/x-pc-paintbrush, image/jpeg2000, image/x-bmp, image/x-pcx, image/jp2, image/x-png, image/x-portable-bitmap, image/x-portable-pixmap, image/tiff, image/x-portable-anymap]\r\n[JPEG 2000, JPG, tiff, bmp, PCX, gif, WBMP, PNG, RAW, JPEG, PNM, tif, TIFF, wbmp, jpeg, jpg, JPEG2000, BMP, pcx, GIF, png, raw, pnm, TIF, jpeg2000, jpeg 2000]\r\n[JPG, JPEG 2000, tiff, bmp, PCX, gif, WBMP, PNG, RAW, JPEG, PNM, tif, TIFF, wbmp, jpeg, jpg, JPEG2000, BMP, pcx, GIF, png, raw, pnm, TIF, jpeg2000, jpeg 2000]\r\n/tmp/imageio-test8840333562322252026.JPEG 2000\r\nTests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.266 sec <<< FAILURE! - in com.github.jaiimageio.jpeg2000.ConverterTest\r\ntestname(com.github.jaiimageio.jpeg2000.ConverterTest)  Time elapsed: 0.266 sec  <<< ERROR!\r\njava.io.IOException: closed\r\n\tat javax.imageio.stream.ImageInputStreamImpl.checkClosed(ImageInputStreamImpl.java:110)\r\n\tat javax.imageio.stream.ImageInputStreamImpl.close(ImageInputStreamImpl.java:857)\r\n\tat javax.imageio.stream.FileImageInputStream.close(FileImageInputStream.java:151)\r\n\tat javax.imageio.ImageIO.read(ImageIO.java:1451)\r\n\tat javax.imageio.ImageIO.read(ImageIO.java:1308)\r\n\tat com.github.jaiimageio.jpeg2000.ConverterTest.testname(ConverterTest.java:32)\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jai-imageio/jai-imageio-jpeg2000/issues/comments/76875274","html_url":"https://github.com/jai-imageio/jai-imageio-jpeg2000/pull/2#issuecomment-76875274","issue_url":"https://api.github.com/repos/jai-imageio/jai-imageio-jpeg2000/issues/2","id":76875274,"user":{"login":"melissalinkert","id":109998,"avatar_url":"https://avatars.githubusercontent.com/u/109998?v=3","gravatar_id":"","url":"https://api.github.com/users/melissalinkert","html_url":"https://github.com/melissalinkert","followers_url":"https://api.github.com/users/melissalinkert/followers","following_url":"https://api.github.com/users/melissalinkert/following{/other_user}","gists_url":"https://api.github.com/users/melissalinkert/gists{/gist_id}","starred_url":"https://api.github.com/users/melissalinkert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melissalinkert/subscriptions","organizations_url":"https://api.github.com/users/melissalinkert/orgs","repos_url":"https://api.github.com/users/melissalinkert/repos","events_url":"https://api.github.com/users/melissalinkert/events{/privacy}","received_events_url":"https://api.github.com/users/melissalinkert/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T02:28:19Z","updated_at":"2015-03-03T02:28:19Z","body":"@stain/@mtbc - no, we didn't have this problem with https://github.com/openmicroscopy/bioformats/pull/1596.  We do make extensive use of JPEG-2000 writing, but ```ImageIO.read``` is never used for reading JPEG-2000 images back - ```J2KImageReader``` is always used directly since our use case typically involves very large images for which tile-wise reading is imperative.\r\n\r\nIt looks like ```ImageIO.read``` will try to close the underlying ```ImageInputStream``` unless the ```ImageIO.read(ImageInputStream)``` signature is used, but that close happens after the ```J2KImageReader.dispose()``` call.  Calling ```iis.flush()``` instead of ```iis.close()``` might help, though I'm not sure how well that would fix the memory leak.\r\n\r\n"}}