jondeuce/MATDaemon.jl

Segmentation fault

Closed this issue · 2 comments

I'm running julia version 1.10.0 on fedora core 38. After running the example code

>> jlcall('sort', {rand(2,5)}, struct('dims', int64(2)))

I obtain the following

Installing MATDaemon environment...
/home/maikel/.juliaup/bin/julia --project=/home/maikel/Documents/Papers/PNDDE/Demos/.jlcall --threads=auto --startup-f
ile=no --quiet --optimize=3 /home/maikel/Documents/Papers/PNDDE/Demos/.jlcall/tmp/0000_mat_tp4e940703_653a_4fbd_a470_1
1efb95cb486.jl: Segmentation fault
touste commented

Hi, I had the same error and it turned out to be a Matlab issue: https://fr.mathworks.com/matlabcentral/answers/321256-system-command-gives-segmentation-fault
I solved it by changing the system commands in jlcall.m to:

[st, res] = system(['source ~/.bash_profile; ', cmd]);

I'm sure there is a more robust solution but it worked.

Thanks for looking into this! That's very odd, but I have seen issues in the past with Matlab and environment variables. Somewhat confused why sourcing .bash_profile fixes your issue, but if it works for OP too then I'll close this.