Hello,
I managed to compile Scilab on FreeBSD, and scilab-cli works OK, but scilab-adv-cli aborts with the following error:
Terminating due to uncaught exception 0x3e8ea72db700 of type GiwsException::JniCallMethodException
A fatal error has been detected by Scilab.
Please check your user-defined functions (or external module ones) should they appear in the stack trace.
The output of getdebuginfo is:
Scilab branch-2025.1 (Jul 3 2025, 22:32:47)
--> [a, b] = getdebuginfo()
a = [5x1 string]
"Total free memory: 21528576"
"Total memory: 33374208"
"SCI: /usr/local/share/scilab/"
"SCIHOME: /home/thierry/.Scilab/scilab-branch-2025.1"
"TMPDIR: /tmp/SCI_TMP_75663_USFRHR"
b = [6x1 string]
"Scilab Version: scilab-branch-2025.1"
"Compilation date: Jul 3 2025"
"Compilation time: 22:32:47"
"Compileur version: FreeBSD Clang 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd708029e0b2)"
"XML version: 2.11.9"
"Compiler Architecture: X64"
But there is no StackTrace: how could I enable it?
Hello,
Can you give the output you get when you run the configure script ?
S.
“Sorry, new users can not upload attachments.”
I uploaded it to https://people.freebsd.org/~thierry/config.log .
Thanks for taking care.
OK thanks, I just wanted to check that you were using Java17.
Another point: we stick to clang-16 for the macOS build (I saw that you are using clang-19). Anyway can you launch scilab-adv-cli in lldb
, in order to see where the exception occurs ?
S.
It runs until ./modules/jvm/src/c/JVM_commons.c:52, at the line
return (ptr_JNI_CreateJavaVM)(jvm, penv, args);
and then it enters into libjvm.so, for which I have no debug code!
The error occurs just after a return code:
frame #0: 0x00000ae49a5a7e75 ld-elf.so.1`_rtld_bind_start at rtld_start.S:158
155 popfq # Restore rflags
156 .cfi_adjust_cfa_offset -8
157 leaq 16(%rsp),%rsp # Discard spare, obj, do not change rflags
-> 158 ret # "Return" to target address
159 .cfi_endproc
160 .size _rtld_bind_start, . - _rtld_bind_start
161
Process 4996 stopped
* thread #1, name = 'scilab-bin', stop reason = signal SIGSEGV: address not mapped to object (fault address: 0x0)
frame #0: 0x000000088bd4762d
-> 0x88bd4762d: movl (%rsi), %eax
0x88bd4762f: leaq 0x30(%rbp), %rsi
0x88bd47633: movl $0x10000, %eax ; imm = 0x10000
0x88bd47638: andl 0x4(%rsi), %eax
I have no experience with JNI, and no clue about these messages!
I could rebuild OpenJDK with debug symbols, but I prefer to avoid it…
Have you already encountered such an error on other platforms?
Ad read in Scilab works on my system - linux mint 21.2, but it gives a GLException, can I fix this? - #2 by mottelet I tried
export _JAVA_OPTIONS='-Djogl.disable.opengles'
and then
export LIBGL_ALWAYS_SOFTWARE=true scilab
Without success: same error Terminating due to uncaught exception 0x362a1cac0700 of type GiwsException::JniCallMethodException
Out of curiosity, I imported giws and tested the option --enable-build-giws
: same error.
Remark: giws taken from GitHub - opencollab/giws: A wrapper generator to generate C++ mapping Java classes at version 3.0.0, which identifies itself as 2.0.2, but Scilab’s configure wants 1.3.0.