System/Interpreter/Bugs/Fixed

From J Wiki
< System‎ | Interpreter‎ | Bugs
Jump to navigation Jump to 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.


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.

Fixed after release 8.07

Current locale deleted while being executed

   cocurrent 'a'
   coerase <'a'

would cause locale a to be immediately erased if it was not executing on the stack somewhere, leaving no implied locale at all.

Fixed.

list&p.. has invalid inverse

Was p..


Fixed.

1 ([])/\ 1 crashes

hook/\ and fork/\ crashed.

Fixed.

Linear Representation (5!:5) Error

   v =. (1 0$'') 1 : 'u y'
   5!:5 <'v'
1 0$'' (1 : 'u y')

Parentheses were needed around the noun.

Fixed.

Henry Rich (talk) 23:28, 7 December 2018 (UTC)

x ;: y sometimes hangs

An error in the code for extending temporary arrays sometimes showed up as a hang in dyad ;:.

Fixed.

cocreate '23' produced a chimera

cocreate on on a string of numbers produced a locale that was neither properly numbered nor non-numbered, and which could not be referred to. Such a use now generates domain error.

Fixed.

Henry Rich (talk) 03:05, 9 December 2018 (UTC)

Error in atomic agenda with rank > 1

   a =. < (+:`*:@.(2&|"0)"2)  i.3 4 5

Atomic agenda occurs when all the verbs in the agenda are atomic. There was a corruption if such a verb was applied at rank > 1, or on an operand of rank > 1.

Fixed.

Henry Rich (talk) 19:23, 23 December 2018 (UTC)

$. or e. crashes

a1=: a2=: 1 $. 10 ; 0 ; 0
del=: (3 : 'a1=: 8 $. a1')^:(e.&2) [ (3 : 'a2=: 8 $. a2')^:(e.&1)  NB. (e.)'s args are confused
del 1 2  NB. SIGSEGV

Status: fixed.

-- Igor Zhuravlov <<DateTime(2018-01-15T12:13:24Z)>>

laminating an empty sparse array crashes

sh=: i. i. 0
sa=: 1 $. sh
,: sa    NB. SIGSEGV

Originally reported in Jgeneral forum.

Status: fixed.

Igor Zhuravlov (talk) 10:57, 27 December 2018 (UTC)

sparse of empty prefix crashes

As reported by Devon in the Forums the phrase $.\i.0 will crash J. I note that the crash is dependent upon the type of the empty array, as $.\'' does not crash.

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.)

-- Dan Bron <<DateTime(2007-09-25T19:56:21Z)>>

  • In J602 beta C, the phrase $.\i.0 no longer crashes. However, the result is still buggy; for example $ $.\i.0 crashes. More investigation leads to other odd effects:
   2 $. $.\i.0
|syntax error
|   2$.$.\i.0
   2 $. $.\i.0
|syntax error
|   2$.$.\i.0
   3!:0 $.\i.0
4096
   datatype $.\i.0  NB.  J crashes here.

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-08T22:35:16Z)>>

sparse polynomial crash

J crashes when dyad p. is supplied a sparse argument. For example, the following sentences crash J:

NB.  Large sparsely populated integer array
D  =:  (1+?138#100) (($A) <@#: ?. 138 # */$A)}A=:400 400 $ {.0 2

NB.  Sparse-array equivalent
S  =: $. A

NB.  Polynomial application
S p. 12     NB.  J crashes here

J also crashes if the arguments to p. are reversed. However, no crash occurs if D is substituted for S (i.e. if both arguments are dense).

Status: fixed.

-- Dan Bron <<DateTime(2008-11-05T14:10:47Z)>>

bug in sparse rank

   ($. 2 2 $ 2-2) +"0 1 ,0
scheck i/x tally
|system error

Status: fixed.

Henry Rich (talk) 22:29, 27 December 2018 (UTC)

1: takes too long

   timespacex 'c0 17'
0.078233 2.01328e8
   timespacex 'c01 17'
0.761976 1.61061e9
   c0
,@((1 0 1 */ ])^:(]`(1"_)))
   c01
,@((1 0 1 */ ])^:(]`1:))

(I am just guessing at how this issue should be classified)

Status: fixed. The problem was that 1: produces a boolean result, but the verb created from the AR of 1: did not.

--Raul Miller (talk) 16:19, 1 December 2017 (UTC)

Uninitialized sequential machine

Sequential machine fails for function 1 with integer data. As I recall there are some cases where c variables are used before initialization.

NB. FSM to discard alternate items instead demonstrates bug.

STATE=: 1 1 ,:&:(,:~) 0 3
Y=:i.8
map=: <@:{.
FSM=: (1 ; STATE ; <@:map) Y
FSM ;: Y



   Note'JVERSION'
   
   FSM;:'abcde'
ace
   
   FSM;:Y
0 2 4 6 4613937818241073152 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 139966340226320 786440 64 0 176 2 _9223372036854775807 1 1 1

   ((<0),}.FSM);:Y
+-+-+-+-+
|0|2|4|6|
+-+-+-+-+


   FSM
┌─┬───┬───┐
│1│1 1│┌─┐│
│ │1 1││0││
│ │   │└─┘│
│ │0 3│   │
│ │0 3│   │
└─┴───┴───┘


Engine: j806/j64avx/linux
Beta-3: commercial/2017-04-10T17:51:14
Library: 8.06.09
Platform: Linux 64
Installer: J806 install
InstallPath: /home/lambertdw/downloads/installs/j64-806
Contact: www.jsoftware.com
)

Status: fixed. (The problem had nothing to do with initialization)

-- User: David Lambert

Error in rxmatches (regex)

Verified for J 8.05 and J 8.06:

   load 'regex'
   '(?m)^.{2}' rxall 'abcde' , LF , '12345' , LF
+--+--+--+--+
|ab|cd|12|34|
+--+--+--+--+
   NB. it's wrong, the result should be:
+--+--+
|ab|12|
+--+--+

Status: fixed. Chris updated the regex code in the standard library.

-- User:Igor Zhuravlov

Sequential machine with f=1 crashed when items of y were not atoms

x ;: y crashed when f=1, indicating that items of y should be emitted, and those items were not atoms.

Status: fixed.

Henry Rich (talk) 18:46, 29 December 2018 (UTC)

(,.1 0) ];.0 i. 0 produced an invalid result

as did (,.2 0) ];.0 i. 0, but they ended up producing limit error

Status: fixed.

Henry Rich (talk) 16:42, 30 December 2018 (UTC)

Faulty linear representations of some bonded conjunctions

Linear representations of atomic representations, or similar, of conjunctions and adverbs (even verbs) bonded to tie and evoke are faulty:

   (<,'&')`
&`
   `(<'&')
`&   
   (<'/')`:
/`:

Status: fixed.

-- User: Pepe Quintana

Type of empty result of ; y did not follow type rules

The result of ; y when applied to an argument whose contents are all empty should have the highest-priority type of the contents. In particular, the result of ; (<a) , (<b) should always be the same as the result of a , b. This was not followed:

   3!:0 (0$1r2) , 0$0.5
8
   3!:0 ; (<0$1r2) , <0$0.5
128

Status: fixed.

Henry Rich (talk) 02:53, 14 January 2019 (UTC)

Incorrect type of empty result from x u;.1 y and x u/. y

   3!:0 #"#/.~ ''
2

Should be 4. The empty result was given the type of y rather than the type of (u y).

Status: fixed.

Henry Rich (talk) 16:53, 12 February 2019 (UTC)

Truncated display sometimes lacked blank lines

   i. 112 2 2
...
  4   5
  6   7
  8   9
 10  11
 12  13

Status: fixed.

Henry Rich (talk) 17:08, 23 April 2019 (UTC)

(u 1 : m) f. did not operate on u

Similarly for 2 : m.

Fixed. Henry Rich (talk) 23:47, 18 June 2019 (UTC)

infinite loop if self-referent verb used in first tine of fork

   r =. r
   (r r r) 1

Loops. The error occurred looking to see whether the name was defined as [:, and the solution is to look only at the value of the name itself.

Fixed.

Henry Rich (talk) 01:39, 19 June 2019 (UTC)

Error if multiply overflow during outfix

   *"0/ 3 2 $ 1e10
2.4e_294 2.4e_294

Fixed.

Henry Rich (talk) 15:03, 19 June 2019 (UTC)

crash in u^:v when v creates a gerund with infinite recursion

The second crash reported in the '06 crash on infinite recursion report is still outstanding. That is, f^:] 0&]`] crashes J.

-- Dan Bron <<DateTime(2006-09-14T14:53:07Z)>>

  • Update: The sentence f^:] ]`] (in general, f^:a b`c or f^:a~ b`c where a,b, and c are identity functions, i.e. (-: 1&|.)@:(, a , b , c)) also crashes, but I haven't spent the time to analyze whether it's for the same or different reasons.

This related crash occurs in the same environment as reported above

-- Dan Bron <<DateTime(2006-09-18T18:29:58Z)>>

Status: open. The stack tweaks make it less likely to crash, but until we can monitor stack usage accurately it will be possible for 'stack error' to turn into a crash.


Suggestion: Declare that ^:v may not create a gerund, and treat this form as an error.



    • Even though neither a=.(139791$-`-)`:6 nor ".'a=.',139788$'-' will crash J independently, in sequence they will:
   a=.(139791$-`-)`:6
   ".'b=.',139787$'-'  NB.  J crashes here
 Obviously, this is related to the re-assignment of a (it won't occur if the second assignment is to another name), but I'm not sure if it's a distinct bug or if the initial assignment to a made J skittish (trashed its memory).

Status: fixed

-- Dan Bron <<DateTime(2007-11-15T20:20:36Z)>>

deep conversion crash

While trying to work around the train length limitation reported earlier, I came across the crash demonstrated below. I basically manipulate 3!:1-style strings to create a very long train; when I subsequently use 3!:2 to convert the string into an atomic representation, the interpreter crashes.

Since I am using 3!:2 on a string not directly the result of 3!:1, I am not certain that this is a bug in the interpreter. OTOH: since is the atomic rep of a repetitive train, it is self-similar (i.e. it has a recursive structure). I can apply 3!:2 successfully to any string which is a precursor to the one which crashes; there's nothing special about the "last one". The string is merely longer, representing a deeper object (though maybe my pointers are out of bounds?).

Since the crash occurs before I get a chance to apply 5!:0 to the atomic rep, I don't believe it is the same as the "train crash". But I cannot verify that it is 3!:2, and not the (deeply nested) boxed structure itself which is the problem, as attempts to directly generate the structure in J are frustrated by system limitations (e.g. "out of memory" errors).

Here is the verb that crashes:

   tn  =: 4 : 0
   NB.!  Not general.

        H =. 176
        J =. H -~ # T =. 3!:1 y

        I =. 156 + +/\  0 4 8   4
        D =.           30 1 1 _17
        j =. 0.5

        for. i. x do.

            f     =. H }.T

            i     =. I + J * j =. +: j
            t     =. a.{~D + a.i. i{T

            T     =. t i}T
            T     =. T,f

        end.

        T
)

Here is a demonstration that it works correctly:

   seed =. - - - - -
   S    =: {. 5!:1 seed`''

   (3!:2 ] 0 tn S) 5!:0
