Displaying X/Y data
in EDM on OS X and Linux often results in a
segmentation fault. Here’s where the fault
occurs:
Program
received signal SIGSEGV, Segmentation
fault.
0x00007ffff1f16f3c
in xyGraphClass::genChronoVector
(this=0x96c6f0, i=0,
6344
dyValue = ( (double *) yPvData[i]
)[ii];
(gdb) where
#0
0x00007ffff1f16f3c in
xyGraphClass::genChronoVector
(this=0x96c6f0, i=0,
#1
0x00007ffff1f1c186 in
xyGraphClass::executeDeferred
(this=0x96c6f0)
#2
0x00007ffff7afe07d in
activeWindowClass::processObjects
(this=0x927880)
#3
0x00007ffff7af5858 in
appContextClass::applicationLoop
(this=0x636d20)
#4
0x0000000000405562 in main (argc=<value
optimized out>,
(gdb) list
6339
else {
6340
dyValue = (double) ( (unsigned short
*) yPvData[i] )[ii];
6341
}
6342
break;
6343
default:
6344
dyValue = ( (double *) yPvData[i]
)[ii];
6345
break;
6346
}
6347
6348
if ( y1AxisStyle[yi] ==
XYGC_K_AXIS_STYLE_LOG10 ) {
(gdb) print
yPvData
$3 = {0x0
<repeats 20 times>}
(gdb) print
&yPvData
$4 = (void
*(*)[20]) 0x96f240
(gdb) print
i
$5 = 0
(gdb) print
yPvData[0]
$6 = (void
*) 0x0
(gdb)
For some reason yPvData is full
of null pointers which results in a segfault
when dereferenced by the [ii] subscript.
Any ideas why this happens
sometimes? I can get a good display maybe
two or three times in a row and then get the
segfault.