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

Michael Benguigui michael.benguigui at activeeon.com
Sun Mar 5 21:16:06 CET 2017


And sorry for the wrong title since there is no link with a "new started
jvm".. my process simply executing "echo".

Regards
Michael

2017-03-05 21:12 GMT+01:00 Michael Benguigui <
michael.benguigui at activeeon.com>:

> Hi all,
>
> I managed to make a simpler program to reproduce the pb. Here it is
>
> A java class:
>
> public class MyEchoClass {
>       public static void execEcho () throws IOException {
>         ArrayList<String> cmd = new ArrayList<String>();
>         cmd.add("echo");
>         cmd.add("\"AAAA\"");
>         ProcessBuilder pb = new ProcessBuilder(cmd);
>         pb.start();
>     }
> }
>
> In Scilab:
>
> jinvoke(MyEchoClass,'execEcho');
> disp('before...');
> evstr('1+1;');
> disp('...after');
>
> The result:
>
> before...
> [image: Images intégrées 1]
>
> Regards
> Michael
>
> 2017-03-03 20:20 GMT+01:00 Samuel Gougeon <sgougeon at free.fr>:
>
>> 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
>>
>>
>> _______________________________________________
>> users mailing list
>> users at lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
>>
>>
>
>
> --
> Michael Benguigui, Activeeon
> +33 6 304 37 37 0
> https://fr.linkedin.com/in/micha%C3%ABl-benguigui-23a85921
> skype: michael.benguigui at hotmail.fr
>



-- 
Michael Benguigui, Activeeon
+33 6 304 37 37 0
https://fr.linkedin.com/in/micha%C3%ABl-benguigui-23a85921
skype: michael.benguigui at hotmail.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20170305/e57d2632/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 20507 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20170305/e57d2632/attachment.png>


More information about the users mailing list