gfacciol / mgm

More Global Matching
GNU Affero General Public License v3.0
57 stars 20 forks source link

Sporadic seg fault with mgm_multi #6

Closed glostis closed 5 years ago

glostis commented 5 years ago

I am encountering a sporadic seg fault while running mgm_multi on a pair of images: sometimes the command succeeds, and sometimes it stops with a seg fault.

The command is the following:

OMP_NUM_THREADS=1 mgm_multi -r -14 -R 12 -S 6 -s vfit -t census -O 16 u.tif v.tif out.tif

I have encountered this error while playing with different values for the flag -O. It seems that the bug only occurs with -O 16.

On a side note, when the command succeeds with -O 16, the output image has a lot of ugly horizontal stripes, which it does not have with -O 8. I can open a separate issue on the subject if you think it is necessary.

I am including the input images u.tif and v.tif in a zip.

mgm_bug_report.zip

gfacciol commented 5 years ago

This one is easy! I never implemented 16 directions! But I see the source of the confusion in the command line help announcing it. Thanks!

glostis commented 5 years ago

Ok, makes sense.

Out of interest, do you know why the code still runs sometimes successfully when given a parameter that is not handled?

gfacciol commented 5 years ago

That's a mistery, in my computer it failed all the time. The loop over the directions traverses a vector containing parameters that has only 8 entries, one per direction (mgm_core.cc line 885). Line 893 shows that the intention of having 16 directions was there... ;)

just for fun, can you show one of the results you obtained?

On Wed, Jun 5, 2019 at 9:54 AM Guillaume Lostis notifications@github.com wrote:

Ok, makes sense.

Out of interest, do you know why the code still runs sometimes successfully when given a parameter that is not handled?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/gfacciol/mgm/issues/6?email_source=notifications&email_token=ABGFI2TILVBNGDSXI3TDN3LPY5WLLA5CNFSM4HS7F4MKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW645BI#issuecomment-498978437, or mute the thread https://github.com/notifications/unsubscribe-auth/ABGFI2VYCAKKDSNPYLU4SYDPY5WLLANCNFSM4HS7F4MA .