double free or corruption (out) error when using MATLAB Runtime 2023b

조회 수: 37 (최근 30일)
Greg
Greg 2025년 8월 15일
댓글: Christine Tobler 2025년 8월 19일
I can not add an example of my code below because it is in a closed space, however I've been able to isolate the issue.
While using matlab runtime 2023b with python, I am importing my own .ctf file. After about 2000 calls of the eigs() function in matlab I eventually receive a "double free or corruption (out) MATLAB is exiting because of the fatal error." I've never received this error when simply just using matlab with the same code base. So my theory is that there's something wrong with MATLAB Runtime. Has anyone ruin into this? Does anyone have any advice on what I could possibily try next?
  댓글 수: 2
dpb
dpb 2025년 8월 16일
"...my theory is that there's something wrong with MATLAB Runtime"
Not necessarily, in fact, if the MATLAB-only code doesn't exhibit the problem, it would eliminate it being the source.
It would appear to have to do with the Python interface or Python runtime or even, perhaps, the underlying compiler runtime libraries. The message indicates an attempt somewhere in the bowels to a memory allocation problem; generally it indicates the attempt to free an already deallocted chunk of memory or a corrputed handle to such a memory block.
Greg
Greg 2025년 8월 18일
That you for your comment! So I've been able to scope down my issue even more based on what you said. I'm still not sure what exactly the issue is, HOWEVER I ended up testing my code with a different version of Python. The error takes place when I'm using Python 3.10.4 with MATLAB 2023b in the eigs function, however when I switched and used Python 3.9.21 I didn't receieve an out or memory error.
Is there a nuasce when using MATLAB Runtime 2023b and Python 3.10.4?

댓글을 달려면 로그인하십시오.

답변 (1개)

Christine Tobler
Christine Tobler 2025년 8월 18일
This seems to point to a memory corruption, the source of which is always hard to pinpoint (since the corruption could have happened quite a bit before the eventual crash).
You could send this in as a bug report - I'd say the first step would be to try to find minimal reproduction steps.
  댓글 수: 2
Greg
Greg 2025년 8월 18일
That you for your comment! So I've been able to scope down my issue even more based on what you said. I'm still not sure what exactly the issue is, HOWEVER I ended up testing my code with a different version of Python. The error takes place when I'm using Python 3.10.4 with MATLAB 2023b in the eigs function, however when I switched and used Python 3.9.21 I didn't receieve an out or memory error.
Is there a nuasce when using MATLAB Runtime 2023b and Python 3.10.4?
Christine Tobler
Christine Tobler 2025년 8월 19일
I'm afraid I'm not an expert on MATLAB Runtime and its interaction with python. In this doc page:
It says that R2023b MATLAB runtime is compatible with both Python 3.9 and 3.10, generally speaking.
If using Python 3.10.4 fixes the issue, it's of course possible that this is due to some bug fix in python. Or it could be related to how MATLAB interacts with Python in 3.9 vs. 3.10, although without any knowledge I would expect there not to be too much special-case treatment in that interaction.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Python Package Integration에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by