Occasional crashes in 2.1

I’m seeing hard crashes sporadically on OS X with 2.1.0. I don’t know what causing them; it’s difficult to repro. Sometimes I can run the same pipeline again and avoid the crash.

Here’s a crash dump: gist.github.com/anonymous/10940889

Hi Tim,
Thanks for the report. I’ll forward this to our lead developer, but in the meantime just to be sure

  • Are you running the compiled, release CP version?
  • Are you running from the command-line, or simply the GUI?

There is some indication that AWT (Java windowing) was involved. There was a bugfix to this for Mac recently (cellprofiler.org/cgi-bin/trunk_build.cgi

Another suggestion is to use fewer CPU cores (in File -> Preferences), rather than the default which is the max for your machine. Not sure, but tough-to-debug bugs like this might be a multi-threading issue.


Yes, the compiled release version. I’m using the CellProfiler GUI.

I’d had the display windows turned on for IdentifyPrimaryObjects and IdentifySecondaryObjects; I turned them off after encountering this last crash and re-ran the pipeline and it completed successfully, but I’m not sure the crash is deterministic enough to call that a fix.

I’ve attached the pipeline I’m using.

Thanks for your help!
20140406.cpproj (1.23 MB)

Thanks, Tim. I’m looking at the crash and the pipeline and the crash is happening in the UI thread during some sort of array operation - hard to tell which one, but it is very likely that it happens during display (and more likely since it doesn’t crash when you have your displays turned off). The pipeline is very generic and I think the crash happens in a place where an unchecked failed memory allocation might cause the segmentation fault that you saw. (if you look at the issue below, I’ve been able to reproduce the crucial part of your stack trace with a simple, very large allocation and numpy operation).

It’s on a Mac, in the 32-bit UI, so if your pipeline has large images, this might be the place where it blows up. I’ve filed an issue below:

github.com/CellProfiler/CellPro … ssues/1108

Could you get back to me with the sizes of the images, possibly could we arrange to get one imageset-worth of them? I’ll close the issue if the image size is causing the problem.

Each tile is a different size but the largest is pretty large, clocking in at 5040x2652 and 25 MB on disk. The rest range from 250 KB to 15 MB; most of them are < 10 MB. I’m happy to share images if that’s helpful but I guess maybe it’s just size.

Do you have any tips for mitigation besides turning off display and running smaller images? If the problem is the GUI process hitting the 2GB ceiling, does the GUI run in 64-bit mode on other platforms?


Yup best mitigation of the problem, unfortunately, is to move to Windows or possibly one of the Linux variants we support - those are all 64-bit. The Mac is currently restricted to 32-bit mode because of the UI toolkit we use - we’re stuck at a revision that doesn’t support 64 bits and we need to carve out a chunk of time to upgrade which we will eventually do.

If you need the displays during test mode in order to tune things, one strategy might be to crop the images for test mode, develop the pipeline and then run with uncropped images and no UI display for analysis. That will use a 64-bit process space and you should not run into those memory problems.