<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap:break-word">
Hi Alex,
<div><br>
</div>
<div>from your workaround, it looks like some objects were not properly cleanup up indeed. </div>
<div>The most recent version of the server/OMERO.matlab should have utility functions taking care of object cleanup (e.g. getStack(session, imageId, c, t))</div>
<div><br>
</div>
<div>It is hard for us to fully test the error since 4.3.3 is a legacy version. But if you want a follow up, can you send us the full script to reproduce the error with the multiple RawPixelsStore instantiations?</div>
<div><br>
</div>
<div>Best,</div>
<div>Sebastien</div>
<div><br>
</div>
<div>
<div>
<div>On 1 May 2013, at 17:56, Alexander Tournier wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Sebastien,<br>
<br>
the exact error msg is:<br>
<br>
Java exception occurred:<br>
java.lang.OutOfMemoryError: Java heap space<br>
    at IceInternal.BasicStream.readByteSeq(BasicStream.java:786)<br>
    at Ice.ByteSeqHelper.read(ByteSeqHelper.java:26)<br>
    at omero.api._RawPixelsStoreDelM.getPlane(_RawPixelsStoreDelM.java:523)<br>
    at omero.api.RawPixelsStorePrxHelper.getPlane(RawPixelsStorePrxHelper.java:729)<br>
    at omero.api.RawPixelsStorePrxHelper.getPlane(RawPixelsStorePrxHelper.java:701)<br>
<br>
I've found a workaround,<br>
I create the RawPixelsStore only once at the beginning of the program<br>
and then reuse the same store throughout the analysis .. seems to work<br>
<br>
Best,<br>
Alex<br>
<br>
<br>
On 01/05/13 11:25, Sebastien Besson wrote:<br>
</div>
<blockquote type="cite">Hi Alexander,
<div><br>
</div>
<div>I have not been able to reproduce your bug on our test servers using the code you pasted below.</div>
<div>Can you give us a little more information about:</div>
<div>- the versions of the server and of OMERO.matlab you are using,</div>
<div>- the size of the image you are working with,</div>
<div>- how you know there is a Java memory leak. Do you get an exception thrown in Matlab?</div>
<div><br>
</div>
<div>Thanks</div>
<div>Sebastien</div>
<div><br>
<div>
<div>On 30 Apr 2013, at 18:55, Alexander Tournier wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div>Hi there,<br>
<br>
I've been trolling the web for a solution to this but I just don't see it,<br>
Any ideas why the following would create a memory leak in java??<br>
Notice the close statement at the end!<br>
And the offending object (IceInternal.Outgoing) is created during the call to setPixelsId according to visualvm and not destroyed by the close statement.<br>
<br>
store = session.createRawPixelsStore();<br>
store.setPixelsId(imageId, false);<br>
<br>
Stack = zeros([sizeX,sizeY,sizeZ],'uint16');<br>
<br>
for z = 1:sizeZ<br>
   plane = store.getPlane( z-1, channel, t);<br>
   tPlane = toMatrix(plane, pixels);<br>
   Stack(:,:,z) = tPlane;<br>
end<br>
<br>
store.close();<br>
<br>
<br>
Any ideas??<br>
Thanks<br>
Alexander<br>
<br>
NOTICE AND DISCLAIMER<br>
This e-mail (including any attachments) is intended for the above-named person(s). If you are not the intended recipient, notify the sender immediately, delete this email from your system and do not disclose or use for any purpose.
<br>
We may monitor all incoming and outgoing emails in line with current legislation. We have taken steps to ensure that this email and attachments are free from any virus, but it remains your responsibility to ensure that viruses do not adversely affect you. Cancer
 Research UK<br>
Registered charity in England and Wales (1089464), Scotland (SC041666) and the Isle of Man (1103)<br>
A company limited by guarantee.  Registered company in England and Wales (4325234) and the Isle of Man (5713F).<br>
Registered Office Address: Angel Building, 407 St John Street, London EC1V 4AD.<br>
_______________________________________________<br>
ome-users mailing list<br>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk">ome-users@lists.openmicroscopy.org.uk</a><br>
<a class="moz-txt-link-freetext" href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</a><br>
<br>
</div>
</blockquote>
</div>
<br>
<div><span class="Apple-style-span" style="border-collapse:separate; font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; font-size:medium"><span class="Apple-style-span" style="border-collapse:separate; font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; font-size:medium">
<div style="word-wrap:break-word"><span class="Apple-style-span" style="border-collapse:separate; font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; font-size:medium">
<div style="word-wrap:break-word">
<div>Dr Sébastien Besson</div>
<div>Open Microscopy Environment / Harvard Medical School</div>
<div>Wellcome Trust Centre for Gene Regulation and Expression,</div>
<div>College of Life Sciences, University of Dundee, Dow Street,</div>
<div>Dundee DD1 5EH Scotland UK   Tel: (01382) 386364</div>
</div>
</span></div>
</span></span></div>
<br>
</div>
<br>
<span style="font-size:10pt">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</blockquote>
<br>
<br>
<br clear="both">
NOTICE AND DISCLAIMER<br>
This e-mail (including any attachments) is intended for the above-named person(s). If you are not the intended recipient, notify the sender immediately, delete this email from your system and do not disclose or use for any purpose.
<br>
<br>
We may monitor all incoming and outgoing emails in line with current legislation. We have taken steps to ensure that this email and attachments are free from any virus, but it remains your responsibility to ensure that viruses do not adversely affect you.
<br>
Cancer Research UK<br>
Registered charity in England and Wales (1089464), Scotland (SC041666) and the Isle of Man (1103)<br>
A company limited by guarantee. Registered company in England and Wales (4325234) and the Isle of Man (5713F).<br>
Registered Office Address: Angel Building, 407 St John Street, London EC1V 4AD.<br>
</div>
</blockquote>
</div>
<br>
<div><span class="Apple-style-span" style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; font-size:medium"><span class="Apple-style-span" style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; font-size:medium">
<div style="word-wrap:break-word"><span class="Apple-style-span" style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; font-size:medium">
<div style="word-wrap:break-word">
<div>Dr Sébastien Besson</div>
<div>Open Microscopy Environment / Harvard Medical School</div>
<div>Wellcome Trust Centre for Gene Regulation and Expression,</div>
<div>College of Life Sciences, University of Dundee, Dow Street,</div>
<div>Dundee DD1 5EH Scotland UK   Tel: (01382) 386364</div>
</div>
</span></div>
</span></span></div>
<br>
</div>
<br>
<span style="font-size:10pt">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</body>
</html>