the echo inside the verb hand caused infinite repaint. This works
{{
require'gl2'
coinsert 'jgl2'
wd {{)n
pc clock closeok;
cc face isigraph;
set face wh 200 200;
pshow;
}}
clock_face_paint=: {{
try.
'H M S'=. _3{.6!:0''
glclear''
center=. <:<.-:glqwh''
glpen 2: glrgb 0 0 0 255
glellipse 1 1,2*center
hand=: center {{
glpen 2: glbrush glrgb<.4{.255*x,4#1
gllines<.m,0.5+m*1+y
NB. echo x;m;y;<.m,0.5+m*1+y
EMPTY
}}
1 0 0 hand 0.9*+.j.^j.2r60p1*S
0 1 0 hand 0.8*+.j.^j.2r60p1*M
0 0 1 hand 0.7*+.j.^j.2r12p1*H
catch.
echo 'fail'
end.
EMPTY
}}
EMPTY
}}1
I'm tied up and have no spare time to fix it.
On Thu, Jun 2, 2022 at 11:01 AM Raul Miller <[email protected]> wrote:
> This reliably crashes J903 (and J904):
>
> {{
> require'gl2'
> coinsert 'jgl2'
> wd {{)n
> pc clock closeok;
> cc face isigraph;
> set face wh 200 200;
> pshow;
> }}
> clock_face_paint=: {{
> try.
> 'H M S'=. _3{.6!:0''
> glclear''
> center=. <:<.-:glqwh''
> glpen 2: glrgb 0 0 0 255
> glellipse 1 1,2*center
> hand=: center {{
> glpen 2: glbrush glrgb<.4{.255*x,4#1
> NB. gllines<.m,0.5+m*1+y
> echo x;m;y;<.m,0.5+m*1+y
> EMPTY
> }}
> 1 0 0 hand 0.9*+.j.^j.2r60p1*S
> 0 1 0 hand 0.8*+.j.^j.2r60p1*M
> 0 0 1 hand 0.7*+.j.^j.2r12p1*H
> catch.
> echo 'fail'
> end.
> EMPTY
> }}
> EMPTY
> }}1
>
> JVERSION
> Engine: j903/j64avx2/windows
> Release-b: commercial/2022-01-28T04:09:50
> Library: 9.03.08
> Qt IDE: 1.9.5/5.15.2(5.15.2)
> Platform: Win 64
> Installer: J903 install
> InstallPath: c:/other/j903
> Contact: www.jsoftware.com
>
> FYI,
>
> --
> Raul
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm