EPICS Home

Experimental Physics and Industrial Control System


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

Subject: JCA problems and questions
From: Mark Rivers <[email protected]>
To: "[email protected]" <[email protected]>
Date: Mon, 22 Oct 2012 14:53:28 +0000
Folks,

areaDetector comes with an ImageJ plugin for viewing images.  ImageJ is written in Java, and that plugin uses CAJ and JCA to do native Java channel access.  I have noticed that on Windows 7 64-bit that the plugin will often freeze.   The plugin puts a CA monitor on the UniqueID PV, and then reads the image when it gets that monitor.  The plugin freezes because those monitors callback events stop happening.  Disconnecting the PVs and reconnecting would fix the problem, but only temporarily, eventually it would freeze again.

I was actually using an old version of CAJ (1.1.5 from 2008) and JCA (2.3.2 from 2008).  Today I upgraded to the latest released versions from 2012, CAJ 1.1.10 and JCA 2.3.6.  The good news is that this fixes the problems of the plugin freezing on Windows 7 64-bit.

However, it introduces a change in behavior that I want to ask about.  With the old versions of CAJ and JCA it was not necessary to set the property gov.aps.jca.Context.max_array_bytes, even though the arrays are larger than 16384 bytes.  The reason it was not necessary was explained to me by Matej in August 2009 in the e-mail message appended below.  CAJ would dynamically make larger buffers with newly allocated ones even if that would exceed the default value of gov.aps.jca.Context.max_array_bytes.  However, this behavior appears to have changed.  It does not work to leave gov.aps.jca.Context.max_array_bytes at the default value, I had to set it to a value at least as large as the array size to read the arrays.  My questions:

- Is this change in behavior intentional?

- Is the change documented?  I cannot find detailed release notes for CAJ, only the one-line description of changes here: 
http://epics-jca.sourceforge.net/caj/changes-report.html#a1.1.10

- Is there somewhere else to look for release notes?

Thanks,
Mark


Message from Matej Sekoranja [[email protected]] August 5, 2009:


HI,

> I have another question about CAJ, relating to the property
> "max_array_bytes".
>
> I am not setting the "max_array_bytes" property in a properties file  
> or
> in my application.  When I call context.printInfo in my running
> application I get the following:
>
> context.printfInfo  ****************************
>
> CLASS : com.cosylab.epics.caj.CAJContext
> ADDR_LIST : localhost 164.54.160.255
> AUTO_ADDR_LIST : false
> CONNECTION_TIMEOUT : 30.0
> BEACON_PERIOD : 15.0
> REPEATER_PORT : 5065
> SERVER_PORT : 5064
> MAX_ARRAY_BYTES : 16384
>
> The value of MAX_ARRAY_BYTES is 16384, the default, as I expect.
>
> However, my application is using CAJ to read arrays that are over  
> 1.2MB
> with no errors!  Is the max_array_bytes property actually not used in
> CAJ?  It looks like it must be being ignored?

Well, CAJ does not ignore this property. It preallocates its buffers  
using MAX_ARRAY_BYTES value.
However, if server sends a bigger array it replaces buffer with newly  
allocated (bigger one).

(This is not optimal regarding resource allocation, but it's very  
convenient on client side. I can put a "hard" limit there, if you  
wish...)

Matej



Replies:
Re: JCA problems and questions J. Lewis Muir
Re: JCA problems and questions Jack Smith

Navigate by Date:
Prev: RE: burtrb failing on local LAN, but not through gateway Hill, Jeff
Next: Re: JCA problems and questions J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: : ISA 5.1. CAD tool Elder Matias
Next: Re: JCA problems and questions J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024