[Rtk-users] SegFault - FirstReconstruction

Cyril Mory cyril.mory at creatis.insa-lyon.fr
Tue Sep 16 16:23:07 CEST 2014


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 
> <mailto: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 list
>>     Rtk-users at public.kitware.com  <mailto:Rtk-users at public.kitware.com>
>>     http://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  <tel:%2B33%206%2069%2046%2073%2079>
>
>

-- 
--
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://www.creatis.insa-lyon.fr/pipermail/rtk-users/attachments/20140916/6dc153b3/attachment.htm>


More information about the Rtk-users mailing list