I tested the same length error also raised in j602. Were opts
malformed?
Пн, 04 май 2015, Raul Miller написал(а):
> Eh?
>
> I do not knowe much about plot, but a trivial solution to this "error
> in paint handler" problem would be:
> 13!:0]1
>
> This will stop execution when the error happens.
>
> It's not ideal, and you have to click on the plot window before you
> click on the J window or J crashes -- that's a bug that's rather
> nasty.
>
> Or maybe I was just lucky, and should post some debugging information here:
>
> 13!:0]1
>
> load 'plot'
> opts =: 'xlabel myxlabel; ylabel myylabel'
> opts plot ;/~ i.10
>
> |length error: qttext
> | p=.p -"1 off,.0
> |qttext[15]
> 13!:1''
> |length error
> * p=.p -"1 off,.0
> |qttext[3]
> | (>d_index{fns)~d
> |qt_paintit[14]
> | qt_paintit 0 0,Cw,Ch
> |qt_paint[3]
> |ppaint[0]
> |plot_gs_paint[0]
> | wd_fn~''
> |wdhandler_jwplot_[7]
> | (i.0 0)"_ wdhandler_jwplot_$0
> qttext
> 3 : 0
>
> 't f a e c p'=. y
>
> degree0=. 3{f
> f=. qtfontdesc^:(0={.0#f) f
> p=. qt_gpflip p
> t=. text2utf8 each boxopen t
> if. a do.
> glfontextent`glc_fontextent_jglc_@.(Poutput=iQTC) f
> off=. <. -: a * {."1 wh=. glqextent`glc_qextent_jglc_@.(Poutput=iQTC) &> t
> if. (90=degree0)+.(1 e. 'angle900' E. f) do.
> p=. p + "1 [ (0.2*{:wh),.off
> elseif. (270=degree0)+.(1 e. 'angle2700' E. f) do.
> p=. p - "1 [ (0.2*{:wh),.off
> elseif. do.
> p=. p -"1 off,. 0
> end.
> end.
> 'face size style degree'=. parseFontSpec f
> qt_gpbuf qt_gpcount 2312,(<.size*10),style,(<.degree0*10),alfndx,face
> if. is1color e do.
> qt_gpbuf 5 2032,(,e),2 2040
> if. rank01 p do.
> qt_gpbuf qt_gpcount 2056,p
> qt_gpbuf qt_gpcount 2038,alfndx,>t
> else.
> t=. qt_gpcount each 2038 ,each alfndx each t
> t=. (<"1 qt_gpcount 2056 ,"1 p) ,each t
> qt_gpbuf ; t
> end.
> else.
> t=. qt_gpcount each 2038 ,each alfndx each t
> t=. t ,each <"1 qt_gpcount 2056 ,"1 p
> t=. (<"1 (5 2032 ,"1 e) ,"1 [ 2 2040) ,each t
> qt_gpbuf ; t
> end.
>
> )
> y
> ┌──────────┬─────────┬─┬─────┬─┬──────────┐
> │┌────────┐│0 0 9 0 0│1│0 0 0│0│ 76 23│
> ││myxlabel││ │ │ │ │115.889 23│
> │└────────┘│ │ │ │ │155.778 23│
> │ │ │ │ │ │195.667 23│
> │ │ │ │ │ │235.556 23│
> │ │ │ │ │ │275.444 23│
> │ │ │ │ │ │315.333 23│
> │ │ │ │ │ │355.222 23│
> │ │ │ │ │ │395.111 23│
> │ │ │ │ │ │ 435 23│
> └──────────┴─────────┴─┴─────┴─┴──────────┘
>
> Anyways, it seems to me that one of the listed routines from that
> 13!:1 stack trace needs to deal with this issue. If nothing else, wrap
> plot's paint event handler in a try/catch such that an error shuts
> down further paint events (perhaps by closing the plot window).
>
> --
> Raul
>
> On Mon, May 4, 2015 at 5:18 AM, bill lam <[email protected]> wrote:
> > IIRC the plot issue had been reported here but there were no fool
> > proofed solution.
> >
> > On Mon, May 4, 2015 at 4:19 PM, Jan-Pieter Jacobs
> > <[email protected]> wrote:
> >> Hi everyone,
> >>
> >> I found some bugs I'd want to inform about:
> >> * Infinite popups in plot
> >> * comments syntax highlighting broken
> >> * Tabula add-on broken
> >> * Labs break each other.
> >>
> >> I just found another instance of an error which keeps popping up
> >> infinitely when using plot.
> >> A try to debug the error with the JQt debugger ended in a crash.
> >>
> >> A minimal example exhibiting this behavior is:
> >>
> >> load 'plot'
> >> opts =: 'xlabel myxlabel; ylabel myylabel'
> >> opts plot ;/~ i.10
> >>
> >> Probably it is me doing something wrong, but as this makes me forcibly
> >> shut down J every time I hit this error, it's pretty annoying to hunt
> >> down my error.
> >> ------------------------
> >> Another thing I discovered when toying around was that syntax
> >> highlighting is slightly broken for comments in these cases:
> >>
> >> * a comment contains 0 : 0 : the entire comment (and following code
> >> till the next lone opening parenthesis) is regarded as a long string
> >> literal, and marked up as such.
> >> * if a word (probably any valid identifier) is directly followed by an
> >> opening brace (even in comments) it's highlighted as a string. I guess
> >> this is supposed to indicate functions in traditionally mathematical
> >> notation like f(x), but it should not happen in comments.
> >> ------------------------
> >> Further, I've found the "math/tabula" add-on to be utterly broken, in
> >> that clicking any of the buttons pops up the error:
> >>
> >> error in: tab_g_mbldown
> >>
> >> domain error: chkgl2
> >> glpixels X,Y,32,32,,convicon y
> >> ------------------------
> >> Running through the labs in order they show up gave me some problems:
> >>
> >> 0) Book of numbers: (4) 12 of 23 : domain error: on
> >> 1) CAL : 3 of 11 : z =:tabengine 'CTAB' : length error SP1: n (x,.SP) ,. y
> >>
> >> After doing a "clear '' " both worked fine. So I assume that these were
> >> due to
> >> 0) other labs overwriting "standard" words (like "on") with something else
> >> 1) labs not verifying what they use is what they expect it to be.
> >>
> >> Maybe it would not be a bad idea to run labs in a private locale,
> >> which is initialized in a certain way? This way these conflicts (and
> >> conflicts with user defined things) might be avoided.
> >>
> >> Best regards,
> >>
> >> Jan-Pieter
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm