EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  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  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: about bug
From: l7a <[email protected]>
To: "'Jeff Hill'" <[email protected]>, [email protected]
Date: Fri, 23 May 2003 08:35:18 -0500
Hello Jeff,

	Thanks for answer. I catched the bug when I debugged program and
started it a lot of time. Of course, I had normal program and then I
cleared program that you would lose less time.
	We know Kay Kasemir's active X server and use it. It can work
only in Windows. But LabView works in Linux and Mac too. My task is one
VI's for Windows and Linux. Now I have finish first minimum version for
Windows.
	I agree with you that this bug can't be important and we will
wait R3.14.3.
	Thank you for MSVC command line. I'll compare with my. I had
some problems with this in first time.

Best wishes, Andrei.

> 2. I try to test clients in Windows. I saw when I started the simplest
> program for few times I have problem. The program contains
> - init CA
> - open channel
> - close channel
> - destroy CA
> It works OK at once. But if I make loop I receive problem after ~10
> circles in destroy function. I attach c file and bmp with screen.
Could
> you please glance to its? I use Epics 3.14.1 version.

You have found a bug. Your program is making an unusual use of the
library, but
this is definitely a bug which isn't reproduced in our regression tests.
I have
committed a fix to CVS both on the main trunk (R3.15) and on the (R3.14)
branch.
The fix will show up in R3.14.3. You can wait for R3.14.3, use a CVS
snapshot at
the APS web site, or I can send you a patch.

> #define CAERR_USE_FUNC_PROTO
> #define CAC_ANSI_FUNC_PROTO

This should be unnecessary if you have an ANSI compliant C compiler that
defines
__STDC__. With the Microsoft compiler the option that defines __STDC__
also
prevents use of many Microsoft specific things so we define __STDC__ to
be 0 on
the command line. You must also compile with the options for
multithreaded and
DLL based C RTL to be compatible with EPICS base.

Here are the MSVC command line options that are used by the EPICS
makefiles when
building debug with MSVC.

cl -c /nologo /D__STDC__=0  /Z7 /DEPICS_FREELIST_DEBUG
/D_CRTDBG_MAP_ALLOC /W3
/w44355 /MDd -I. -I.. -I..\\..\\..\\include\\os\\WIN32 -
I..\\..\\..\\include
-ID:\\users\\hill\\epicsDvl\\epics\\base\\include\\os\\WIN32
-ID:\\users\\hill\\epicsDvl\\epics\\base\\

Note that there appears to be a flaw in your program where it expects
that
ca_pend_io() will block for an IO request made with an associated
completion
callback handler. It won't. The ca_pend_io() function will not block for
ca_get_callback to complete (only for ca_get() to complete). The
ca_pend_io()
function will not block for a channel created with a connection callback
handler
to complete (specify a nill function pointer if you need to use
ca_pend_io). See
the documentation.

By the way, I'm not certain how serious this program is, but as written
it's
quite inefficient. Repeating the following sequence every time that lab
view
needs data could easily give your EPICS network managers a headache
depending on
your rep rate. Even if the rep rate is low now someone might crank it up
to
unacceptable levels in the future without anticipating any side effects.
You
might try Kay Kasemir's active X server instead.

ca_context_create
ca_create_channel
ca_pend_io
ca_get
ca_pend_io
ca_clear_channel
ca_context_destroy




References:
RE: Jeff Hill

Navigate by Date:
Prev: RE: Jeff Hill
Next: Job Opening at APS Ned Arnold
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Jeff Hill
Next: ENUM with LABVIEW CAserver BOTHNER Udo (562.73)
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·