ar-tools/ar_tools

Segmentation Fault in labeling2

xaedes opened this issue · 2 comments

Hi I have an urgent problem executing ar_single and ar_multi.

Everything worked fine back at 18.Dec 2013.
I didn't touch anything (no software updates or anything else) and now since 8.Jan 2014 executing ar_single and ar_multi results in segmentation faults. Very strange.
Updating everything in hope it would fix this resulted in no improvement. I am now also using new repo (with new ownership).

I tracked down the segmentation fault to the following:

$ gdb -ex run --args ./ar_single _marker_pattern:=/home/xaedes/rosws/src/markerLoc/data/0.patt _marker_width:=280 _marker_center_x:=0 _marker_center_y:=0 _threshold:=110 _use_history:=true _reverse_transform:=true

[...]

Program received signal SIGSEGV, Segmentation fault.
0x0000000000447213 in labeling2 (image=<optimized out>, thresh=<optimized out>, label_num=0x7fffffffb3ac, area=0x7fffffffb3b0, pos=0x7fffffffb3c8, 
clip=0x7fffffffb3b8, label_ref=label_ref@entry=0x7fffffffb3c0, LorR=LorR@entry=1) at arLabeling.c:233
233                 if( *(pnt+0) + *(pnt+1) + *(pnt+2) <= thresht3 )

But from there I am stuck in optimized code, so I have no clue what to do next.

I can provide more system information and rosbag file with camera info that is replayed while using ar_single - if necessary.

Can you try to reproduce this with a bag file?
I want to seperate out camera problems.
Thanks!

This looks like it might be a thresholding bug in ARToolKitt

at arLabeling.c:233
233                 if( *(pnt+0) + *(pnt+1) + *(pnt+2) <= thresht3 )

This would explain why it only happens under some conditions.
We are going to need a bag to replicate this.