System/Interpreter/Bugs/Fixed

From J Wiki
< System‎ | Interpreter‎ | Bugs
Jump to: navigation, search
Requests: Interpreter   Bugs: Interpreter

Please restrict the headings to just two levels, with the actual bug reports placed at the top level; sign your submission using ~~~~; register the entry in the comment field below.


Contents

Fixed after Release 8.04

spurious errors from infinite infixes

Infix, dyadic (verb derived from) \, raises spurious errors when given an infinite LHA:

        _  <\ i. 4        NB.  Fine

        _ 0:\ i. 4        NB.  Fine

        _  ]\ i. 4        NB.  Bug
|domain error
|   _    ]\i.4


        _  <\ i. 4        NB.  Fine

   ({., _) <\ i. 4        NB.  Weird!
|limit error
|   ({.,_)    <\i.4

   infinity0 =:      _
   infinity1 =: {. , _    NB.  Identical to  _

   infinity0 -: infinity1 NB.  Matches
1

   infinity0 <\ i. 4      NB.  Fine

   infinity1 <\ i. 4      NB.  Bug
|limit error
|   infinity1    <\i.4

   infinity2 =: 3!:2 (3!:1) infinity0  NB.  Byte-identical to  _

   infinity2 <\ i. 4      NB.  Bug
|limit error
|   infinity2    <\i.4

   infinity2 <\ 0         NB.  Fine -- scalar RHA

   infinity2 0:\ 0        NB.  Fine

   infinity2 ]\ 0         NB.  Bug (still)
|domain error
|   infinity2    ]\0

       __ ]\ i. 4         NB.  Bug (still)
|domain error
|   __    ]\i.4

Oh yeah, and trateotu=:15!:7(15!:6)<'infinity'[infinity=:_ will crash J. What, I can't have a pointer to infinity? ;)

Status: fixed.

-- Dan Bron <<DateTime(2007-01-06T03:58:57Z)>>



crash on f. while suspended

The following lines will crash J:

   sr           =:  1 : 'u y'
   13!:0]1
   13!:8]12
|assertion failure
|       13!:8]12
|[-0]
   (+ sr        ) f.       NB.  J crashes here

The crash requires that the operator (either adverb or conjunction) mention both its own arguments and the arguments of its derived entity. That is, it must mention at least one of the names in each of the sets u v m n and x y.

More specifically, I believe it has derive one of those 'pending verbs' that J doesn't know what to do with until it is called with arguments (i.e. where the display of the verb contains the explicit definition of the operator and the linear representation of the argument(s) to the operator).

The crash only occurs if J is suspended.

The crash also appears dependent on the specific name of the operator. Certain names cause crashes, while others just prematurely return to immediate execution:

   anOperator   =:  1 : 'u y'
   13!:0]1
   13!:8]12
|assertion failure
|       13!:8]12
   (+ anOperator) f.       NB.  No crash


   a =. (+ anOperator) f.
   a                       NB.  pretix
|value error: a
}}}  Note that the only difference in the code for the crash vs the pretix is the name of the operator.

Status: fixed.

-- Dan Bron <<DateTime(2007-02-06T16:59:56Z)>>


inverting hook recursion

Not sure this is a bug, but the final sentence here:

   U =: * >: :.L
   L =: * <: :.U

   U b. _1
|out of memory
|       U b._1

Hangs J until it runs out of memory. It appears that the sentence is recursive; for some reason, requesting for the inverse of U requests the inverse of L, which in turn requests the inverse of U, ad infinitum. I only discovered this bug through a typo, and I don't know what the definition of f (g :. h) ^:_1, but it's not clear why it should inspect the value of h (is it trying to f. for some reason?).

Applies to ( 'j602/beta/2007-09-19/23:00';6;'jwin32' ) -: (9!:14'') ; (9!:12'') ; wd 'qwd' (This does not mean that the bug is restricted to this environment, only that it is the one I tested.)

Status: fixed.


assert. followed by if. crashes

   3 : 0
assert. if. do. end.
5
)

crashes -- Henry Rich <<DateTime(2012-08-02T14:21:30-0000)>>

Status: fixed.

numeric dyad E. corrupts memory

