[ome-users] getPlane memory leak

Alexander Tournier alexander.tournier at cancer.org.uk
Wed May 1 17:56:30 BST 2013


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20130501/0c24fb06/attachment.html>


More information about the ome-users mailing list