The java code snippet that is calls the scilab function as follows
public void executeFunction() {
SciStringArray DataChars = new SciStringArray("DataChars", 3, 6,
new String[] { "Char 1", "Char 2", "Char 3", "0.15", "0", "0",
"0.1", "-0.1", "-0.2", "0.2", "0.1", "0.2", "0.95",
"0.95", "0.95", "%nan", "%nan", "%nan" });
SciString GifPath = new SciString("GifPath", "F:/Oasis/");
SciStringArray OutSynthesis = new SciStringArray
("OutSynthesis", 16, 4);
//this bin file has the foo function defined
Scilab.Exec("load 'F:/Oasis/Sci-lab/OASIS4_V3.bin';");
// foo is the custom functions which creates a graph and stored in the
GifPath
//At this point the JVM crashes
Scilab.Exec("[OutSynthesis]=foo(DataChars,GifPath)");
OutSynthesis.Get();
Scilab.Exec("disp(OutSynthesis)");
}
The error it throws by scilab when running on Swing thread is
Warning !!!
Scilab has found a critical error (Unknown exception)
with "set" function.
Save your data and restart Scilab.
Warning !!!
Scilab has found a critical error (Unknown exception)
with "stringbox" function.
Save your data and restart Scilab.
Error code after execution 21