MATDaemon.jl icon indicating copy to clipboard operation
MATDaemon.jl copied to clipboard

Segmentation fault

Open mmbosschaert opened this issue 2 years ago • 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

mmbosschaert avatar Jan 05 '24 12:01 mmbosschaert

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.

touste avatar Mar 02 '24 21:03 touste

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.

jondeuce avatar Mar 03 '24 02:03 jondeuce