octave-maintainers
[Top][All Lists]
Advanced

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

OpenGL graphics crash


From: John W. Eaton
Subject: OpenGL graphics crash
Date: Wed, 8 Jul 2009 16:26:00 -0400

The following

  backend ("fltk")
  demo slice

causes the following segfault on my system:

  slice example 1:
   [x, y, z] = meshgrid (linspace (-8, 8, 32));
   v = sin (sqrt (x.^2 + y.^2 + z.^2)) ./ (sqrt (x.^2 + y.^2 + z.^2));
   slice (x, y, z, v, [], 0, []);
   [xi, yi] = meshgrid (linspace (-7, 7));
   zi = xi + yi;
   slice (x, y, z, v, xi, yi, zi);

  octave:3> 
  Program received signal SIGSEGV, Segmentation fault.
  [Switching to Thread 0x7f577720c710 (LWP 2009)]
  0x00007f5776325d7d in convert_cdata (address@hidden, address@hidden, 
      is_scaled=true, cdim=3) at /home/jwe/src/octave/src/graphics.cc:447
  447         av[i]       = cmapv[idx];
  Current language:  auto; currently c++
  (gdb) p idx
  $1 = -2147483648
  (gdb) list
  442         else if (x >= nc)
  443           x = (nc - 1);
  444   
  445         octave_idx_type idx = static_cast<octave_idx_type> (x);
  446   
  447         av[i]       = cmapv[idx];
  448         av[i+lda]   = cmapv[idx+nc];
  449         av[i+2*lda] = cmapv[idx+2*nc];
  450       }
  451   
  (gdb) p x
  $2 = nan(0x840f440000000)

The NaN value appears because the slice function sets some elements of
cdata to NA.  I'm unsure of the intent of the convert_cdata function,
so I'm not sure what values should be computed for elements of cdata
that are NA or NaN.

jwe


reply via email to

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