[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52904] "mesh" with input array of "logical" t
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #52904] "mesh" with input array of "logical" type causes Octave to crash |
Date: |
Mon, 15 Jan 2018 17:42:36 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0 |
URL:
<http://savannah.gnu.org/bugs/?52904>
Summary: "mesh" with input array of "logical" type causes
Octave to crash
Project: GNU Octave
Submitted by: None
Submitted on: Mon 15 Jan 2018 10:42:35 PM UTC
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Segfault, Bus Error, etc.
Status: None
Assigned to: None
Originator Name: Alexandre
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 4.2.1
Operating System: GNU/Linux
_______________________________________________________
Details:
case 1, works OK:
mesh(zeros(25,25)); # real data
case 2, one line is enough to make Octave immediately exit without any
warning.
mesh(zeros(25,25)==0); # "logical" array argument
Looks like a crash to me. It's the type of the argument and not its value that
causes the problem.
Expectation: should implicitly convert logical to real, like Matlab does.
My problem didn't arise from a silly experiment; I was rehabilitating some
antique Matlab finite difference code that defined sampling points for an
arbitrary shape, e.g. something like the following:
t=linspace(-1,1,50);
[x,y]=meshgrid(t,t);
z=x+sqrt(-1)*y;
clear t,x,y;
a=(abs(z)<0.8) & (abs(z)>0.3); # mmmm, donuts!
mesh(a+0); % workaround, convert to real
Version:
GNU Octave Version: 4.2.1
Operating System: Linux 4.13.0-26-generic #29~16.04.2-Ubuntu SMP Tue Jan 9
22:00:44 UTC 2018 x86_64
Also tested on Raspbian (Raspberry Pi). Here I get an almost appropriate error
message about invalid "zdata". Should implicitly convert for Matlab
compatibility.
The "contour" function doesn't crash on either Ubuntu or Raspbian, but
displays the zdata error message.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52904>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #52904] "mesh" with input array of "logical" type causes Octave to crash,
anonymous <=
- [Octave-bug-tracker] [bug #52904] "mesh" with input array of "logical" type causes Octave to crash, Dan Sebald, 2018/01/15
- [Octave-bug-tracker] [bug #52904] "mesh" with input array of "logical" causes error, Rik, 2018/01/16
- [Octave-bug-tracker] [bug #52904] "mesh" with input array of "logical" causes error, Dan Sebald, 2018/01/16
- [Octave-bug-tracker] [bug #52904] "mesh" with input array of "logical" causes error, Dan Sebald, 2018/01/16
- [Octave-bug-tracker] [bug #52904] "mesh" with input array of "logical" causes error, Rik, 2018/01/16
- [Octave-bug-tracker] [bug #52904] "mesh" with input array of "logical" causes error, Markus Mützel, 2018/01/16
- [Octave-bug-tracker] [bug #52904] "mesh" with input array of "logical" causes error, Rik, 2018/01/16
- [Octave-bug-tracker] [bug #52904] "mesh" with input array of "logical" causes error, Markus Mützel, 2018/01/16
- [Octave-bug-tracker] [bug #52904] "mesh" with input array of "logical" causes error, Dan Sebald, 2018/01/16
- [Octave-bug-tracker] [bug #52904] "mesh" with input array of "logical" causes error, Rik, 2018/01/16