[ome-users] getPlane memory leak
Sebastien Besson
s.besson at dundee.ac.uk
Thu May 2 10:26:38 BST 2013
Hi Alex,
from your workaround, it looks like some objects were not properly cleanup up indeed.
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))
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?
Best,
Sebastien
On 1 May 2013, at 17:56, Alexander Tournier wrote:
Hi Sebastien,
the exact error msg is:
Java exception occurred:
java.lang.OutOfMemoryError: Java heap space
at IceInternal.BasicStream.readByteSeq(BasicStream.java:786)
at Ice.ByteSeqHelper.read(ByteSeqHelper.java:26)
at omero.api._RawPixelsStoreDelM.getPlane(_RawPixelsStoreDelM.java:523)
at omero.api.RawPixelsStorePrxHelper.getPlane(RawPixelsStorePrxHelper.java:729)
at omero.api.RawPixelsStorePrxHelper.getPlane(RawPixelsStorePrxHelper.java:701)
I've found a workaround,
I create the RawPixelsStore only once at the beginning of the program
and then reuse the same store throughout the analysis .. seems to work
Best,
Alex
On 01/05/13 11:25, Sebastien Besson wrote:
Hi Alexander,
I have not been able to reproduce your bug on our test servers using the code you pasted below.
Can you give us a little more information about:
- the versions of the server and of OMERO.matlab you are using,
- the size of the image you are working with,
- how you know there is a Java memory leak. Do you get an exception thrown in Matlab?
Thanks
Sebastien
On 30 Apr 2013, at 18:55, Alexander Tournier wrote:
Hi there,
I've been trolling the web for a solution to this but I just don't see it,
Any ideas why the following would create a memory leak in java??
Notice the close statement at the end!
And the offending object (IceInternal.Outgoing) is created during the call to setPixelsId according to visualvm and not destroyed by the close statement.
store = session.createRawPixelsStore();
store.setPixelsId(imageId, false);
Stack = zeros([sizeX,sizeY,sizeZ],'uint16');
for z = 1:sizeZ
plane = store.getPlane( z-1, channel, t);
tPlane = toMatrix(plane, pixels);
Stack(:,:,z) = tPlane;
end
store.close();
Any ideas??
Thanks
Alexander
NOTICE AND DISCLAIMER
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.
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
Registered charity in England and Wales (1089464), Scotland (SC041666) and the Isle of Man (1103)
A company limited by guarantee. Registered company in England and Wales (4325234) and the Isle of Man (5713F).
Registered Office Address: Angel Building, 407 St John Street, London EC1V 4AD.
_______________________________________________
ome-users mailing list
ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
Dr Sébastien Besson
Open Microscopy Environment / Harvard Medical School
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK Tel: (01382) 386364
The University of Dundee is a registered Scottish Charity, No: SC015096
NOTICE AND DISCLAIMER
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.
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
Registered charity in England and Wales (1089464), Scotland (SC041666) and the Isle of Man (1103)
A company limited by guarantee. Registered company in England and Wales (4325234) and the Isle of Man (5713F).
Registered Office Address: Angel Building, 407 St John Street, London EC1V 4AD.
Dr Sébastien Besson
Open Microscopy Environment / Harvard Medical School
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK Tel: (01382) 386364
The University of Dundee is a registered Scottish Charity, No: SC015096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20130502/e12286e0/attachment.html>
More information about the ome-users
mailing list