Sun 08 May 2016 03:35:23 PM UTC, comment #2:
Here is a more minimal example:
The top two frames of the backtrace:
This is clearly because the code is not checking whether args(i+1) is valid if args(i) is a valid parameter name.
This would be a good bug for a new contributor to work on.
|
Sun 08 May 2016 09:36:32 AM UTC, original submission:
Octave 4.0 crashes using audiowrite if incorrect values are used.
This is the code that crashes Octave every-time using octave 4.0.0. I'm using Ubuntu 16.04 64bit
fs =8000; % Sampling frequency
fs_rate=fs;
dursec=10; %%duration of signal in seconds
t=linspace(0,2pi,dursecfs);
freq=primes(fs/2*dursec);
freq=freq';
ya=zeros(1,length(t));
numfreq=numel(freq)
for ii=1:1:numel(freq)
ya = ya+sin(freq(ii,1)*t);
end
audio_prop='BitsPerSample',16,'Artist','artist rt','Title','title section rt','Comment','Comments section rt';
audiowrite('/tmp/test.flac',[ya(:) -1*ya(:)],44100,audio_prop)
this can be prevented by using the correct syntax and changing the following two lines
audio_prop={'BitsPerSample',16,'Artist','artist rt','Title','title section rt','Comment','Comments:fn used goes here'};
audiowrite('/tmp/test.flac',[ya(:) -1*ya(:)],44100,audio_prop{:})
|