1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 <2018> 2019 2020 2021 2022 2023 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 <2018> 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: EDM X/Y Plot segfaults |
From: | Eric Norum <[email protected]> |
To: | Eric Norum <[email protected]> |
Cc: | Gregory Portmann <[email protected]>, Michael Chin <[email protected]>, EPICS Tech-Talk <[email protected]> |
Date: | Wed, 9 May 2018 10:57:02 -0700 |
I found that hacking in the following changes seems to stop the segfaults and result in waveform display. i suspect that there’s a better fix that involves not invoking this method when the pointers in question are invalid, but I don’t have any idea what that would entail. diff -u baselib/xygraph.cc.orig baselib/xygraph.cc --- baselib/xygraph.cc.orig 2018-05-09 10:49:02.055680000 -0700 +++ baselib/xygraph.cc 2018-05-09 10:52:04.804485000 -0700 @@ -6298,6 +6298,7 @@ arrayNumPoints[i] = 0; for ( ii=0; ii<yPvCount[i]; ii++ ) { + if (!yPvData[i]) dyValue = 0; else // There are two views of pv types, Type and specificType; this uses // specificType @@ -6413,7 +6414,7 @@ #endif - dxValue = ( (double *) xPvData[i] )[ii]; + if (xPvData[i]) dxValue = ( (double *) xPvData[i] )[ii]; else dxValue = 0; if ( xAxisStyle == XYGC_K_AXIS_STYLE_LOG10 ) { dxValue = loc_log10( dxValue );
|