EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <20252026  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <20252026 
<== Date ==> <== Thread ==>

Subject: Re: DESC field overflow
From: "Zimoch, Dirk via Core-talk" <core-talk at aps.anl.gov>
To: "anj at anl.gov" <anj at anl.gov>, "ralph.lange at gmx.de" <ralph.lange at gmx.de>
Cc: "core-talk at aps.anl.gov" <core-talk at aps.anl.gov>
Date: Thu, 9 Oct 2025 10:02:30 +0000
Hi Ralph,

I tested the following on EPICS 3.14.12 and 7.0.9.

record(ai, "test") {
  field(DESC, "This is a long string that will not fit into the field")
  field(VAL, "1")
}
record(ai, "test2")

In any case I see error messages loading the file:

dbLoadRecords 'longdesc.db',''
Can't set "test.DESC" to "This is a long string that will not fit into the
field"
Error at or before ")" in path "."  file "longdesc.db" line 2

or

dbLoadRecords 'longdesc.db',''
ERROR: Can't set 'test.DESC' to 'This is a long string that will not fit into
the field'  : String is too long
ERROR:  at or before ')' in path "."  file "longdesc.db" line 2

 2 |   field(DESC, "This is a long string that will not fit into the field")

ERROR failed to load 'longdesc.db'

But I always see both records:
dbgrep test*
test
test2

and the correct value:
dbgf test
DBR_DOUBLE:         1

But in no case a truncated DESC field:
dbgf test.DESC
DBR_STRING:         


The behavior has not changes from 3.14.12 to 7.0.9.

Except of course if I use in EPICS 7:
on error break
(which is not possible in EPICS 3.14)

In that case it bails out.

Dirk


On Thu, 2025-10-09 at 10:27 +0200, Ralph Lange via Core-talk wrote:
> As I said yesterday,
> 
> I got the report earlier this week and I will have to verify this.
> The report shows a single st.cmd from a test suite that has the IOC booting (with DESC truncated) on an older version of CODAC Core System and has that same IOC bail out (because of DESC being too long) on the recent version.
> I will investigate and report.
> 
> Thanks for your support!
> ~Ralph
> 
> ps. We are running our semi-annually CODAC Core Hands-On Training course this week (for the 32nd time...). I will need to find time for this.
> 
> 
> On Wed, 8 Oct 2025 at 19:00, Johnson, Andrew N. <anj at anl.gov> wrote:
> > Hi Ralph,
> > 
> > Loading this file into the softIoc
> > record(ai, test) {
> >   field(DESC, "This is a long string that will not fit into the field")
> > }
> > fails for me on EPICS versions 7.0.9, 7.0.2, 3.15.9 and 3.14.12.8; the softIoc exits immediately with an error. On 3.14.12.5 the error was shown, but the softIoc didn’t exit so presumably following commands in an st.cmd file may have been executed.
> > 
> > A check for the string length in dbPutString() was moved in 106fae3b back in March 2016 (pre-3.14.12.6). Previously a truncated string was copied into the field before the length was checked and the error returned by dbPutString(). Since that commit the field value isn’t set at all, it returns the error code S_dbLib_strLen immediately.
> > 
> > I don’t see how any overly-long DESC field value could have been loaded from a dbLoadRecords command since 3.14.12.6. Are you sure your db-file generation code hasn’t changed and triggered this problem instead?
> > 
> > - Andrew
> > 
> > -- 
> > Complexity comes for free, Simplicity you have to work for.
> > 

References:
DESC field overflow Johnson, Andrew N. via Core-talk
Re: DESC field overflow Ralph Lange via Core-talk

Navigate by Date:
Prev: Re: DESC field overflow Ralph Lange via Core-talk
Next: Build failed: EPICS Base 7 base-7.0-1913 AppVeyor via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <20252026 
Navigate by Thread:
Prev: Re: DESC field overflow Ralph Lange via Core-talk
Next: Build failed: EPICS Base 7 base-7.0-1913 AppVeyor via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <20252026 
ANJ, 09 Oct 2025 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·