Raul,

I think your fix is good.

glrect is a gl2 direct call to external shared library with protocol that
expected integer argument. IIRC all gl2 call expected integer or literal
argument.

In j602, gl2 coerce floating point to integer  but not in j9. There are
some artefacts like this in the plot addon.


On Wed, Jul 14, 2021, 8:39 AM Raul Miller <[email protected]> wrote:

> This one was pretty easy to isolate.
>
> Here's what I did:
>
> (0) I located the 'error in paint' message -- it was coming from
> dissect.ijs
>
> (1) I edited dissect.ijs with a quick hack to show the details of the cd
> error:
>
> catch.
>   smoutput 'error in paint'
>   smoutput > (errnum =. <:13!:11'') { 9!:8''  NB. string form of emsg
>   smoutput er=. 13!:12''
>   if. 1 e. 'cd' E. er do.
>     echo cder''
>     echo cderx''
>   end.
>
> I couldn't make heads nor tails of the cderx value, but the cder value
> was telling me that the argument type to glrect did not match its
> declaration (which, of course, matches the 'domain error' message --
> but it's good to be sure).
>
> (2) I found the glrect statement and threw in a quick hack to capture
> its value so that I could inspect it:
>
> glrect GLRECT_DBG_base_=: 0 0 1 1 +"1^:(-.IFQT) ,"2 |."1 y
>
> And, sure enough, for dissect'i.1e4' the y argument to glrect was:
>
>    GLRECT_DBG
> 23 147.5 504 10.5
>
> So the simple, stupid fix is to change that glrect line to
>
> glrect <. 0 0 1 1 +"1^:(-.IFQT) ,"2 |."1 y
>
> And, that seems to work. Though perhaps that should be >. rather than
> <. (because >. guarantees that the indicated dimensions are included
> in the displayable area).
>
> What I have not done, though, is trace back through the code to find
> what assumptions the recent library update violated.
>
> (I am not sure I am ready to take on the mantle of "maintainer" but I
> can certainly help in isolating some problems.)
>
> Thanks,
>
> --
> Raul
>
> On Tue, Jul 13, 2021 at 6:27 PM Henry Rich <[email protected]> wrote:
> >
> > Dissect is my proudest achievement, but I don't have time to maintain
> > it.  I am too busy making JE improvements, and if I thought I had to
> > bring Dissect along at the same time I wouldn't be able to do anything.
> >
> > If anyone will take the torch, I will be grateful.  The code is very
> > complex, but with lots of commentary and a large set of tests.
> >
> > This error would be a good one to start on.  It even fails on dissect
> > 'i. 1e4' .  I know this worked last time I worked with the code.
> >
> > I suspect that the error is related to JQt, and is probably in JQt but
> > it might be a boundary issue.  The code is drawing a list of rectangles
> > and one of them is rejected by JQt: probably JQt thinks the rectangle is
> > outside the drawing area.
> >
> > Henry Rich
> >
> >
> >
> > On 7/13/2021 5:36 PM, Devon McCormick wrote:
> > > Hi,
> > >
> > > I was trying to use "dissect" to show the structure of Jan-Pieter
> > > Jacobs's solution to the problem Skip Cave proposed about ten days ago
> but
> > > encountered this (running in JQt under a recently updated 9.02):
> > >
> > > require 'debug/dissect'
> > >
> > > dissect '(10#. [:~.[:,/(1 1 1 3 |."0 1~ i. 4) #"1/ (4#10)#: ]"_) i.1e4'
> > >
> > > error in paint
> > >
> > > domain error
> > >
> > > |domain error: cd
> > >
> > > | glrect 0 0 1 1+"1^:(-.IFQT),"2|."1 y
> > >
> > >
> > > no locale for event handler: 81, event: dissect_dissectisi_resize
> > >
> > > no locale for event handler: 81, event: dissect_resize
> > >
> > > JVERSION
> > >
> > > Engine: j902/j64avx2/windows
> > >
> > > Release-a: commercial/2020-12-05T13:36:01
> > >
> > > Library: 9.02.08
> > >
> > > Qt IDE: 1.9.2s/5.12.10(5.12.10)
> > >
> > > Platform: Win 64
> > >
> > > Installer: J902 install
> > >
> > > InstallPath: c:/pgm/j902
> > >
> > > Contact: www.jsoftware.com
> > >
> > >
> > > Does anyone have an idea what might be causing this error and how I
> could
> > > avoid it?
> > >
> > >
> > > Thanks,
> > >
> > > Devon
> >
> >
> > --
> > This email has been checked for viruses by AVG.
> > https://www.avg.com
> >
> > ----------------------------------------------------------------------
> > 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

Reply via email to