[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Pkg-octave-devel] Bug#695434: Bug#695434: octave: Seg fault in __contourc__



* Pierre St-Laurent <Pierre.St-Laurent@uqar.qc.ca> [2012-12-07 22:14]:
>>
>> I get a segmentation fault from __contourc__ when using the
>> function contour() on a certain array. More precisely, the seg
>> fault occur inside contourc.m at the line:
>>
>> ## Now call __contourc__ for the real work... c = __contourc__ (ii,
>> jj, z, vv);
>>
>> The seg fault will occur or not occur depending on the contour
>> levels (vv) that are requested. The same command applied to the
>> same array works fine in squeeze, no matter what the contour levels
>> are.
>>
>> This array is of size 469x760, it does not contain any NaNs, and
>> its min/max values are 30/4336. The array is relatively complex (it
>> is the topography of the ocean floor in a certain part of
>> Antarctica). I'd be happy to send a copy of the array to anybody
>> who wants to give it a try.
>>
>> Unfortunately I could not reproduce the bug with a simpler array (say, peaks()).
>>
>> I am aware that such bugreport is of limited use, but please let me
>> know if you have any suggestion on how to circumvent this seg
>> fault.

> Yes, without the precise data and the precise code that triggers the
> bug, this report is pretty useless.  Please, send them to this bug
> report address (695434@bugs.debian.org).

Ok, I saved the array in a .mat file and attached it to this email.
I can trigger the code every time by starting a fresh octave session and typing:

load array.mat; % Provides array z of size 469x760
ii = 1:size (z,2); % From contourc.m
jj = 1:size (z,1); % From contourc.m
c = __contourc__ (ii, jj, z, [500 500]); % will seg fault
%c = __contourc__ (ii, jj, z, [1000 1000]); % will work fine

The last line shows that the behavior depends on the actual contour level requested.
500 cause seg fault, but 1000 is fine. The same instruction works all the time on my other laptop that has squeeze.

Thanks,

Pierre

Attachment: array.mat
Description: array.mat


Reply to: