Project

General

Profile

Actions

Bug #1291

closed

libcv infinite loop

Added by Jim Pulokas over 13 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Category:
Leginon subsystem
Target version:
-
Start date:
05/09/2011
Due date:
% Done:

0%

Estimated time:
Affected Version:
Appion/Leginon 2.1.0
Show in known bugs:
No
Workaround:

Description

Reported by Justus and Thorsten from Berlin:

It seems to be stuck in libCV somewhere. Attaching to it with gdb shows
that it is indeed stuck in libCV, image.c, line 792, in the function
SeparableAffineTransform:

for ( r=0;r<=destinationRows-1; ) {

Continuing the process shows that the loop counter r seems to be stuck
at a value of 27 and never increments (the thread has been running for
about 2 hours now).


Files

arraynew.mrc (4 MB) arraynew.mrc Jim Pulokas, 05/09/2011 11:19 AM
arrayold.mrc (4 MB) arrayold.mrc Jim Pulokas, 05/09/2011 11:19 AM

Updated by Jim Pulokas over 13 years ago

To reproduce the problem, I have attached two mrc images which you can use with the following script:

import leginon.libCVwrapper
import pyami.mrc
arraynew = pyami.mrc.read('arraynew.mrc')
arrayold = pyami.mrc.read('arrayold.mrc')
result = leginon.libCVwrapper.MatchImages(arrayold, arraynew, 75, 0.8)

That results in an infinite loop. I was able to increase the minsize from 75 to 200 and that returns successfully.

Actions #2

Updated by Jim Pulokas over 13 years ago

I also remember that long ago we wrapped a part of libcv in a new process so that it could be killed after a certain time if this type of thing happens. That still exists in libcvcaller.py. I'm not sure at what point we decided not to use that, but we could resurrect it. More proper solution would be to fix the low level code where the loop happens.

Actions #3

Updated by Jim Pulokas over 13 years ago

  • Status changed from New to Assigned
  • Assignee set to Anonymous

have a look, and maybe I will too.

Actions #4

Updated by Anchi Cheng about 13 years ago

  • Category set to Leginon subsystem
  • Status changed from Assigned to In Test
  • Assignee changed from Anonymous to Thorsten Mielke

Thorsten,

Craig used a different affine transform algorithm in his newly committed code r16069. I tried it on the images you sent and it did avoid the infinite loop problem. If you change the code according to

http://emg.nysbc.org/projects/leginon/repository/diff/trunk/modules?rev=16069&rev_to=15848

and rebuild/install that module using setup.py, you should be able to test it out. It might be slower since it is not as optimized, but it should avoid the problem you have.

Actions #5

Updated by Anchi Cheng almost 7 years ago

  • Status changed from In Test to Closed
Actions

Also available in: Atom PDF