EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20232024  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  <20232024 
<== Date ==> <== Thread ==>

Subject: Crash when caput array of string to pcaspy or PCAS server tool
From: "Wang, Lin via Tech-talk" <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Thu, 14 Dec 2023 11:03:30 +0800 (GMT+08:00)

Dear all,


When I was developing a server tool with Portable Channel Access Server library, caput to scalar string or array of number data types can execute successfully. However, caput to array of string like "caput -a MTEST:NAME 3 xxx yyy zzz" will cause the server tool crash even if an empty write() method as follows is provided. Sometimes the crash occurs when caput multiple times rather than the first time.


caStatus SimplePV::write(const casCtx &ctx, const gdd &value) {
    return S_casApp_success;
}


My platform is Windows 10, Visual Studio 2022 and the PCAS in EPICS-3.14.12.8


I also tried pcaspy with the following Python code and it had the same behaviour as shown in the following picture.


#!/usr/bin/env python

from pcaspy import Driver, SimpleServer

prefix = 'MTEST:'
pvdb = {
    'NAME': {
        'type' : 'string',
        'count': 3,
        'value': ['aaa', 'bbb', 'ccc']
    },
}

class myDriver(Driver):
    def  __init__(self):
        super(myDriver, self).__init__()

if __name__ == '__main__':
    server = SimpleServer()
    server.createPV(prefix, pvdb)
    driver = myDriver()

    # process CA transactions
    while True:
        server.process(0.1)





Am I doing something wrong or understanding something incorrectly?



Thanks,

Lin



Replies:
Re: Crash when caput array of string to pcaspy or PCAS server tool Ralph Lange via Tech-talk

Navigate by Date:
Prev: Web Proxy being used with PVWS Érico Nogueira Rolim via Tech-talk
Next: Re: Crash when caput array of string to pcaspy or PCAS server tool Ralph Lange via Tech-talk
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  <20232024 
Navigate by Thread:
Prev: Web Proxy being used with PVWS Érico Nogueira Rolim via Tech-talk
Next: Re: Crash when caput array of string to pcaspy or PCAS server tool Ralph Lange via Tech-talk
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  <20232024 
ANJ, 14 Dec 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·