[solved] CP2 r10261 crash on saving image


I have a rather bad crash in Java VM when trying to save a tiled image in CP2, r10261. I have lost the Java VM dump, but I can reproduce it if necessary. The only message I got on the command line was:

Exception in thread "Thread-46" java.lang.NoSuchMethodError: saveBytes

The pipeline is very simple, it loads 12 sites, tiles them into a stitched image, and saves the stitched image. Could the image size be a problem? It is 3 x 4 x 1392 x 1040 in size.

Thanks for any help, Mario

Edited to have correct revision 10261, not 10291.

Hi Mario,

Could you check the version number again? You can see from here that our revision history currently goes up to 10267. (I ask just as a first step in tracking down the problem…)

Hi Mark,

Aaah, I’m, sorry I have mistyped the ‘6’ for a ‘9’. Correct is from ‘svn info’:

URL: https://svn.broadinstitute.org/CellProfiler/trunk/CellProfiler
Repository Root: https://svn.broadinstitute.org/CellProfiler
Repository UUID: 1fc53939-2000-0410-845c-e8453a809027
Revision: 10261
Node Kind: directory
Schedule: normal
Last Changed Author: thouis
Last Changed Rev: 10259
Last Changed Date: 2010-07-09 18:22:29 +0200 (Fri, 09 Jul 2010)

Let me know if you require more information, like the JVM dump. I loaded and saved as “tif” file format. I could also try smaller image sets, maybe the 12 image stitching is too big for the JVM?

The “no such method” error is a bit of a red herring. We’re preparing for an upgrade of the BioFormats Java library and their interface has changed: when we try the newer version of the interface, we get that message and then fall back to the older version.

Unfortunately, the image size is a problem - you’ve probably run out of memory in the Java VM. If you’re running from source, you might try increasing the amount of memory available to the VM. The code for this is in the file, “trunk/CellProfiler/bioformats/init.py”. The code starting at line # 64 is:

__args = [r"-Djava.class.path="+__class_path,

The last bit on line # 69 sets the amount of memory available to Java (and I put the line there to increase the amount of available memory from the default value). You should feel free to increase this as appropriate for your machine and application, for instance “-Xmx4096m” would be 4 gigabytes available to a 64-bit processor.

I’d appreciate a copy of the stack dump if the problem persists after making the change.


I see! However, if you set the limit to 512MB, then the out of memory seems not likely to me. 512MB is way more than the size of my image. Even if the image should be stored as float, 512MB is 8 times the size of my stitched image as float data type, or 16 times the size as 16bit data type. I can not assume bio-formats consumes so much memory. Is there another, more likely cause for the crash, then? Also, the stack dump was not “out-of-memory”, it was a segfault in a C library. I will try to reproduce the crash ASAP.

All the best, Mario

Here is the dump with current head, r10268. I removed all precompiled files using

svn status --no-ignore|cut -c8-|while read DELME ; do rm -vfr "$DELME" ; done

Then I started CellProfiler.py again, to be sure to have only up-to-date classfiles.

This is the terminal output when running the pipeline:

Subversion revision: 10268

(python:25494): Gtk-WARNING **: idle activate multiple times without clearing the folder object first.
Pipeline saved with CellProfiler SVN revision 10259
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
Wed Jul 14 17:12:52 2010: Image # 1, module LoadImages # 1: 5.98 sec (bg)
# A fatal error has been detected by the Java Runtime Environment:
#  SIGSEGV (0xb) at pc=0x00007f19f2e205da, pid=25494, tid=139749439981280
# JRE version: 6.0_20-b02
# Java VM: Java HotSpot(TM) 64-Bit Server VM (16.3-b01 mixed mode linux-amd64 )
# Problematic frame:
# C  [libc.so.6+0x785da]  strncmp+0x3a
# An error report file with more information is saved as:
# /home/emmenlau/Biozentrum/CellProfiler/trunk/CellProfiler/hs_err_pid25494.log
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp

The forum says I can not upload files, so here is the stack dump from JVM: http://data.marssoft.de/hs_err_pid25494.log

All the best, Mario


I’m sorry but my latest post with the crash report is off topic. Can some admin please move it to a separate thread?!

I have posted it under the impression it was the same crash. But when I use “Test Run” and step through the modules, this latter, new crash happens in the “Load Images” module. When I used the “Test Run” with SVN revision r10261, the previous, above crash happened in the “Save Images” module. So I assume they could be unrelated, even though the first impression is similar.

All the best, Mario

I am happy to report that with the latest trunk (r10415) I could not reproduce this issue any more. Thanks for the fix! :stuck_out_tongue:

All the best, Mario