[Scilab-users] Scilab 6.0 + starting a new jvm + evstr('1+1; ') => crash
Samuel Gougeon
sgougeon at free.fr
Fri Mar 3 20:20:21 CET 2017
Hello Michael,
Again, it is hard or even impossible to help or/and debug without having
any true complete (and if possible minimal) way to run an actual code
and reproduce the issue.
Le 03/03/2017 à 14:40, Michael Benguigui a écrit :
> 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..
Either you can provide this code, or you provide an equivalent public
one with which you get the same issue, in a way we can copy/paste it in
the console with all the required context (so lines of codes without any
leading prompts -->).
Otherwise, nothing prevents thinking that the issue is possibly in the
private code or in the private context instead of in Scilab itself.
By the way, if your prompt was really ">" instead of "-->", you were not
at the top level, and something else could be wrong out of jinvoke,
evstr or deff)
For my part, i do not get any crash running
jimport java.lang.System;
jimport java.awt.Color;
jimport java.lang.String;
// Non-static methods
jinvoke("Hello World !!", "length");
evstr('1+1');// crash!
deff('[x]=myplus(y,z)','x=y+z')
as coming from the first example of the jinvoke() help page.
Regards
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20170303/0ff2d84e/attachment.htm>
More information about the users
mailing list