Hi Lynn,
That is an unusual place to see a seg fault. I suspect it was not built correctly, so you are mixing code from two versions of some module. I suggest rebuilding EPICS base and all of the synApps modules that ADSimdetector uses, so you are sure everything
built with the same versions. For base and each module type the following at the top-level
make clean uninstall
make -sj
If you still have the problem then run the ADSimDetector under gdb like this.
linux> gdb ../../bin/linxux-86_64/simDetectorApp
gdb> run st.cmd
When it crashes type this gdb command
gdb> backtrace
Send the output.
Mark
From: lynn <lynn0703 at yeah.net>
Sent: Friday, March 3, 2023 3:50 AM
To: Mark Rivers <rivers at cars.uchicago.edu>
Cc: tech-talk <tech-talk at aps.anl.gov>
Subject: Segmentation fault (core dumped) using SimDetector ioc
Hi Mark and all,
I met "Segmentation fault" error when using SimDetector.
I use rocky9(64) , asyn and areaDetector from git.
When I executed st.cmd.linux. I got these as below:
Regards,
lynn
Shell output:
-------------------------------
......
......
epicsEnvSet("EPICS_CA_MAX_ARRAY_BYTES", "10000000")
# Create a simDetector driver
#simDetectorConfig(const char *portName, int maxSizeX, int maxSizeY, int dataType, int maxBuffers, int maxMemory, int priority, int stackSize)
simDetectorConfig("SIM1", 1024, 1024, 1, 0, 0)
Segmentation fault (core dumped)
Hereis st.cmd file:
--------------------------------
epicsEnvSet("IOC","iocSimDetector")
epicsEnvSet("TOP","/opt/EPICS/synApps_6_1/support/areaDetector-master/ADSimDetector/iocs/simDetectorIOC")
epicsEnvSet("ADSIMDETECTOR","/opt/EPICS/synApps_6_1/support/areaDetector-master/ADSimDetector/iocs/simDetectorIOC/../..")
epicsEnvSet("SUPPORT","/opt/EPICS/synApps_6_1/support")
epicsEnvSet("ASYN","/opt/EPICS/synApps_6_1/support/asyn-R4-37")
epicsEnvSet("AREA_DETECTOR","/opt/EPICS/synApps_6_1/support/areaDetector-master")
epicsEnvSet("ADSUPPORT","/opt/EPICS/synApps_6_1/support/areaDetector-master/ADSupport")
epicsEnvSet("ADCORE","/opt/EPICS/synApps_6_1/support/areaDetector-master/ADCore")
epicsEnvSet("AUTOSAVE","/opt/EPICS/synApps_6_1/support/autosave-R5-10")
epicsEnvSet("BUSY","/opt/EPICS/synApps_6_1/support/busy-R1-7-2")
epicsEnvSet("CALC","/opt/EPICS/synApps_6_1/support/calc-R3-7-3")
epicsEnvSet("SNCSEQ","/opt/EPICS/synApps_6_1/support/seq-2-2-6")
epicsEnvSet("SSCAN","/opt/EPICS/synApps_6_1/support/sscan-R2-11-3")
epicsEnvSet("DEVIOCSTATS","/opt/EPICS/synApps_6_1/support/iocStats-3-1-16")
epicsEnvSet("EPICS_BASE","/opt/EPICS/base")
errlogInit(20000)
dbLoadDatabase("$(TOP)/dbd/simDetectorApp.dbd")
simDetectorApp_registerRecordDeviceDriver(pdbbase)
epicsEnvSet("PREFIX", "13SIM1:")
epicsEnvSet("PORT", "SIM1")
epicsEnvSet("QSIZE", "20")
epicsEnvSet("XSIZE", "1024")
epicsEnvSet("YSIZE", "1024")
epicsEnvSet("NCHANS", "2048")
epicsEnvSet("CBUFFS", "500")
epicsEnvSet("MAX_THREADS", "8")
epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(ADCORE)/db")
#asynSetMinTimerPeriod(0.001)
epicsEnvSet("EPICS_CA_MAX_ARRAY_BYTES", "10000000")
# Create a simDetector driver
#simDetectorConfig(const char *portName, int maxSizeX, int maxSizeY, int dataType, int maxBuffers, int maxMemory, int priority, int stackSize)
simDetectorConfig("$(PORT)", $(XSIZE), $(YSIZE), 1, 0, 0)
# To have the rate calculation use a non-zero smoothing factor use the following line
#dbLoadRecords("simDetector.template", "P=$(PREFIX),R=cam1:,PORT=$(PORT),ADDR=0,TIMEOUT=1,RATE_SMOOTH=0.2")
dbLoadRecords("$(ADSIMDETECTOR)/db/simDetector.template","P=$(PREFIX),R=cam1:,PORT=$(PORT),ADDR=0,TIMEOUT=1")
# Create a second simDetector driver
##simDetectorConfig("SIM2", 300, 200, 1, 50, 50000000)
##dbLoadRecords("$(ADSIMDETECTOR)/db/simDetector.template","P=$(PREFIX),R=cam2:,PORT=SIM2,ADDR=0,TIMEOUT=1")
# Load an NDFile database. This is not supported for the simDetector which does not write files.
#dbLoadRecords("NDFile.template","P=$(PREFIX),R=cam1:,PORT=SIM1,ADDR=0,TIMEOUT=1")
# Create a standard arrays plugin, set it to get data from first simDetector driver.
NDStdArraysConfigure("Image1", 20, 0, "$(PORT)", 0, 0, 0, 0, 0, 5)
# This creates a waveform large enough for 2000x2000x3 (e.g. RGB color) arrays.
# This waveform only allows transporting 8-bit images
dbLoadRecords("NDStdArrays.template", "P=$(PREFIX),R=image1:,PORT=Image1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),TYPE=Int8,FTVL=UCHAR,NELEMENTS=12000000")
# This waveform only allows transporting 16-bit images
#dbLoadRecords("NDStdArrays.template", "P=$(PREFIX),R=image1:,PORT=Image1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),TYPE=Int16,FTVL=SHORT,NELEMENTS=12000000")
# This waveform allows transporting 32-bit images
#dbLoadRecords("NDStdArrays.template", "P=$(PREFIX),R=image1:,PORT=Image1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),TYPE=Int32,FTVL=LONG,NELEMENTS=12000000")
# This waveform allows transporting 64-bit float images
#dbLoadRecords("NDStdArrays.template", "P=$(PREFIX),R=image1:,PORT=Image1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),TYPE=Float64,FTVL=DOUBLE,NELEMENTS=12000000")
# Load all other plugins using commonPlugins.cmd
< $(ADCORE)/iocBoot/commonPlugins.cmd# Create a standard arrays plugin, set it to get data from FFT plugin.
NDStdArraysConfigure("Image2", 3, 0, "FFT1", 0)
# This waveform allows transporting 64-bit images, so it can handle any detector data type at the expense of more memory and bandwidth
dbLoadRecords("NDStdArrays.template", "P=$(PREFIX),R=image2:,PORT=Image2,ADDR=0,TIMEOUT=1,NDARRAY_PORT=FFT1,TYPE=Float64,FTVL=DOUBLE,NELEMENTS=12000000")
set_requestfile_path("$(ADSIMDETECTOR)/simDetectorApp/Db")
asynSetTraceIOMask("$(PORT)",0,2)
iocInit()
# save things every thirty seconds
create_monitor_set("auto_settings.req", 30, "P=$(PREFIX)")
--
|
lynn
|
邮箱:lynn0703 at yeah.net
|
|