help-octave
[Top][All Lists]
Advanced

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

Re: loop causes a crash


From: John B. Thoo
Subject: Re: loop causes a crash
Date: Fri, 22 May 2009 05:39:43 -0700


On May 21, 2009, at 11:32 PM, Carlo de Falco wrote:


On 21 May 2009, at 23:02, Carlo de Falco wrote:


On 21 May 2009, at 07:48, Bertrand Roessli wrote:

I submitted this report to


address@hidden

but I think it did not arrive:



Hello,

this loop causes a crash in Octave-3.1.55:

for i=1:10
      for j=1:10
              for l=1:10
                      a(j,l,i)=1; %crash
                      %a(i,j,l)=1; %is fine
              endfor
      endfor
endfor

This works fine for me with the latest sources from mercurial on OSX.
c.




Actually I was too quick in saying that it works for me:

---------------------------------
for i=1:10
        for j=1:10
                for l=1:10
                        a(j,l,i)=1; %crash
                        %a(i,j,l)=1; %is fine
                endfor
        endfor
endfor

---------------------------------

produces no error, but

---------------------------------
size(a)
panic: Segmentation fault -- stopping myself...
Segmentation fault
---------------------------------

On 3.0.5 on OS X 10.4.11:

octave-3.0.5:1> for i=1:10
> for j=1:10
> for l=1:10
> a(j,l,i) = 1;
> endfor
> endfor
> endfor
octave-3.0.5:2> a
octave-3.0.5:3> size (a)
ans =

   10   10   10

octave-3.0.5:4>

---John.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]