double free or corruption (out) error when using MATLAB Runtime 2023b
60 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
dpb
le 16 Août 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.
Réponses (1)
Christine Tobler
le 18 Août 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 commentaires
Christine Tobler
le 19 Août 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.
Voir également
Catégories
En savoir plus sur Python Package Integration dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!