Skip to content

Setting "debug" to "1" segfaults #8

@brunoseivam

Description

@brunoseivam

Hi Florian,

I finally got around to test this device support outside of an iseg device. I followed your advice (setting ISEGHAL, creating symlinks to the headers, etc) and got the IOC to compile. However, if I try to set "debug" to "1", it segfaults:

$ LD_LIBRARY_PATH=/home/martins/workspace/diag-iseg/iseg-bin ./st.cmd 
#!../../bin/linux-x86_64/isegIoc
< envPaths
epicsEnvSet("IOC","ioc-iseg")
epicsEnvSet("TOP","/home/martins/workspace/devIsegHal")
epicsEnvSet("EPICS_BASE","/usr/lib/epics")
epicsEnvSet("ISEGHAL","/home/martins/workspace/diag-iseg/iseg-bin")
dbLoadDatabase("/home/martins/workspace/devIsegHal/dbd/isegIoc.dbd",0,0)
isegIoc_registerRecordDeviceDriver(pdbbase)
isegHalConnect "can0" "hal://192.168.1.101:1454/can0,user,pass"
using HAL version [1.1.2.8]
devIsegHalSetOpt "can0" "debug" "1"
Segmentation fault (core dumped)

The reason is because I inserted the devIsegHalSetOpt call before iocInit(), not after. At that point, myIsegHalThread is NULL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions