/\   Requests: Interpreter · Library · Jwdw · Jwdp   Bugs: Interpreter · Library · Jwdw · Jwdp · Beta

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

J base library bug reports are submitted here.

Closed bugs and responses in 2007, 2006.


Performance Monitor crashes

The script below reproduces otherwise manual steps in j601 k beta:

require 'jpm jzopengl jzopenglutil files'
load'~system/examples/graphics/opengl/demo/glview.ijs'
coclass 'jgldemo'
coinsert 'jpm jzopengl jzopenglutil'

3 : 0''
opengldemo_jgldemo_''
opengl_showname_jgldemo_'BASIC1'

start''
  wd 'psel ',":HWNDP_jgldemo_
  0 gspaint_jgldemo_@gsrotate_jgldemo_"0] 10$1
smoutput showtotal''
smoutput showdetail'paint_jgldemo_'
smoutput showdetail'gsdrawdodecahedron_jgldemo_'
)

-- OlegKobchenko 2006-04-23 04:52:01


jwin32 crashes with viewmat

This bug report will be fuzzy for the nonce. It evades easy minimization, so I'm putting it up in hopes that someone else can corroborate or expand, or the problem becomes clear in a flash of light. Failing that, I'll try to get back to it later.

The problem occurs when one viewmats a large 3d array, which one intended to be 2d but where the operation to reduce the rank occured AFTER the viewmat, rather than before (i.e. to the left of the word viewmwat in the expression). The error may also be sensitive to the amount of data in the session log. The error is not easily reproducible.

Here is a screenshot of J crashing when I made such a typo (note the line before it executed properly):

jwin32-crash-on-viewmat.png

Applies to (  'j601/beta/2006-06-10/20: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)

-- DanBron 2006-06-26 16:55:27

I cannot reproduce this -- ChrisBurke 2007-12-19 07:43:18


regexes cause crashes

As reported by HenryRich in the forums (and earlier, by PhilipViton), certain regexes will crash J:

   stringhashtml =: (rxcomp '<[hH][tT][mM][lL]>[][:' , ((#~ >:@('\'&=))(}. a.) -. '][:-') , '-]*</[hH][tT][mM][lL]>')&(0&<:@:((<0 0)&{)@rxmatch)

   stringhashtml 'anything' NB.  J crashes here

Henry reports this particular crash was introduced in J601c (and did not crash in a late beta). I speculate that this crash may be due to the empty character class ...[]... in his expression.

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


regexes null-terminated prematurely

Inputs to the verbs exported by the regex script are prematurely terminated when they contain nulls ({.a.):

   stringhashtml =: (rxcomp '(?i)<html>[^\0]*</html>')&(0&<:@:((<0 0)&{)@rxmatch)

   stringhashtml   'A'  ,  '<html>foo</html>'
1
   stringhashtml   'A'  ,~ '<html>foo</html>'
1
   stringhashtml ({.a.) ,  '<html>foo</html>'
0
   stringhashtml ({.a.) ,~ '<html>foo</html>'
1

This bug is probably not limited to target strings; I'm willing to bet that regular expressions are also null-terminated (though this could be worked around in regular expressions by replacing instances of {.a. with the string '\0'). All string arguments passed to the PCRE library should be checked.

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)

-- DanBron 2006-12-26 17:49:11


"for." loop in gldemo causes java frontend failure

As the following code demonstrates when entered in glviews.ijs , "try N", where N>:50, disables the keystroke commands in the opengl window. This is documented in http://www.jsoftware.com/pipermail/programming/2006-December/004516.html .

NB. cups surface - colored by height

require 'opengl'
coinsert 'jzopenglutil'


OPENGL=: 0 : 0
  pc opengl closeok;
  xywh 0 0 200 150;cc g isigraph rightmove bottommove;
  pas 0 0;
  rem form end;
)

opengl_run=: 3 : 0
wd OPENGL
ogl=: ''conew'jzopengl'
paint''
wd'pshow;'
)

opengl_close=: 3 : 0
destroy__ogl''
wd 'pclose'
)

opengl_cancel=: opengl_close

NB. cups surface - colored by height

j=. steps _2.4 2.4 35
f=. (5: * ] % ^@+&*:)"0/~
CUPS=: 1.4*gsfit11 gsmakexyz (];];f) j

j=. (1r4"_ ,. |. ,. ]) _2}.8}. gsint01 16
CUPCLR=: j gshue gsfit01 {:"1 CUPS

".COLORTABLE

gsetdefaults''
GS_CLEARCOLOR=: IVORY

pickone =: COLORTABLE&(13 : '".>{.;:y{x')

try =: monad define
  for. i. y do.
    go@pickone@? 144
  end.
)

go =: monad define
  GS_CLEARCOLOR=: y
  paint''
)

paint=: 3 : 0
  wd'psel opengl;pactive'
  if. gsinit GS_LIGHT do.
      gsdrawsurface2 makelist 1 CUPS;CUPCLR
    end.
    gsclearcolor GS_CLEARCOLOR
    glCallList 1
    gsfini''
)

NB. =========================================================
opengl_g_paint=: gspaint
opengl_g_char=: gschar
opengl_default=: gsdefault
NB. =========================================================

opengl_run''

-- BrianSchott 2006-12-27 13:55:11


Jep crashes on CMDGET with large data

When implementing session support in my irc jevalbot, I noticed that when I tried to get a value with CMDGET and that value had a size larger than, say, 50 kilobytes, the jep process crashes.

I've seen this happen in two ways. One is that jep simply gets a SIGSEGV and dies in it. The other is when jep prints "dosend fail", and exits; strace shows that in this case it gets EFAULT from a send call.

Here's a short J script that reproduces the crash on my machine (I'm using j601/2006-09-04/09:20 on an i386-linux system with 9!:12'' giving 5).

As is, this gives the "dosend fail" variation, but if you change 50000 to 500000, you get the one without the message instead.

NB. this script illustrates a crash in jep
require 'jserver'
js=.conew'jserver'
local__js''   
run__js;._2 noun define
        d =: 50000$'foobar'
        state_jeval_ =: (,.5!:1)4!:1 i.4
)
]r =: get__js 'state_jeval_'

Thanks to DanBron for helping write this standalone example.

-- BJonas 2007-05-07 18:40:23


Wrong locale in 'trace'

In distributed j6.01, trace uses the wrong locale for executed statements. In a fresh session, this can be seen using

   X=:3
   load'trace'
   trace'X+1'
|value error: X
|   t_z=.    (X)(1)

Ideally, trace would use the locale of the calling environment for executed statements, but I do not know how to make this happen.

As an alternative, if the ". verb (which appears five times in trace.ijs, and is always preceeded by a space character) is replaced with do_base_ this fixes the problem. Additionally, each instance of 4!:0 should be replaced with nc_base_ and instances of 5!:5 should be similarly treated.

-- Raul Miller 2007-07-02 17:05:35

printf should honor zero padding

printf does not follow the zero padding specification for the 0 flag after %. See man printf.

The last output should be the same as first

   load'printf'
   '%4.4d-%2.2d-%2.2dT%2.2d:%2.2d:%2.2d'printf 6!:0''
2008-01-20T19:17:30
   
   '%04d-%02d-%02dT%02d:%02d:%02d'printf 6!:0''
2008- 1-20T19:18: 8

This should be 001.00-002.50:

   '%06.2f-%06.2f'printf 1 2.5
  1.00-  2.50

-- OlegKobchenko 2008-01-21 00:10:23

Display problems with Paint and Splitter Demos

When using the "Paint demo" part of the isigraph demo, the screen is incorrectly redrawn when using the Line or Ellipse tools. This can result in parts of the screen outside the demo form, being re-painted with an earlier state.

Only appears to exhibit itself properly on Vista with Jwdw. Originally described on the forum: Display bugs in isigraph/paint demo and splitter demo.

To reproduce:

Interestingly the Freehand and Box controls seem to work fine. The paint demo was actually started with no other application windows visible on the screen except for the freshly started J session and Demos Select forms. The other parts of forms shown, including the splitter demo form, are from an earlier state before this J session was started.
paintdisp.png
A similar display problem is exhibited in the Splitter Demo when you try to move a splitter control beyond the extent of the Splitter Demo form.
splitterdisp.png
-- RicSherlock 2008-02-12 21:05:47

markersize option works incorrectly in Plot

The markersize option is not honoured by the plot command (This bug is exhibited by Jwdw but not Jwdp). For example all the following commands display a graph with a markersize of 1 (the default):

load 'plot'
'marker; markersize 1' plot i.5
'marker; markersize 2' plot i.5
'marker; markersize 3' plot i.5
'marker; markersize 0' plot i.5

The markersize option is displayed incorrectly by the pd command. If the plot form is closed between commands then the behaviour is the same as for the plot command. If the plot form is left open then the correct markersize setting is not displayed at the following pd 'show' but at the one after that. In Jwdp the first pd 'show' command displays correctly, but thereafter the markersize setting is also delayed. For example:

load 'plot'
mkgraph=: 3 : 0
   'pnsz mksz'=. 8!:0 y
   pd 'new'
   pd 'type marker;markersize ',mksz,';color red'
   pd >:i.5
   pd 'type line;color purple;pensize ',pnsz
   pd i.6
   pd 'show'
)

Note 'Instructions'
To see the delayed markersize change 
run (ctrl+r) each of the following lines in 
sequence and note the changes (don't close the plot window).
   mkgraph 2 2 NB. line size 2 marker size 1 (marker size 2 in Jwdp)
   mkgraph 2 2 NB. line size 2 marker size 2
   mkgraph 1 1 NB. line size 1 marker size still 2
   mkgraph 1 1 NB. line size 1 marker size now 1
   mkgraph 1 2 NB. line size 1 marker size still 1
   mkgraph 1 2 NB. line size 1 marker size now 2
   mkgraph 1 3 NB. line size 1 marker size still 2
   mkgraph 1 1 NB. line size 1 marker size now 3
   'marker; markersize 4' plot i.5 NB. marker size 1
   mkgraph 1 1 NB. line size 1 marker size 4
)

This bug has been reported in the forums previously: [general/2007-August/030707], [beta/2008-February/003083].

-- RicSherlock 2008-02-19 20:48:19


OpenGL Demo Complex Objects Display as Rays and Sprays

I ran the OpenGL demo on my Vista machine. Much of it works fine. The more complex examples do not. I suspect it is the OpenGL software on this pc. It uses the ATI Radeon Xpress with OpenGL version 6.14.10.7769. Here is an example of the teapot:

JBadOpenGL.jpg

Update: I have tried a number of other packages that use OpenGL. They all seem to work fine with the version of OpenGL on this pc. So far, only J has this problem.

-- DavidMitchell 2008-07-29 11:40:19

User docs sometimes fail to use the consistent terminology of Dictionary

I know this is nit-picking, but the User documentation sometimes uses "variable" where I believe it should be using the J term "name" (or, in some cases, something like "pronoun" or "proverb" or "value of the name" etc) instead. Some but not all examples are j602/help/user/ole_ocx_overview.htm, j602/help/user/enter_info.htm, and j602/help/user/calling_jdll.htm. For example, the latter says "Use procedure JGetM to retrieve a J variable". -- BJonas 2008-07-31 15:22:32

User Manual "bugs"

There is an error on the page documenting the files script. The result in the case of an error is incorrectly given as 1 instead of _1. (Reported previously in the forums)

The use of italics on the page doesn't seem to be as intended, and the <i> tag is not properly closed. Here is the HTML source:

<p>
on error, the result is <i>1,
e.g. for file not found/file read error/file write error
</i
<p>

Not sure if the use of italics on the graph script page is as intended either:

<p>
points are plotted in a box with <i>1 </i>1 at bottom left
and 1 1 at top right.
<p>

-- RicSherlock 2008-08-13 23:34:08

Plot bugs

I have been able to reproduce the first 2 issues documented by Igor in this post to the forum.

I think the third issue was subsequently resolved as a result of another thread.

-- RicSherlock 2008-08-13 23:42:34

The second issue(Non-zero penstyle leads to graph distortion) can be resolved with some modification in the code. See my post.

-- JuneKim 2012-05-25 06:37:10

Grid Edit bug

I added CELLEDIT=: 0 and changed show__grid 'celldata' to show__grid 'celldata celledit' in one of the Grid demos. I discovered I could hit the Del key and the contents of the selected cell would be replaced with 0. Other modifications of the cell contents were not allowed.

-- DavidMitchell 2008-11-30 16:58:59

"list" utility mis-formats symbol data

The "list" utility accepts symbol data but mis-formats it when symbols contain white space:

   three_symbols =. s: ',one,two,and three'
   30 list  20 $ three_symbols
`one  `two  `and  three `one  
`two  `and  three `one  `two  
`and  three `one  `two  `and  
three `one  `two  `and  three 
`one  `two  `and  three `one  
`two                          

The and three should not go into distinct columns but be kept together, as in the following layout (just missing the symbol ticks):

   30 list  4 s:  20 $ three_symbols
one       two       and three 
one       two       and three 
one       two       and three 
one       two       and three 
one       two       and three 
one       two       and three 
one       two                

Affected are all J releases from 4.x (introducing symbols) up to and including 6.02.

-- MartinNeitzel 2010-11-18 16:00:00

System/Library/Bugs (last edited 2010-11-18 16:08:59 by MartinNeitzel)