- - - - -
   (3!:2 ] 1 tn S) 5!:0
- - - - - - -
   (3!:2 ] 2 tn S) 5!:0
- - - - - - - - - - -
   (3!:2 ] 3 tn S) 5!:0
- - - - - - - - - - - - - - - - - - -
   (3!:2 ] 4 tn S) 5!:0
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   NB.  Etc

   S15 =: 15 tn S      NB.  Executes properly, returning a  3!:1
   s15 =: 3!:2 S15     NB.  Convert to atomic rep
   v15 =. s15 5!:0     NB.  Evoke atomic rep
   4!:0 v15`''         NB.  It's a proper train (of about  2^16  verbs).
3

and here is how to use it to make J crash:

   S16 =: 16 tn S      NB.  Executes properly, returning a  3!:1
   s16 =: 3!:2 S16     NB.  J crashes here.  Can't convert to atomic rep.

I've had it crash on the argument 15 as well (but never on an argument of 14 or less). The problem may be related to available system memory (I don't think it has to do with the magic number 16, but I could be wrong).

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.)


    • Actually, the fact that 16&train crashes is pretty suspicious. The number of verbs in the train grows as 3 + 2 ^ >:. A couple of the train crashes occur at a length of ~ 139792, and I notice that:
   (3 + 2 ^ >:)^:_1: 139792
16.0929
 So perhaps this bug isn't directly in the parser, but in a more general limitation on the depths of trees J can represent internally (around 2^16; perhaps a two-byte limit somewhere?).

That wouldn't explain the crash on 15&train, however. But I cannot now reproduce that error, so it may have only occured in an older version of tn which (erroneously) produced extra boxing. Therefore the old version of tn might have been as deep (or deeper) at 15 than the current version is at 16.

Status: fixed

-- Dan Bron <<DateTime(2007-11-15T21:13:47Z)>>


tall stack crash

The following crashes J:

   p=: 3 : 0
   	m=.(3 #:@:+ [: i.@<:&.-: 2^#) y
   	c=.m <@:p;.2"1 y
)

   p;:'a b c'

I believe this is an instance of the recursion limit bug. I'm aware that [[JDic:../release/recurlim|J6.01 eased this problem]], but that some vestiges remain and are difficult to address.

OTOH, the nature of the bug makes examples hard to minimize, so I'll report it anyway, in case the bug is novel or unique.

A few things I did notice:

    • The cut mask is germane:
      p=: 3 : 0
   	m=.1
   	c=.m <@:p;.2"1 y
)

   p;:'a b c'  NB.  Hang, not crash.
 *  A debugging statement reveals the crash occurs at the 6483rd invocation of the verb
   t =: ;<@:(3&}.);.2 (9{a.)-.~ 0 :0
	   N=: 0
	   p=: 3 : 0
	   	1!:2&2 N =: N + 1
	   	m=.(3 #:@:+ [: i.@<:&.-: 2^#) y
	   	c=.m <@:p;.2"1 y
	   )
	   p ;:'a b c'
)
   {:];._2 t spawn 'jconsole' [ load 'task'
6483
}}} which approximates J's stack depth:


   $:@:>: ::]0
6666

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.)

-- Dan Bron <<DateTime(2007-11-19T14:54:33Z)>>

Status: Fixed.


-- Dan Bron <<DateTime(2008-01-08T21:55:42Z)>>

p. does not handle dyadic rank correctly

   (i. 3 3) p."1 0 i. 3
0  3 10
3 12 31
6 21 52

It is processed as if p."2 _.

Status: fixed

Henry Rich (talk) 21:34, 4 July 2019 (UTC)

0 : m required m to be valid sentences

   0  : 'ab:'
spelling error

The value of nouns should not be audited.

Status: fixed

Henry Rich (talk) 18:25, 24 August 2019 (UTC)

0j1 +. 16.1 hangs

Fixed to return 0 if Euclid's algorithm fails to converge

Henry Rich (talk) 23:54, 17 October 2019 (UTC)

Incorrect error reporting of assignments in imex

Error reports from imex lines which contain local assignments are reported as global assignments.

The behaviour showed up after 8.04, and still exists in beta-n. Perhaps this is intentional, as local/global assignments are identical in imex, but I didn't see anything in the release notes about this.

   dbr 1
   foo=: 3 : 'a=: b=. 0,''0'''
   foo ''
|domain error: foo
|   a=:b=.0    ,'0'
|foo[0]
      a=: b=. 1,'1'
|domain error
|   a=:b=.1    ,'1'
      dbr 1

   a=: b=. 2,'2'   NB. assignment to b reported as global
|domain error
|   a=:b=:2    ,'2'

Kirk Iverson (talk) 13:50, 29 October 2019 (UTC)

Status: fixed.

,!.f Fill fails to convert arguments to precision of fill

   (,2) ,!._ i. 0 2
0 1073741824

Reported by Pascal

Status: Fixed

Henry Rich (talk) 04:19, 22 November 2019 (UTC)

for. block sometimes creates garbage name and name_index

Reported by Bill Heagy

Status: Fixed.

Henry Rich (talk) 15:27, 7 December 2019 (UTC)

Fixed after release 9.01

x # y crashed when rank of x and y were large

Reported by Igor Zhuravlov

Status: Fixed.

0 0 0} i. 1 3 failed with index error

Status: Fixed

4 p: 1x produced result 3

Should be 2.

Status: Fixed

crash when multiline explicit definition and $: coexist in inverse

   s =: 4 : 0
0
0
)
   i =: 0&$: : s
   i&> f.
3 : 0 :(4 : 0)&>
x 0&$: :(4 : 0)
0
0
) y
)
0&$: :(4 : 0)
0
0
) y
)

The result is malformed, and will hang for keyboard input if executed.

Status: fixed.

Henry Rich (talk) 21:49, 14 May 2020 (UTC)

Executing (". y) did not preserve the recursion pointer in the surrounding verb

Example: +: :: ($:@:".) '4+4'

Status: Fixed

Henry Rich (talk) 23:32, 2 June 2020 (UTC)

{&1 2 3^:a: $0 crashed

Status: Fixed

Henry Rich (talk) 14:58, 5 June 2020 (UTC)


Nub gives wrong result, and is inconsistent with #/. and u/.

   0j16": tb=. 1+2e_14*i:3
0.9999999999999400 0.9999999999999600 0.9999999999999800 1.0000000000000000 1.0000000000000200 1.0000000000000400 1.0000000000000600
   =/~ tb
1 1 1 0 0 0 0
1 1 1 1 0 0 0
1 1 1 1 1 0 0
0 1 1 1 1 1 0
0 0 1 1 1 1 1
0 0 0 1 1 1 1
0 0 0 0 1 1 1
   0j16": ~.tb
0.9999999999999400
   ~:tb
1 0 0 0 0 0 0
   =tb
1 1 1 0 0 0 0

0{tb is not tolerantly equal to 3{tb so 3{tb should be a member of ~.tb according to the dictionary definition of ~. which says: “More precisely, the nub is found by selecting the leading item, suppressing from the argument all items tolerantly equal to it, selecting the next remaining item, and so on.” So the nub monad gives the wrong result, and the nub sieve and self-classify verbs give a wrong result consistent with it.

Moreover, ~. should always produce the same partitioning as u/., but it doesn't:

   ~. tb
1
   </.~ tb
+-----+-+-+-+-+
|1 1 1|1|1|1|1|
+-----+-+-+-+-+

Also, the special case #/. loses some of the items in this case:

   #/.~ tb
3

The special case (#,{.)/. suffers the same problem:

    (#,{.)/.~ tb
|length error
| (#,{.)/.~tb

-- User:B Jonas <<DateTime(2015-06-09T21:44:32+0200)>>

Status: fixed.

Henry Rich (talk) 22:50, 9 September 2020 (UTC)

Fixed after release 9.02

u@.m corrupted memory when u is a verb

Fixed. Henry Rich (talk) 14:56, 21 December 2020 (UTC)

Tolerant ceiling/floor errors on large values

    <. 17575011601890. 0  NB. bug!
17575011601891 0

Fixed. Henry Rich (talk) 17:01, 15 February 2021 (UTC)

Precomputed hashes gave incorrect results if comparison tolerance changed

An expression like (m&i.) produces a verb that will look up values in m. The hashtable created by (m&i.) is valid only for the the comparison tolerance used to create it. The system has now been updated to use that comparison tolerance whenever (m&i.) is executed.

Fixed. Henry Rich (talk) 21:30, 29 April 2021 (UTC)

Fixed after release 9.03

f/@, y has excessive memory footprint

   a =. 100 100 ?@$ 2
   7!:2 '(1 1,:3 3) +/@,;._3  a'
880640

The high space usage was because the special code for f/@, did not call EPILOG to release memory promptly.

Fixed. Henry Rich (talk) 20:09, 2 January 2022 (UTC)

{{y}} {{)n }} mangled

A noun DD after a non-noun DD was corrupted. Fixed.

Henry Rich (talk) 23:25, 2 January 2022 (UTC)

f=: 3 : 'f f. y' crash

Now detected as stack error

Henry Rich (talk) 23:05, 12 January 2022 (UTC)

while. do. elseif. do. end. not detected as error

Now detected as control error

Henry Rich (talk) 19:15, 14 January 2022 (UTC)

x i."n y fails when x has surplus frame

   b =. i. 2 3
   a =. i. 2 3 4
   a i."1 b
0 1 2
4 0 1
4 4 4

4 4 4
4 4 4
4 4 4

Reported by Ian Shannon. Fixed now.

Henry Rich (talk) 19:42, 4 April 2022 (UTC)

x u/. sparse operates on extra empty trailing partition if there are no non-sparse items

   $.^:_1 sa=. 1 ((<"1) _2 ]\ 0 2 1 1 1 2 2 1 2 2)} 1 $. 3 3 ; 0 01 ; 0
0 0 1
0 1 1
0 1 1
   #/.~ $.^:_1 sa
1 2                NB. answer is correct
   #/.~ sa
1 2 0              NB. answer is incorrect

Reported by Igor Zhuravlov.

Fixed.

Henry Rich (talk) 18:35, 10 February 2022 (UTC)

memw adds garbage atom rather than 0 when 0-extension requested

Reported by John Ference.

Henry Rich (talk) 15:56, 27 February 2022 (UTC)

(1) 01&|@^ 0 gives 1

Should be 0. The error occurred on integer and extended arguments.

Fixed.

Henry Rich (talk) 14:53, 28 August 2022 (UTC)

(sparse_list i. dense) error when no non-sparse items

   s =. 0 (0}) $.,1  NB. s has 1 indexed item, but it equals the sparse element
   (8 $. s) i. 1  NB. If the indexed item is removed, it disappears from view to i.
0

Fixed.

Henry Rich (talk) 14:22, 28 August 2022 (UTC)

(sparse_x with no non-sparse items) {."r (sparse y) failed

The rank r was lost.

Fixed.

Henry Rich (talk) 20:43, 29 September 2022 (UTC)

Name of executing function forgotten after first error

   a =: {{ 1 + y }} 
   a a:
|domain error: a
|   1    +y
   a =: {{ 1 + 1 + :: ] y }} 
   a a:
|domain error
|   1    +1+ ::]y

The :: caused the name to be lost.

Fixed.

Henry Rich (talk) 23:07, 9 November 2022 (UTC)

Fixed after release 9.4

New name created earlier in sentence not recognized

   {{ test [ [ [ (]'test')=. y }} 0
|value error: test

A name that was not known to be assigned as definition time was not recognized as assigned until the end of the sentence containing the assignment.

Fixed.

Henry Rich (talk) 22:13, 3 March 2023 (UTC)

# corrupted virtual block

When (x # y) was applied inplace to a virtual cell such as in u"n, the shape/type of the virtual cell could be corrupted.

Fixed.

Henry Rich (talk) 22:13, 3 March 2023 (UTC)

x ]"r y replicates cells of y wrong when x has surplus frame

   $ (i. 3 7 4 5) ]"2 (i. 3 4 5)
3 3 4 5

Should be 3 7 4 5.

Fixed.

Henry Rich (talk) 14:14, 22 April 2023 (UTC)

Linear rep of {{ }} lines inside 3!:0 definition were not indented correctly

Fixed

Henry Rich (talk) 22:57, 23 April 2023 (UTC)

Rank operator "n too aggressively culled when u has negative rank

   9 10,"0 _1/i.2 3
 9 0 1 2
10 3 4 5

The implied rank operator in / was culled.

Fixed.

Henry Rich (talk) 21:38, 5 August 2023 (UTC)

NaN error when dividing by _j_

Fixed.

Henry Rich (talk) 13:21, 13 November 2023 (UTC)

Fixed after release 9.5

u^:gerund crash

   dbgarg=: 1 : '] [ echo@(m ; < )'
   dbg=: 2 : 'u^:(1:`(n dbgarg))'
   sa=. 1 (< 3 2 $ 0 0 0 1 1 2)} 1 $. 2 3 ; 0 1 ; 0
   (4&$. dbg 'mm') sa   NB. crashes

