[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Also a lazy_index bug (Re: Assignment fails, crash)
From: |
Jarno Rajahalme |
Subject: |
Also a lazy_index bug (Re: Assignment fails, crash) |
Date: |
Mon, 10 May 2010 21:17:07 -0700 |
I looked at the src/ov-lazy-idx.h|cc and that being new code (2010), therein
lies a bug somewhere. To verify I tested this with 3.2.3, and there the results
are identical.
Also, looking at octave_lazy_index::save_ascii for example, I have no idea why
the type "lazy_index" should appear in the saved file, as the saved object is a
octave_value created from idx_vector?
However, it might be mostly due to lazy_index that my code runs so much faster,
so I would very much appreciate if someone would take a look at this..
Jarno
On May 10, 2010, at 8:37 PM, Jarno Rajahalme wrote:
> Here is another bug, likely related to the other one. (both are now in
> Savannah). Both should produce the same output.
>
> $ octave
> GNU Octave, version 3.3.51+
> ...
> Octave was configured for "x86_64-apple-darwin10.3.0".
> ...
> octave:1> testdata(find([1:2] != 0)) = [1:2]
> testdata = 1
> octave:2> testdata(find([1:2] != 0)+0) = [1:2]
> testdata =
>
> 1 2
>
> octave:3>
>
>
> I would really appreciate if someone knowledgeable would comment on this. I
> would hate to go back to 3.2.3 because of this, the dev branch seems to be
> about 4x faster on my code...
>
> I also got this, while reducing the bug from my code, but do not know how to
> reproduce at this time:
>
> panic: Segmentation fault -- stopping myself...
> attempting to save variables to `octave-core'...
> terminate called after throwing an instance of 'std::logic_error'
> what(): basic_string::_S_construct NULL not valid
> panic: attempted clean up apparently failed -- aborting...
> Abort trap
>
>
> On May 10, 2010, at 7:58 PM, ext Jarno Rajahalme wrote:
>
>> $ octave
>> GNU Octave, version 3.3.51+
>> ...
>> octave:1> 1(find([1 1] != 0))
>> ans =
>>
>> 1.0000e+00 2.1617e-314
>>
>> octave:2> 1(find([1 1] != 0)+0)
>> error: A(I): index out of bounds; value 2 out of bound 1
>> octave:2>
>>
>> The result on the prompt 1 above is clearly incorrect. Saving a result of
>> the find above, and looking at the file tells that the result is a
>> "lazy_index".
>>
>> Any ideas?
>>
>> Jarno
>>
>>
>