Sat 28 Oct 2017 12:25:20 PM UTC, comment #13:
I configured MXE-Octave with the following:
With our own opengl32.dll file in the bin-folder, printing no longer hangs forever.
|
Sat 07 Oct 2017 05:12:23 PM UTC, comment #12:
Dmitri, I tried the command you suggested and got the following results:
Octave returns to the prompt in that case. However, the resulting pdf cannot be opened with Adobe Reader.
Please, find the resulting pdf and tex files attached.
(file #42080, file #42081)
|
Sat 07 Oct 2017 05:02:22 PM UTC, comment #11:
May be Windows build is special, but I thought eps should
be written by gl2ps directly (no ghostscript involved).
Can you try
tic; print("t1.pdf", "-dpdflatexstandalone"); toc
Dmitri.
|
Sat 07 Oct 2017 03:04:25 PM UTC, comment #10:
I can confirm that the figure can be plotted very fast on Windows 10 with Octave 4.2.1. I also cannot re-produce with Octave 4.3.0+ hg id "5570b0f12112" (qt4).
However, I am seeing the issue again on a more recent build with hg id "c2ef0eddf6bc" and 3 later builds that were build with qt5.
When issuing the print command, Octave stops responding and "gs.exe" uses one core indefinitely (25% CPU usage on a quad-core). After 20 minutes, it was still not finished. It also doesn't stop using the CPU when I kill Octave.
This can also be re-produced with:
Printing succeeds and is fast with "graphics_toolkit gnuplot".
I don't know whether this has something to do with the switch from qt4 to qt5 or with something else that has changed between these builds.
Marking as a regression on dev.
|
Tue 03 Jan 2017 10:26:12 PM UTC, comment #9:
I have tested this on the new release 4.2.0. It has worked flawlessly and does not appear to crash or hang at all. This issue can be closed.
|
Tue 28 Jun 2016 11:27:24 AM UTC, comment #8:
Retagging from "crash" to "performance".
|
Fri 26 Feb 2016 11:24:17 PM UTC, comment #7:
After further tinkering around (due to Mike's suggestion), I found that saving in vector file formats (eps, svg etc) is extremely fast and works, while saving as bitmap images (jpeg png etc) seems to hang Octave, at least for these cases.
As a temporary work around, I can suggest saving as vector files, like .svg and using pprograms such as inkscape to export it as an image. Its a lot of manual labour, but for some cases it might come in handy until the problem is solved.
|
Fri 26 Feb 2016 06:51:57 PM UTC, comment #6:
Ah yes, I see, my bad. It does not hang indeed. So maybe ghostscript is at fault here.
For the time being, I got around by using my University computers to access MATLAB, from which I could save the plots as images. It would be nice if someone can confirm this and get to the root of this problem.
|
Fri 26 Feb 2016 06:33:40 PM UTC, comment #5:
But it does not hang like it did when you tried to print to a png? So that is a meaningful result. It hints that the png conversion is what's taking a long time (which I also saw on Debian, although not a half hour).
Can someone on Windows test the script provided in this report and confirm a long delay with printing the log plot to a png?
If you're looking for solutions or workarounds to this in the meantime, you can obviously try reducing the number of points in your data sets before plotting.
|
Fri 26 Feb 2016 06:26:27 PM UTC, comment #4:
I changed it to the eps extension, but it does not produce any meaningful results. When I import to Word it does not display the plot. Tried displaying on LibreOffice Draw which displayed some comments (Creator, CreationDate, and Language level). I am not sure whats going on here.
Attached the screenshot in case you want to look at it.
(file #36476)
|
Fri 26 Feb 2016 05:49:44 PM UTC, comment #3:
The script works for me on Debian. It does take an extremely long time to save to a png, mostly in the ghostscript external program which converts from an eps file to a png file. Can you try changing the output file extension to .eps and see if that avoids freezing?
|
Fri 26 Feb 2016 05:21:18 PM UTC, comment #2:
@Mike
Thanks for the response Mike!
The RC-3 version does not appear to have the issue fixed.
Tried waiting for about half hour each (which in my opinion is way too longer than necessary) and still does not work. Just hangs up.
Let me clarify this. The plots DO show up. I can see them and they seem fine. But the moment I try to SAVE them, by using the print() or saveas() command, they freeze up. I am not sure why.
What I meant was that using the same parameters (fs=3000, l=30003 etc) and the script, generating a simple waveform, for instance, a sinc wave (instead of using the data I have) appears to save without issues. But when I try doing with the data I collected, or for that matter using randn() to generate the data, the same issue arises.
The length of the data is 30003. Please take a look at the code I had attached earlier if you want to go through it.
|
Sun 21 Feb 2016 08:29:41 PM UTC, comment #1:
Thanks for the report. I'm sorry no one has responded to this yet. I am not a Windows user or developer, but there have been several similar issues with Octave plots freezing on Windows. You say simpler plots do not show this problem, can you narrow down what type of plot or the size of the plot that is needed to cause this error to happen for you?
Can you also try the 4.0.1-rc3 release candidate to see if the issue has already been resolved?
Can you try waiting longer to see if the saving is simply taking a long time?
|
Fri 15 Jan 2016 07:49:00 PM UTC, original submission:
Octave hangs and crashes when trying to save a particular plot that I needed. I can see the graph, but as soon as the saveas command is used, it hangs. The code is provided here and attached as well (along with the required data):
clear all;
close all;
clc;
pkg load optim;
path='PSD_Data_1\';
files=dir(sprintf('%s*.mat',path));
[r1,c1]=size(files);
fs=3000;
curveorder=1;
load(sprintf('%s%s',path,files(1).name));
l=length(data);
nfft=2^nextpow2(l);
f=0:fs/nfft:fs/2;
f2=f(2:end);
freqspec=abs(fft(data,nfft));
freqspec=freqspec(1:nfft/2+1);
powspec=1/(fsnfft)abs(freqspec).^2;
powspec(2:end-1)=2*powspec(2:end-1);
powspecdb=10*log10(powspec);
[alpha,c,rmsval]=expfit(curveorder,f(1),(fs/nfft),powspecdb);
curveval=(-exp(alphaf))c;
figure
semilogx(f,curveval);
hold on;
semilogx(f,powspecdb);
curvecoeff=polyfit(f',powspecdb,1);
curveval2=polyval(curvecoeff,f');
grid on;
hold off;
figure
semilogx(f,curveval2);
hold on
semilogx(f,powspecdb);
grid on;
hold off;
print(1,'PleaseDoNotCrash.png');
Additional Info: Octave 4.0.0, Windows 7 SP1 64 Bits.
N.B: Tried it with a few others, did not crash. Crashes with this particular code.
|