Reported by Igor Zhuravlov.

Fixed. Henry Rich (talk) 15:54, 23 January 2024 (UTC)

throw. doesn't restore debug status

Fixed. Henry Rich (talk) 17:16, 18 February 2024 (UTC)

Nested try. doesn't restore debug status

Fixed. Henry Rich (talk) 17:16, 18 February 2024 (UTC)

x #"r y failed on certain sparse y

When x #"r y called for replication from a sparse axis that was not the last sparse axis, and the sparse indexes of the last nonsparse cell did not match those of the previous cell in the axes above r, the last nonsparse cell was replicated with incorrect indexes.

Fixed. Henry Rich (talk) 16:33, 20 February 2024 (UTC)

Branching out of nested control structure executes incorrectly

   a =: {{
r =. 0
for. i. 10 do.
  for. 10 do.
    r =. >: r
    goto_spec.
  end.
label_spec.
end.
r
}}
   a ''  NB. should be 10
1

The solution is to treat a branch out of a control structure as if it executed end. for the structure.

Fixed. Henry Rich (talk) 23:06, 23 February 2024 (UTC)

select. nested in try. leaves select. stack bad after error

Fixed. Henry Rich (talk) 17:03, 24 February 2024 (UTC)

try. stack corrupted if nested try. has both catch. and catchd.

Fixed. Henry Rich (talk) 17:08, 24 February 2024 (UTC)

try. stack corrupted if nested catch. does goto. into try.

Fixed. Henry Rich (talk) 15:34, 25 February 2024 (UTC)