[Scilab-users] Scilab 6.0 + starting a new jvm + evstr('1+1; ') => crash

Michael Benguigui michael.benguigui at activeeon.com
Fri Mar 3 14:40:38 CET 2017


Hi all,
As a Scilab user, i am facing difficulties during the Scilab
6 adaptation of my project. I did my best to isolate the pb. This code
works with Scilab 5.5. At some point of my code, I have:

>pair = jinvoke(deployer,'deployOrLookup');
>evstr('1+1');// crash!
>// or
>// deff('[x]=myplus(y,z)','x=y+z') // crash!

Important points:
- The common point of evstr and deff is it calls the scilab compiler.
- deployOrLookup() calls a java method using jinvoke(), which creates a
java Process (Process process = pb.start(); ) that executes another java
class
(cmd like java -Djava.security.policy=xxx -Dlog4j.configuration=xx
-Drmi.port=xxx myClass).
- If the jvm already exists, deployOrLookup() does not create it again, but
just registers it..

Results:
-Executing this code the first time, deployOrLookup() correctly runs a new
jvm executing myClass.. and ... at the first evstr() or deff() call, Scilab
6.0 close with "Scilab 6.0.0 (GUI) a cessé de fonctionner  .. un problème a
fait que le programme a cessé de fonctionner correctement. Windows va
fermer ce programme et vous indiquer si une solution est disponible."
- Executing this code a 2nd time, deployOrLookup() directly registers the
running JVM and executes fine any evstr() or deff() call.
- If I disable the java Process execution (by putting in comment //Process
process = pb.start(); ),
evstr() or deff() can be executed without crashing Scilab.

Many thanks to the Scilab community
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20170303/33749f4c/attachment.htm>


More information about the users mailing list