resetting the path causes java_invoke to fail
Michael Goffioul
michael.goffioul at gmail.com
Thu Jun 12 03:03:11 CDT 2008
On Wed, Jun 11, 2008 at 10:04 PM, John W. Eaton <jwe at bevo.che.wisc.edu> wrote:
> If the path commands above don't actually change anything, then
> perhaps this is a problem with initialization that happens in the
> jhandles PKG_ADD file? I don't know whether it even has one as I
> don't have a Windows system on which to try to duplicate this problem,
> but that's where I would start looking for problems.
This is the same problem as reported here:
http://www.nabble.com/Octave-2.9.13%2C-Windows%3A-path-information-stored-by-savepath-cannot-be-loaded-on-subsequent-octave-start-td12034472.html#a12035233
Basically, the path is the same, but the PKG_ADD are executed in
a different order, resulting in exit-hooks being registered in different
order. If you combine that with the interdependence between the
exit-hooks of java and jhandles packages, plus the fact that you
can't restart a new JVM within the same process, you get to the
problem reported:
1) because of PKG_ADD re-ordering, java exit-hook is scheduled
before jhandles exit-hook
2) java exit-hook terminates the JVM and clean-up resources
3) jhandles exit-hooks tries to call a Java method, automatically
restarting a new JVM (because it detects no JVM is running)
4) an error is generated, because it's impossible to start a second
JVM instance within the same process.
Michael.
More information about the Bug-octave
mailing list