MatLab crashing while saving variable

Hello,
I am facing issues saving variables from my workspace. MatLab always crashes when I try to save handle objects.
When I test it with less objects it works all fine, but when I try it with my desired number it just crashes.
I dont expect the size of the reuslting mat file to exceed 2GB, however i set -v7.3 as default in my preferences for saving manualy by right clicking "save as", but I also tried it within the code as
save('test','grains','-v7.3')
Both didnt help and it just crashed.
I uploaded a file where u can see the structure if my objects, in this case there are 2000 objects, filesize is 246KB, I also can save 40k objects, filesize is now 150MB, but my desired value of 160k objects cant be done...
I use Win 10 64bit as OS and MatLab 2019b
Does anybody has an idea how i can save these many objects so i can use same as input and dont have to recalculate them everytime?
Many thanks in advance
Best regards

 Respuesta aceptada

Image Analyst
Image Analyst el 3 de Jul. de 2020

0 votos

When it crashed, did it offer to send in the crash log, either when it crashed or when you started MATLAB the next time? If so, do that and someone will contact you. Otherwise if it's repeatable, you can call tech support and they will help you. See the FAQ entry: FAQ After installation MATLAB crashes or gives an error message when I try to run MATLAB

5 comentarios

Marc Laub
Marc Laub el 3 de Jul. de 2020
Editada: Marc Laub el 3 de Jul. de 2020
I got no report at all, neither directly when crashing nor when restarting. I just have the file with my desired filename but with 0KB in size, but the problem is repeatable.
I found some files in /temp from the right date and time and names like "mat-debug-6715272" or "aria debug ..." or but those are all empty with a size of 0KB, like my file i want to save
Image Analyst
Image Analyst el 3 de Jul. de 2020
And what happened when you called them? Are they off today because of hte US holiday? Or did they tell you to get lost (doubtful)?
Marc Laub
Marc Laub el 8 de Jul. de 2020
The problem was that i had many object that are linked together and matlab tries to save one og these objects which ahs pointer to 5 or so other objects and ech of them has pointers to more objects. matlab tries to serealize those objects. Since all my objects are interconnected matlab simply cant handle it to save recursive defined objects in such a large number. my nuber of serialized pointers just exceeded the depth of matlabs recursive save ability.
I just have to save it in another way, like a adjacend matrix like its done in the graph function
Image Analyst
Image Analyst el 8 de Jul. de 2020
Well they should be able to handle that with just a regular error message, like spew out red text to the command window rather than crashing MATLAB completely, like with a "MATLAB has encountered an error and needs to close" like it would say in Windows. Is that what you got? Which happened:
  1. A crash where you had to close MATLAB or it closed itself, or
  2. was it just a regular error with red text in the command window that stopped your program only, but MATLAB itself continues to run.
Which case was it?
If it's case 1, then that shouldn't happen and the Mathworks would want to know about it.
If it's case 2, then that's just an error in your program (like your recursion went too deep or whatever), then that's for you to solve.
Marc Laub
Marc Laub el 8 de Jul. de 2020
First case. MatLab closed itself without any message or report at all.
I guess they now know about that error because the tech support told me what causes the crashing.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Productos

Versión

R2019b

Preguntada:

el 3 de Jul. de 2020

Comentada:

el 8 de Jul. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by