[Rtk-users] SegFault - FirstReconstruction

Padraig Looney padraig.looney at gmail.com
Tue Sep 16 10:38:05 EDT 2014


It happens with the first call.

I set a breakpoint just before and it is not empty. I have tried to attach
a screen capture of my space.

Yes I thought I may have changed something but I have copied the directory
twice from the original download in which it builds correctly. I cloned
this with git and there are no changes.


On Tue, Sep 16, 2014 at 3:23 PM, Cyril Mory <cyril.mory at creatis.insa-lyon.fr
> wrote:

>  Hi Padraig,
>
> Does the segfault happen at the first call of geometry->AddProjection(...)
> or later ?
>
> My guess is that, for some reason, geometry is not initialized. Can you
> make sure it is by setting a breakpoint just before ?
> You should also make sure that all variables involved in this call, ie
> "sid", "sdd", "angle", "isox" and "isoy" have reasonable values before the
> call.
>
> It is probably not a good question, yet I have to ask : did you modify
> something in the file examples/FirstReconstruction/FirstReconstruction.cxx
> ?
>
> Regards,
> Cyril
>
>
> On 09/16/2014 04:07 PM, Padraig Looney wrote:
>
>  Thanks Cyril,
>
> Following your advice I have tracked the seg fault down to line 36 in
> FirstReconstruction
>
> geometry->AddProjection(sid,
>                             sdd,
>                             angle,
>                             isox,
>                             isoy);
>     }
>
>  I realised that I managed to build the examples with RTK fine and the
> same example runs without a seg fault in the build directory.
>
> On Tue, Sep 9, 2014 at 11:32 AM, Cyril Mory <
> cyril.mory at creatis.insa-lyon.fr> wrote:
>
>>  Hi Padraig,
>>
>> With so little information, there isn't much we can do to help you.
>> I usually track segfaults by compiling in Debug mode (by setting
>> "CMAKE_BUILD_TYPE" to "Debug"), then running the program in debug in QT
>> Creator (any decent IDE will do just fine, and should stop when the
>> segfault occurs, allowing you to trace it back)
>>
>> Good luck,
>> Cyril
>>
>>
>> On 09/09/2014 12:05 PM, Padraig Looney wrote:
>>
>>   When I try to run the "FirstReconstruction" example I am getting a
>> segmentation fault.
>>
>>  The following is the output from gdb
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x00000000004952d7 in typeinfo for rtk::ProjectionGeometry<3u> ()
>>
>>
>>
>>
>>  _______________________________________________
>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users
>>
>>
>> --
>> --
>> Cyril Mory, Post-doc
>> CREATIS
>> Leon Berard cancer treatment center
>> 28 rue Laënnec
>> 69373 Lyon cedex 08 FRANCE
>>
>> Mobile: +33 6 69 46 73 79
>>
>>
>
> --
> --
> Cyril Mory, Post-doc
> CREATIS
> Leon Berard cancer treatment center
> 28 rue Laënnec
> 69373 Lyon cedex 08 FRANCE
>
> Mobile: +33 6 69 46 73 79
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20140916/48762af4/attachment-0009.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtkSegFaultFirstRecon.png
Type: image/png
Size: 273538 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20140916/48762af4/attachment-0009.png>


More information about the Rtk-users mailing list