On Thu, Jan 05, 2012 at 12:01:42PM -0700, Orion Poplawski wrote:
> On 01/05/2012 05:01 AM, Andrew Ross wrote:
> >
> > Orion,
> >
> > There have been intermittent crashes with some java compilers / jre and
> > not with others. These have been hard to pin down since debugging the
> > java / native code is not easy.
> >
> > I have not had trouble with openjdk (in fact it has been my compiler of
> > choice for this reason). I have been using openjdk-6 though. I tried
> > openjdk-7 on debian unstable and I could not reproduce your crash. This
> > does not necessarily mean anything though as these things can be a little
> > random. Is the crash reproducible for you?
> >
> > I've taken a look at the swig code for this and I think there is an issue
> > with referencing a variable which is out of scope. This might or might not
> > work depending on the compiler and what else is going on. The latest svn
> > takes an alternative approach which should fix this. This fix works for
> > me, but so did the old code. Can you test and see if this makes any
> > difference?
> 
> Nice catch!  That fixed it for me.  It was completely reproducible before.

I suspect it might actually be your newer gcc version (4.7?) being more
strict about scope on the C side. Anyway, glad its fixed now. 

It would be now possible to move the java plcont routines (and related) to
use callback functions like the C version. I've subsequently worked out
how to do this for mapform et al. I've not implemented this for two 
reasons: 1) Backward compatibility and 2) it might well be slower as the 
pltr function is called a large number of times. Of course in java it 
might be possible to maintain backward compatibility by having two 
versions. I don't know if swig supports this though. 2) May also not be
a big problem - I won't know until I try. 

Andrew



------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to