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

julia segfault when initializing jlcall

Open BPMinaker opened this issue 10 months ago • 2 comments

I've encountered an issue on MATLAB 2023b while running jlcall for the first time to install MATDaemon.jl - Julia segfaults. The issue arises from environment variables that MATLAB sets before calling Julia. It appears that inserting the following:

setenv('LD_LIBRARY_PATH','');

on line 541 allows the script to complete, and jlcall to function. I don't think that this is the proper way to resolve this issue, but it works.

BPMinaker avatar Apr 08 '25 20:04 BPMinaker

Thanks for the heads up. Unfortunately, issues like this have come up before (see this section in the readme), and I'm not really sure if there is a good general solution. At one point I considered adding a line like setenv('LD_LIBRARY_PATH', ''); to jlcall.m as you have done (I ran into a similar issue), but I figured it was best not to mess with users' environment variables.

jondeuce avatar Apr 08 '25 22:04 jondeuce

I've updated the troubleshooting section of the readme. Based on this MATLAB help centre answer, this seems like a fairly reasonable workaround.

jondeuce avatar Apr 08 '25 22:04 jondeuce