Problem with renderBinary(InputStream)

Bug #523872 reported by David Marko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
Status tracked in 1.0
1.0
Fix Released
Undecided
Guillaume Bort
1.1
Fix Committed
Undecided
Guillaume Bort

Bug Description

 Problem with renderBinary(InputStream) .. see detail in discussion
http://groups.google.com/group/play-framework/browse_thread/thread/558319c46cb70344/e5eeccfd528f69e1?lnk=gst&q=renderBinary#e5eeccfd528f69e1

David

##############
I have a problem with renderBinary when streaming a big file using
InputStream as parametr. renderBinary is working fine when streaming
the file directly but fails when streaming InputStream.
FileInputStream file= new FileInputStream("c:\\file200MB.nsf");
File file2= new File("c:\\file200MB.nsf");
renderBinary(file); // cause error
renderBinary(file2); // is fine
The error I get is:
Oops: OutOfMemoryError
An unexpected error occured caused by exception OutOfMemoryError:
Java heap space
To be honest I found the problem when using MongoDB and its GridFS.
GridFS return files as objects that provide .getInputStream() . I just
checked using the sample above, if its GridFS problem or Play! The
same thing but in diferent way is, that GridFS has method that can
stream the file to OutputStream so I tried to stream to Play!'s
'response.out' , but it has the same error result. But looking to file
example above shows its rather the Play! specific problem.

Changed in play:
status: New → Fix Committed
Changed in play:
milestone: none → 1.0.1
milestone: 1.0.1 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.