double free or corruption (out) error when using MATLAB Runtime 2023b
61 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
dpb
il 16 Ago 2025
"...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.
Risposte (1)
Christine Tobler
il 18 Ago 2025
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 Commenti
Christine Tobler
il 19 Ago 2025
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.
Vedere anche
Categorie
Scopri di più su Python Package Integration in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!