Classifier: Remove selected images segmentation fault

Hi,

I seem to encounter a segmentation fault each time I try to remove a group of images selected in the classifier. To recreate I try:

  1. Load CPA,select a properties file, click on the classifier
  2. Load a training set
  3. Select a number of images from one of the bins with shift + click
  4. Right click and select “Remove selected images”

After step 4 I get a segmentation fault each time. Have you encountered this before?

Thanks,

Lee.

Hi Lee,

I just tried this and it works for me. I am using Mac 10.5 and it works with CPA version 10530 (compiled, latest on website) as well as the latest SVN trunk version. Try updating, if you haven’t already.

What version are you using? Compiled or from SVN?
What architecture? Mac/PC/Linux? 32/64 bit? I assume Linux since you say SegFault, but I suppose the error might say that regardless.

-David

Hi David,

I’m running version 2.1 Beta, under 64-bit linux. I believe it was from SVN, I’ll try updating and see if this helps. Will running svn update break any of the settings/configuration?

Thanks,

Lee.

Hi again,

After running svn update, sadly CPA no longer starts. Instead of a prompt, I get

[quote]kfounk@frodo:~/CPA2/CPAnalyst$ python src/cpa.py
WARNING:root:ImageReader failed to import LoadImagesImageProvider from CellProfiler, will fall back on PIL and TiffFile.
INFO:root:Creating filter tables…
Traceback (most recent call last):
File “src/cpa.py”, line 482, in
app = CPAnalyst(redirect=False)
File “/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py”, line 7978, in init
self._BootstrapApp()
File “/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py”, line 7552, in _BootstrapApp
return core.PyApp__BootstrapApp(*args, **kwargs)
File “src/cpa.py”, line 406, in OnInit
multiclasssql.CreateFilterTables(wx.Yield)
File “/home/kfounk/CPA2/CPAnalyst/src/multiclasssql.py”, line 54, in CreateFilterTables
key_col_defs = “,”.join([col + " INT" for col in image_key_columns()])
File “/home/kfounk/CPA2/CPAnalyst/src/dbconnect.py”, line 124, in image_key_columns
return (table_name+p.image_id,)
TypeError: cannot concatenate ‘str’ and ‘NoneType’ objects[/quote]

Hi Lee,

It should be fine to svn update. It’s not absolutely guaranteed to not break anything, but you can always update to an older version.

David

Hi Lee,

First the error:

[quote]…
return (table_name+p.image_id,)
TypeError: cannot concatenate ‘str’ and ‘NoneType’ objects[/quote]

seems to indicate that you haven’t defined image_id in your properties file. So definitely double check that you have image_id = ImageNumber (or whatever your image column is).

As for the crashing when deleting tiles: I’ve had people report this problem on more than one occasion and every time I can’t seem to replicate. I have a feeling this may be some sort of race condition that is a result of the mouse action of selecting “remove selected.” I’ve always just used the delete (windows backspace) key to remove selected tiles from Classifier, so if this is the case then that would explain why few (if any) of us who use it often have ever encountered the problem.

I could be wrong here – I just tried my best to break the current version in svn by using the right click “remove selected” and failed to fail. (ha)… anyway, give the delete key a try and let me know if that make a difference. I’d like to put this to rest.

-Adam

Hi David,

After updating to the same version as you used (10530 Linux), I get the same result, a seg fault. Is there some sort of test & output I could send you? I’ve already got logging set to debug, but nothing interesting is produced.

[quote=“David Logan”]Hi Lee,

It should be fine to svn update. It’s not absolutely guaranteed to not break anything, but you can always update to an older version.

David[/quote]

Hi Adam,

Success, the delete key works. It is probably as you say.

Hi Lee,

Ignore my last comments about your properties file, turns out someone committed a bug to the properties module. You should be able to svn up to the bleeding edge now.

Cheers,
Adam