Borrar filtros
Borrar filtros

Matlab crashes when saving fig

20 visualizaciones (últimos 30 días)
John
John el 8 de Jul. de 2016
Comentada: Nicholas George el 15 de Jun. de 2022
In many cases, when saving the figure, the matlab crashes. It happens several times a day. It wasn't the case before 2015 version. It's very frustrating!!!!
Can anyone help?
  8 comentarios
Walter Roberson
Walter Roberson el 24 de Oct. de 2016
It was 4762 seconds, about 1 1/3 hours :(
Russ Park
Russ Park el 24 de Oct. de 2016
Thank you for the corroboration.
I read, from another similar case, that certain graphics hardware required some kind of driver initialization. If this is true I'm not sure how to confirm and remediate.

Iniciar sesión para comentar.

Respuestas (3)

Walter Roberson
Walter Roberson el 24 de Oct. de 2016
The cure for R2014b and later, for the case where you do not need the file to be openable with MATLAB R2014a or earlier, is
tic; savefig(gcf, '/tmp/testfig.fig', 'compact'); toc;
This will save in a fraction of a second.
  2 comentarios
Russ Park
Russ Park el 24 de Oct. de 2016
Great. I'll give this a try and report back.
Russ Park
Russ Park el 24 de Oct. de 2016
Fantastic. That worked as promised. Thank you Walter!

Iniciar sesión para comentar.


John
John el 14 de Nov. de 2016
Editada: John el 15 de Nov. de 2016
That's not the issue.
When exam a figure (just plot or opened) and decide to save, then click on file->save or save as, the entire matlab crushes, very often. Many cases, the long time calculation just get lost along with the crush.
  3 comentarios
John
John el 15 de Nov. de 2016
Where is the crush log? Windows 7 ultimate 64-bit. Problem occurs since 2014b or 2015a, it's now 2016a. Before it never had this problem. This is my 15th year of Matlab.
Walter Roberson
Walter Roberson el 15 de Nov. de 2016
Editada: Walter Roberson el 15 de Nov. de 2016
What kind of object are you requesting to save as? .fig? jpg? Or do you not get far enough to be given a choice?
I just tested in R2016a on a Windows 8 system and had no problem saving to fig or jpg.
Unfortunately I do not have a Windows 7 license available so I cannot test in Windows 7.

Iniciar sesión para comentar.


Chad
Chad el 28 de Sept. de 2017
I ran into this thread and thought it was worth an update: I was struggling to understand why a figure I could see was not a figure I could save. I also was unable to file->saveas-> png, but I was able to save as a .fig. The issue was in the difference between PaperPosition and Position figure properties:
hf = figure;
paperSize=[50,50,1260,820];
printSize=[0 0 16 9];
hf.Position = paperSize;
hf.PaperPosition = printSize;
plot(1,1)
saveas(gcf, 'demo.fig')
saveas(gcf, 'demo.png')
hf = figure;
hf.PaperPosition = paperSize; %this is wrong
plot(1,1)
saveas(gcf, 'demo2.fig');
saveas(gcf, 'demo2.png'); %this line fails
If I accidentally put paperSize into PaperPosition, the function crashes. I imagine this is what a lot of the people on the thread are actually dealing with, but a large amount of data may also cause a crash.
  1 comentario
Nicholas George
Nicholas George el 15 de Jun. de 2022
I have the problem of seeing blue screen on saving the plot as jpg. So I tried the saveas code in the program. Now the plot got saved. Thank you Chad

Iniciar sesión para comentar.

Categorías

Más información sobre Printing and Saving en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by