AnsweredAssumed Answered

Segmentation fault with iio_channel_enable

Question asked by mmilosavljevic on Jun 18, 2017
Latest reply on Jun 19, 2017 by mmilosavljevic

Dear Support Team,

 

I have a question regarding the AD9361 iiostream.c example. When I try to build the code in Release mode (please see the CMake below) I get Segmentation fault at the iio_channel_enable. I tried getting the core dump (also pasted below) to see if i can debug the problem but struggling to see where is the issue. It works fine in the debug mode. 

 

Any advice would be appreciated. 

 

Many thanks,

Milos

 

CMake

 

cmake_minimum_required(VERSION 2.8)

project(rx)

if(NOT CMAKE_BUILD_TYPE)

        set(CMAKE_BUILD_TYPE Release)

        message(STATUS "No build type specified. Setting build type to Release.")

endif(NOT CMAKE_BUILD_TYPE)

add_executable(rx

               rx.c)

target_link_libraries(rx iio)

 

Core dump output

 

Program terminated with signal 11, Segmentation fault.

#0  0xb6f804d6 in iio_channel_enable () from /usr/lib/libiio.so.0

(gdb) bt

#0  0xb6f804d6 in iio_channel_enable () from /usr/lib/libiio.so.0

#1  0x00008b06 in main ()

Outcomes