G =:0 1 2 2 3 4 4 5 5 6 7 7 8 9 10 10 11 11 11 12 12 12
G =: G ,. 1 2 3 4 5 6 5 7 8 7 9 10 10 11 12 11 13 14 15 16 15 14
G =: <"1 G
joinroutes =: 4 : 0&.>
l =. >: (y i. {: x)
f =. 0:^:((#y)&=) (y i. {. x)
z =. (f {. y) , x , (l }. y)
NB. this is the culprit  -->  y E. z
y
)
jtree =: ([: ~.@; joinroutes)/
jtree G

If I uncomment the indicated line, I get a loop. That implicates numeric dyad E. . -- Henry Rich <<DateTime(2012-08-11T14:21:30-0000)>>

Status: fixed.

;!:f fails on empty operands producing non-empty result

   ;!.'a' (0 2$4);''
24929 0
   ;!.2 (0 2$a:);''
--- J hangs ---

-- Henry Rich <<DateTime(2014-04-06T19:08:14Z)>>

Status: fixed.


/:~ produces atomic result on atomic Boolean or byte y

Also, Booleanatom /: Booleanatom also produces an atom if the atoms are equal.

This bug was found by Brian Schott.

Moreover, /:~1 produces 0 on J32 (found by Zhe Hu).

-- Henry Rich <<DateTime(2015-02-16T23:51:41Z)>>

Status: fixed.

'a' + 0$0 fails

   5 + ''

   ' ' + 0$0
|domain error
|   ' '    +0$0
   ' ' (3 : 'x + y'"0) 0$0  NB. It should be like this

-- Henry Rich <<DateTime(2015-02-17T22:34:36Z)>>

Status: fixed.


x u\ y supplies wrong argument to u when y is an atom and x > 1

   $ 1 +\ 5
1 1
   $ 2 +\ 5
0

An atomic cell of fills, rather than a list, is supplied to u when x is greater than 1

-- Henry Rich <<DateTime(2016-02-08T14:52:11Z)>>

Status: fixed.

1 +/\ atom returns atom

   $ 1 +/\ 5

   $ 1 +"+/\ 5
1

Should return singleton list.

-- Henry Rich <<DateTime(2016-02-08T14:52:11Z)>>

Status: fixed.

_ u\ y does not execute u on a cell of fills

   $ _ i.@2:\ i. 4 5
0 5
   $ 5 i.@2:\ i. 4 5
0 2

Shape 0 2 is correct.

-- Henry Rich <<DateTime(2016-05-24T14:52:11Z)>>

Status: fixed.

x ["n y identity improperly optimized

The results of the following two sentences should be the same. They are not:

   (i. 10) 4 :'x'"0  i. 10 10
0 0 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1
2 2 2 2 2 2 2 2 2 2
3 3 3 3 3 3 3 3 3 3
4 4 4 4 4 4 4 4 4 4
5 5 5 5 5 5 5 5 5 5
6 6 6 6 6 6 6 6 6 6
7 7 7 7 7 7 7 7 7 7
8 8 8 8 8 8 8 8 8 8
9 9 9 9 9 9 9 9 9 9

   (i. 10)      ["0  i. 10 10
0 1 2 3 4 5 6 7 8 9

The latter result is erroneous (and the question is not academic).

Applies to ( 'j602/beta/2007-09-19/23:00';6;'jwin32' ) -: (9!:14'') ; (9!:12'') ; wd 'qwd' (This does not mean that the bug is restricted to this environment, only that it is the one I tested.)

Status: fixed.

-- Dan Bron <<DateTime(2008-01-20T04:44:27Z)>>

'abc' + 1 2 incorrectly gives domain error instead of length error

   'abc' + 1 2
|domain error
|   'abc'    +1 2
   'abc' +"+ 1 2
|length error
|   'abc'    +"+1 2

The results should be consistent. -- Henry Rich <<DateTime(2012-12-26T22:21:30-0500)>>

Status: fixed.

Bug in special code for ;@:(<@u;.1)

   ;@:(<"<@(,:"0);._1) 1 2 3 1 2 1 2
2 3 2 2
   ;@:(<@(,:"0);._1) 1 2 3 1 2 1 2
2
3
2
2
   ;@:(<"<@(,."0);._1) 1 2 3 1 2 1 2
2
3
2
0
2
0
   ;@:(<@(,."0);._1) 1 2 3 1 2 1 2
2

3

2

2
It seems to treat <@u like <@:u

-- Henry Rich <<DateTime(2014-04-29T17:32:20Z)>>

Status: fixed.

explicit operators don't recognize derived verb arguments in locatives

Explicit operators do not derive explicit verbs when all references to the explicit verb arguments are in locatives:

   'X Y'     =: 18!:3&.>2#a:

   qty__Y    =:  10 ?. 500
   price__X  =:  1000 	%~ 10 ?. 1000
   tax_rate  =:  7e_2 4e_2 0 {~ (H 'NY NJ' ) i. {.@H=. 6 s: [: s: ;:^:(0 = L.)

   (- (tax_rate 'NY')&*)  price__X * qty__Y
19.8239 85.4744 192.351 14.6429 123.976 225.735 131.781 8.48904 52.8984 6.35376

   sales =: adverb define
:
       (- (tax_rate m)&*)  price__x * qty__y
)

   X 'NY' sales Y
|domain error: sales
|   X    'NY'sales Y

   'NY' sales
|domain error: sales
|       'NY'sales

So the operator is required to mention the explicit verb arguments outside of a locative at least once, even if the mention is useless:

   sales =: adverb define
:
       x
       (- (tax_rate m)&*)  price__x * qty__y
)

   X 'NY' sales Y
19.8239 85.4744 192.351 14.6429 123.976 225.735 131.781 8.48904 52.8984 6.35376

User:Raul Miller also encountered this problem; see the first line of his adverb in the SQL equivalent of a J function thread on the Forums.

Applies to ( 'j601/2006-11-17/17:05';6;'jwin32' ) -: (9!:14'') ; (9!:12'') ; wd 'qwd' (This does not mean that the bug is restricted to this environment, only that it is the one I tested. But obviously it was introduced when the [[JDic:../release/argnames|explicit names changed]])

Status: fixed.

-- Dan Bron <<DateTime(2007-04-14T13:55:32Z)>>

break inside select corrupts nested loop

bugtest =: 3 : 0
for_s. 'a';'b' do.
smoutput >s
  while. do.
    select. 9
    case. 0;1 do.
    case. 2;3 do.
    case. do. if. do. break. end.
    end.
  end.
end.
0
)
   bugtest''
a
0

Control passes to the end of the while, but then the for does not iterate again. -- Henry Rich <<DateTime(2012-07-30T23:12:30-0000)>>

Status: fixed.


4!:0 fails on incorrect numeric locale

   4!:0 <'aaa_0_'
_1
   4!:0 <'aaa_1_'
|locale error
|       4!:0<'aaa_1_'

Naming a numeric locale that has been deleted gives an error instead of the proper _2, as 4!:0 <'aaa_1x_'

-- Henry Rich <<DateTime(2014-06-30T14:52:11Z)>>

Status: fixed.

local assignment changes global name if special form is detected

   def =: 3 : 0
   a =. a , 1  NB. This modifies global a
)

Workaround: use ,"_

-- Henry Rich <<DateTime(2015-02-12T15:06:57Z)>>

Status: fixed.


extended root error

The phrase _2%:2x produces a (weird) error:

   _2%:2x
|

Note no error message is produced. Investigating this, I notice:

   13!:11''   NB.  Error number
53

I'm not sure what that means, though. The only time I've seen an error number > 50 is in the throw. case.

Status: fixed.

-- Dan Bron <<DateTime(2009-06-19T14:01:22-0300)>>

Specifying fit u/.!.f affects the tolerance used inside u

   1 1 1 1 (<@~.)/.!.0 (1) + 1e_15 * i. 4
+-------+
|1 1 1 1|
+-------+
   1 1 1 1 (<@~.)/. (1) + 1e_15 * i. 4
+-+
|1|
+-+

The fit given for u/. carries over to ~. . The tolerance should be restored after the partitioning has been calculated.

-- Henry Rich

Status: fixed.


Misplaced sign in dyad ":

   0j_4 ": 0.12 0.12 ,: _0.1 _1.1
 1.2000e_1  1.2000e_
_1.0000e_11_1.1000e0
   0j_4 ": 0.12 0.1e_11,: _0.1 _1.1
 1.2000e_1  1.0000e_1
_1.0000e_12_1.1000e0

-- Henry Rich <<DateTime(2014-04-14T22:15:05Z)>>

Status: fixed.


Bit lost in #: y when y is negative floating-point

   #: _2
1 0
   #: - 2.1-0.1
0

-- Henry Rich <<DateTime(2014-05-29T00:29:28Z)>>

Status: fixed. The case of negative y is problematic. It is up to the user to supply the missing high-order negative power.


($. i. 2 3) , 1r2 gives syntax error

   ($. i. 2 3) , 1r2

It should be a domain error or a nonce error. -- Henry Rich <<DateTime(2013-04-07T22:21:30-0500)>>

Status: fixed.


Problems when 9!:0 and 9!:1 are used together with Mersenne twister

In j602 at least, expressions like (9!:1) 9!:0'' can crash J and the results are unpredictable (to me!):

   NB. this works as I would expect
   (9!:1) 42 666

   a=. 9!:0''
   9!:1 a

   9!:0''
42 666
   ? i. 10
0.646649 0 0 2 2 1 0 3 3 1
   9!:0''
42 666
   NB. but this doesn't
   (9!:1) 42 666

   (9!:1) 9!:0''

   9!:0''

   ? i. 10
0.646649 0 0 2 2 1 0 3 3 1
   9!:0''
0 2 0

-- Ewart Shaw <<DateTime(2011-06-22T18:09:42+0100)>>

Status: fixed. Also, the setting of Mersenne Twister is preserved over a setting of seed for a different RNG.

crash on linear display of reassigment

The following sentences crash J:

    9!:3[5
    r=.2.5
   (r=.2.5) ] *&r

I believe the requirements for this crash are:

  • The sentence must contain a re-assignment of a noun to a verb or a floating point, literal, or boxed value, where the boxes (recursively?) contain floating point or literal values.
    • The original datatype of the noun is irrelevant.
  • The sentence must refer at least once to each of its original and new values.
    • I think this means the name must be mentioned to the right of its re-assignment, at least once.
  • The (verb?) result of the sentence must be displayed (in linear form).
    • If the sentence is assigned to a name or the display is otherwise suppressed, there is no crash (even if the result of the sentence is displayed later).
    • When the sentence is displayed, 5 e. 9!:2'' must be true.

Applies to ( 'j601/2006-11-17/17:05';6;'jwin32' ) -: (9!:14'') ; (9!:12'') ; wd 'qwd' (This does not mean that the bug is restricted to this environment, only that it is the one I tested)

Status: fixed.

-- Dan Bron <<DateTime(2007-01-11T18:35:25Z)>>


Single AR assignment fails

AR assignment should define verbs

   '`a b c'=.+`-`*
   4!:0;:'a b c'
3 3 3

   '`a b'=.+`-
   4!:0;:'a b'
3 3

It does not for assignments from gerunds of length one:

   '`a'=.+`''
   4!:0;:'a'
0

Status: fixed.

-- Henry Rich

Sort rank 0 literal crashes J

Same test with integer, float, extended, complex, box, symbol sorts without crash. Sparse untested.

   JVERSION
Engine: j804/j64/linux
Release: commercial/2015-12-28 10:47:03
Library: 8.04.15
Platform: Linux 64
Installer: unknown
InstallPath: /usr/share/j/8.0.4
Contact: www.jsoftware.com
   

   /:~"0'abc'

Process J segmentation fault (core dumped)

David Lambert (talk) 12:32, 21 June 2016 (UTC) Status: fixed.

{~^:n fails

   2 0 5 1 3 4 {~^:(<6) 0
|out of memory
|   2 0 5 1 3 4    {~^:(<6)0

-- Henry Rich <<DateTime(2014-06-30T14:52:11Z)>>

Status: fixed.

Dyadic do (".) does not treat tab (9{a.) as white space

   ".49 9 50 32 51{a.
1 2 3
   9".49 9 50 32 51{a.
9 3
   9".49 32 9 32 50 32 51{a.
1 9 2 3

The tab is considered an invalid character when do used dyadically, where it is considered whitespace when used monadically.

Status: fixed.

-- User:Don Guinn <<DateTime(2016-10-17T09:17:00)>>

x +.!.0 y hangs

3111112.9216646650 (+.!.0) 6.2831829946953803

hangs.

Status: fixed.

-- User:Henry Rich

Explicit to tacit conversion problem

Conversion is wrong on explicit reflexive verbs, for example:

   13 :'y*y'
*

Status: fixed

-- John Randall <<DateTime(2008-09-29T18:32:55Z)>>

linux 1!:0 gives access time instead of modification time

The documentation says that 1!:0 will return the file modification time. On Windows XP, this is correct. On Linux, 1!:0 shows the access timestamp. Example:

   1!:0 'j*'
+----+-----------------+---+---+------+----------+
|j601|2006 9 30 7 37 35|512|rwx|----d-|drwxr-xr-x|
+----+-----------------+---+---+------+----------+

linux:~ # ls -ldu j601
drwxr-xr-x  6 root root 512 Sep 30 07:37 j601
linux:~ # ls -ld j601
drwxr-xr-x  6 root root 512 Sep 30 07:15 j601

-- David Mitchell <<DateTime(2006-09-30T11:58:34Z)>>

Status: fixed


Fixed after Release 8.05

-.&m calculates cells of m, not y

-.&m precalculates an index to cells of m, but the cells should come from the rank of the other argument:

   -.&(i. 1 3) i. 2 2 3
|length error
|       -.&(i.1 3)i.2 2 3
   (i. 2 2 3) -. i. 1 3
0  1  2
3  4  5

6  7  8
9 10 11
   -."_&(i. 1 3) i. 2 2 3
0  1  2
3  4  5

6  7  8
9 10 11

-- Henry Rich <<DateTime(2014-05-01T16:23:05Z)>>

Status: -.&m is no longer supported by special code.

+/@e.&m y does ,@e. not e.

   +/@e.&(i. 2 3) i. 2 2 3
2
   +"+/@e.&(i. 2 3) i. 2 2 3
1 1

The other related combinations with e. also have this problem.

-- Henry Rich <<DateTime(2014-06-30T14:52:11Z)>>

Status: closed. Special forms including i. or i: produce correct results; special forms including +/, +./, *./, or I. produce nonce error.

Bug in special code for f@:e. when rank of e. result > 1

   (i. 3 3 3 3 3) +/@:e. i. 3 3 3
3
   +/ (i. 3 3 3 3 3) e. i. 3 3 3
1 1 1
0 0 0
0 0 0

-- Henry Rich <<DateTime(2014-04-05T16:20:37Z)>>

Status: closed, see previous bug.

Error in x i. y when frame of y is longer than frame of x

   $ (i. 2 4) i."1 i. 2 3 4
2 4
   $ (i. 2 4) i."i."1 i. 2 3 4
2 3 4

2 3 4 is correct.

Status: fixed. The bug also affected i:, ~:, and e..

m&i. gives improper length error if m is a table

   (,.':)')&(]@i.) '32'
2
   (,.':)')&(i.) '32'
|length error
|       (,.':)')&(i.)'32'

The error is that m&i. creates a verb that gives error if the cells of y don't match the shape of an item of m. This should produce 'not found' rather than an error. -- Henry Rich <<DateTime(2012-08-11T15:21:30-0000)>>

Status: fixed, along with a similar rank error


box i.!.0 box fails when all items are identical

   b =. 3 2 $ < 20 30
   a =. 10 2 $ < 20 30
   a i. !.0 b
4 4 4

Status: fixed.

-- Henry Rich

x +/\ y fails on negative overflow

   4 +/\ 10 $ _2e9  NB. 32-bit test; use larger value for 64-bit failure
589934592 589934592 589934592 589934592 589934592 589934592 589934592

Status: fixed.

-- Henry Rich

/: y on long floating-point array does not handle negative zero

   w =. _1 1 {~ 60000 ?@$ 2
   /: (-~ 0.5) * w
0 4 7 9 10 11 ...

NB. similarly,

   w =. (-~ 0.5) * 1 _1 {~ 60000 ?@$ 2
   +/ ~: /: w
59784

Negative zero is sorted as if it is > 0.

Status: fixed.

-- Henry Rich


BREAK during for. creates memory leak

Status: fixed.

Henry Rich (talk) 00:45, 24 February 2017 (UTC)

]^:0: <"0 i. 1e6 creates memory leak

Any inplaceable boxed argument that was passed through to become the result of a heavyweight verb (i. e. a verb calling EPILOG) would have the contents boxes not freed. ]^:0: is one example of such a verb

Status: fixed.

Henry Rich (talk) 21 May 2017

fork/hook does not stop on error

if (f g h) y got an error in h, f was nevertheless executed. This led to problems when f had side effects.

   (18!:4 [ 1&+) <'asd'   NB. Erroneously creates asd locale
   (18!:4@< [ 1&+) 'asd'   NB. Crashes J

Status: fixed.

Henry Rich (talk) 21 May 2017

Buggy Copy with ranks, #"2 2

This is wrong (verified for everything from J Rel. 2.6 (1995) to J Rel. 8.05):

   (1 1 0 ,: 0 0 1)  #"2 2   i. 2 3 5
 0  1  2  3  4
 5  6  7  8  9

25 26 27 28 29
 0  0  0  0  0

Correct would be what J Vers. 7 (1993) does:

   (1 1 0 ,: 0 0 1)  #"2 2   i. 2 3 5
 0  1  2  3  4
 5  6  7  8  9

10 11 12 13 14
 0  0  0  0  0


15 16 17 18 19
20 21 22 23 24

25 26 27 28 29
 0  0  0  0  0

The problem is endemic with Integrated Rank Support:

  $ (,. 5 6) $"2 2 i. 2 3 5
2 6 5
  $ (,. 5 6) $"$"2 2 i. 2 3 5
2 2 6 5
  $ (,. 5 6) {."2 2 i. 2 3 5
2 6 5
  $ (,. 5 6) {."{."2 2 i. 2 3 5
2 2 6 5
  $ (,. 5 6) {."{."2 2 i. 3 3 5
3 2 6 5
  $ (,. 5 6) {."2 2 i. 3 3 5
|length error
|   $(,.5 6)    {."2 2 i.3 3 5

When the code detects that the arguments need to be split into cells, it directly splits them into cells and matches the cells. But this is wrong if one argument has frame with respect to the given rank and the other does not, but has frame with respect to the rank of the underlying verb.


Martin Neitzel (talk) 00:43, 3 April 2017 (UTC)

Status: fixed.

Format (8!:2) is buggy for small floats

Verified for J 8.05 and J 8.06:

   datatype L: 0 ;/ 2 ^ _1023 _1024 _1066 _1067 _1074  NB. check data type
+--------+--------+--------+--------+--------+
|floating|floating|floating|floating|floating|
+--------+--------+--------+--------+--------+
   (8!:2) 2 ^ _1023  NB. last ok value
1.112536929e-308
   (8!:2) 2 ^ _1024  NB. first value with error of one kind
jtsprintfeD: decpt
|system error
|       (8!:2)2^_1024
   (8!:2) 2 ^ _1066  NB. last value with error of one kind
jtsprintfeD: decpt
|system error
|       (8!:2)2^_1066
   (8!:2) 2 ^ _1067  NB. first value with error of another kind
dtoa
|system error
|       (8!:2)2^_1067
   (8!:2) 2 ^ _1074  NB. last value with error of another kind
dtoa
|system error
|       (8!:2)2^_1074

-- User:Igor Zhuravlov

Status: fixed.

linear representation bugs with gerunds


  lr=. 5!:5 @ <
      NB. "Linear. The linear representation is a string which, when
interpreted, produces the named object."

  u=. (<('0');0)`
  lr'u'
0`

  v=. 0`
  (<0)u
┌─────┬─┐
│┌─┬─┐│0│
││0│0││ │
│└─┴─┘│ │
└─────┴─┘
  (<0)v
|domain error: v
|  (<0)    v
|[-11]


  erase'v'
1

  ". 'v=.',lr'u'

  v
0`
  (<0)v
|domain error: v
|  (<0)    v
|[-5]

Pascal Jasmin (talk) 00:45, 4 January 2017 (UTC)

Status: fixed.

unspecified and inconsistent LHAs to zero-cut

Finally, zero-cut is buggy w.r.t. empty x. First, it is sensitive to the datatype of such x

   $ (2 0 $ i.0) ];.0 i. 10 10   NB.  Correct
10 10

   $ (2 0 $  '') ];.0 i. 10 10   NB.  Bug
0 10

  $          ''  ];.0 i. 10      NB.  Correct (should be a tautology)
10
  $          ''  ];.0 'a'        NB.  Correct

Second, it gives inconsistent and odd results

   $ (0 2 $ ;a:) ];.0 i. 10 10  NB.  Correct, but
10 10
   $ (0 2 $ ;a:) ];.0 i. 10 10  NB.  Bug: Same sentence, different (incorrect) result.
5 10

Third, since `1=#$i.0` (or any `x` such that `x-:i.0`) and "If `x` is a vector, it is treated as the matrix `0,:x`" then the three phrases `(i.0) ];.0 ]`, `(0 ,: i. 0) ];.0 ]`, and `(2 0 $ i. 0) ];.0 ]` should be equivalent, but they almost always give different results (in particular when `-. 'boolean' -: datatype x`).

-- Dan Bron <<DateTime(2006-12-21T21:09:26Z)>>

Status: fixed. When x has no columns it selects all of y.


Incorrect shape for (boxed) u;.1 y when y is empty

The shape of boxed cuts goes bad when y is empty:

   y =. i. 2 5 6
   t =. 1 0;1 0 0 1 0;1 0 0 1 0 0
   $ t ];.1 y
1 2 2 2 3 3
   t =. 0 0;1 0 0 1 0;1 0 0 1 0 0
   $ t ];.1 y
0 2 2

The last shape should be 0 2 2 2 5 6, i. e. the cell-shape of y should be included.

Henry Rich, 2017-05-31

Status: fixed. When x contains an empty column that column is omitted from the result shape, UNLESS the axis of y is also empty.

(0,n) #: y anomalous when y is negative

  0 7 #: _7

_2 7

  0 8 #: _8

_1 0

The power-of-2 version is correct.

-- User:Henry Rich

Status: fixed.

0 _1 #: <. - 2 ^ 63 crashes J

So does _1 | <. - 2 ^ 63

-- User:Henry Rich

Status: fixed.

uncaught throw. gives no message

Now it does: error code 35, 'uncaught throw.'

Henry Rich (talk) 15:06, 4 June 2017 (UTC)

J crash where an error in wd with debug on

  13!:0]1            NB. Turn debug on
  wd 'mb infox test' NB. Deliberate error in wd

The above crashes J

-- User:Don Guinn

Status: fixed

Noun ARs in gerund} crash J

In the form v0`v1`v2}, each component of the gerund must describe a verb.

(Formerly this crashed J).

Henry Rich (talk) 22:29, 4 June 2017 (UTC)

5!:(1 2 3 4 5) did not treat an undefined name as a verb

Now they do.

Henry Rich (talk) 18:58, 7 June 2017 (UTC)

while. do. try. break. catch. end. end. leaves try stack unpopped

Now fixed, along with similar errors in for,, and with continue.

-- Henry Rich

Boxed symbols sort into accidental order

   /:~ (s: <'D');(s: <'E')
+--+--+
|`E|`D|
+--+--+
   /:~ (s: <'G');(s: <'F')
+--+--+
|`F|`G|
+--+--+

The symbol index is sorted, not the character string, as is done if the symbols are not boxed:

   /:~ (s: <'D'),(s: <'E')
`D `E
   /:~ (s: <'G'),(s: <'F')
`F `G

-- Henry Rich <<DateTime(2014-05-11T18:22:20Z)>>

Status: fixed.

incorrect and inconsistent constant notation

   _b_        NB.  Definite bug.
0

-- Dan Bron <<DateTime(2007-04-11T22:31:49Z)>>

Status: fixed. _ is not allowed when base is specified.

Rounding incorrect in (complex | complex)

   1j1 (| =&>: ] - [ * [: <. ] % [ + 0 = [)"0 j./~ 0.1 * i. 11
1 1 1 1 1 1 1 1 1 1 0
1 1 1 1 1 1 1 1 1 0 1
1 1 1 1 1 1 1 1 0 0 1
1 1 1 1 1 1 1 0 0 0 1
1 1 1 1 1 1 0 0 0 0 1
1 1 1 1 1 0 0 0 0 0 1
1 1 1 1 0 0 0 0 0 0 1
1 1 1 0 0 0 0 0 0 0 1
1 1 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0 1

The 0s happened because rather than using complex floor for <., the individual components were rounded independently.

Status: fixed.

Henry Rich (talk) 12:21, 23 June 2017 (UTC)

Memory leak in u M.

u M. leaked memory if the resulting verb was executed on the same line in which it was created (there was no leak if the resulting verb was assigned to a name and that name was later executed).

Status: fixed

Henry Rich (talk) 22:25, 3 September 2017 (UTC)

Memory leak in sparse rank

u"n on sparse arguments, monad or dyad, leaked a small amount of memory (128 bytes) for every cell processed.

Status: fixed.

Henry Rich (talk) 01:21, 11 September 2017 (UTC)

Erroneous result in x u/\. y

If the first and last outfixes of x u/\. y produced different types, and there was no overflow in calculating the others, the mismatch was not detected.

Status: fixed.

Henry Rich (talk) 19:43, 23 September 2017 (UTC)

Erroneous result in ? y when y is extended integer

Sometimes the result was not less than y.

Status: fixed.

Henry Rich (talk) 05:04, 24 September 2017 (UTC)

Fixed after release 8.06

0x1 gives erroneous result on Mac and Linux

Status: fixed.

Henry Rich (talk) 14:22, 25 December 2017 (UTC)

Values on stack affected by later in-place modification

   t =: 5 6 7
   ([ 3 : 't =: t , 0'@+:) t
5 6 7 0

Henry Rich (talk) 23:17, 2 February 2018 (UTC) the in-place assignment is now suppressed for this situation

Memory allocator improved

The memory allocator has been rewritten to use less space. A real numeric atom now fits in a single cache line.

Henry Rich (talk) 23:17, 2 February 2018 (UTC)

Loss of precision in b-type constants

   16b123456789abcdef
81985529216486896

b-type constants suffered conversion to floating-point and back, with loss of precision. Now they are kept intact.

NOTE that in a list constant, if any number is a b-type constant, all values in the list will go through a floating-point stage, with the exception of integral values that contain a b.

Henry Rich (talk) 08:52, 3 May 2018 (UTC)

Data corruption in |:, 32-bit systems only

In 32-bit systems, transpose where the transposed cell was 8 bytes long and not a floating-point value could have the data corrupted. Examples are:

  • 1 0 2 |: array_of_integers with shape nn,mm,2
  • 1 0 2 |: array_of_ASCII_characters with shape nn,mm,8

Henry Rich (talk) 03:30, 17 May 2018 (UTC)

Data corruption in x { y, 32-bit systems only

In 32-bit systems, From where the indexed cell was 8 bytes long and not a floating-point value could have the data corrupted. Examples are:

  • 4 { array_of_integers with shape nn,2
  • 4 { array_of_ASCII_characters with shape nn,8

Henry Rich (talk) 15:01, 25 May 2018 (UTC)

Forms ;@(<@f/\.);._3 or 3 detected incorrectly

Some of these forms were processed as if they were ;.1 or _1

Henry Rich (talk) 03:30, 17 May 2018 (UTC)

Special code for x ;@(<;.0) y did not allow edge cases

The code should accept 0-length selections that begin outside the bounds of the array.

Henry Rich (talk) 03:30, 17 May 2018 (UTC)

Failure in x e. y on non-AVX systems using large arrays

An initialization blunder caused erroneous results from x e. y if the workload had a certain mixture of large and small y, where large means more than 250K items.

Henry Rich (talk) 16:51, 21 May 2018 (UTC)

return. inside try. block corrupted suspension

Fixed.

Henry Rich (talk) 17:08, 17 June 2018 (UTC)

x ,:"r y executes on the wrong cells

    (i. 2 2) ,:"2 1 i. 2 2
0 1

2 3

0 1


0 1

2 3

2 3

Fixed.

Henry Rich (talk) 22:06, 5 July 2018 (UTC)

special code for ;/ y fails when y is boxed and has items whose cells are not atoms

Example: ;/ <"0 i. 2 3 4

Fixed by removing the special code for boxed y

Henry Rich (talk) 17:56, 8 July 2018 (UTC)

'abc' >./&.(a.&i.) 'def' crashes

>./ was wrongly recognized as >. .

Fixed.

Henry Rich (talk) 18:44, 9 July 2018 (UTC)

Nested S: crashes

An expression like ] S:0 S:1 <"2 <"1 <"0 i. 2 3 4 produced an incorrect result and corrupted memory.

Fixed.

Henry Rich (talk) 22:31, 18 July 2018 (UTC)

#: o. 0 produces empty display

The leading 0 digit was erroneously deleted.

Reported by Bill Heagy.

Fixed.

Henry Rich (talk) 02:28, 20 July 2018 (UTC)

DLLs with Unicode characters failed under Windows

Fixed.

3 : 'try. for. 2 3 do. 13!:8(1) end. catch. end. 5' ' ' left the for. stack unpopped, giving memory leak

Fixed. The for. stack is now always cleaned up at the end of an explicit execution.