gllines should already checked it received 2 parameters other 15!:0 would
raise a domain error fir incorrect number of parameters.
see the prototype of gllines in previous email.

On Wed, 26 Jan 2022 at 12:57 PM Henry Rich <[email protected]> wrote:

> gllines was being given one atom at a time, and it couldn't draw any lines.
>
> Henry Rich
>
> On 1/25/2022 11:55 PM, bill lam wrote:
> > Replace @ with @: worked.
> >
> > Any theory why it crashed with @ ?
> >
> >> On 26 Jan 2022, at 12:19 PM, Henry Rich <[email protected]> wrote:
> >>
> >> P_C_paint=: gllines_jgl2_@<.@(10 + ,/"2 P-"1<./,/P)
> >>
> >> seems wrong: I suggest
> >>
> >> P_C_paint=: gllines_jgl2_@:<.@(10 + ,/"2 P-"1<./,/P)
> >>
> >> Henry Rich
> >>
> >>
> >> On 1/25/2022 9:50 PM, bill lam wrote:
> >>> prototype of gllines is
> >>> gllines=: chkgl2 @: (('"',libjqt,'" gllines >',(IFWIN#'+'),' i *i i')
> cd (;#)) "1
> >>>
> >>> so that it expected integer array but a floating point data type was
> fed. JE should either signal a data type error or automatically do the
> converting, but that is another issue/bug.
> >>>
> >>> I changed the line to
> >>> P_C_paint=: gllines_jgl2_ bind (10 <.@+ ,/"2 P-"1<./,/P)
> >>> then it work ok.
> >>>
> >>> However, your line still crashed.
> >>> P_C_paint=: gllines_jgl2_@<.@(10 + ,/"2 P-"1<./,/P)
> >>>
> >>> I suspected it couldn't coerce data to integer but I have no idea
> what's wrong.
> >>>
> >>>
> >>>
> >>>> On 20 Jan 2022, at 11:15 PM, Raul Miller <[email protected]>
> wrote:
> >>>>
> >>>> http://www.rosettacode.org/wiki/Fractal_tree#J
> >>>>
> >>>> The J implementation of the rosettacode fractal tree task now crashes
> >>>> (OSX Mojave 10.14.6)
> >>>>
> >>>>    JVERSION
> >>>> Engine: j903/j64/darwin
> >>>> Release-a: commercial/2021-12-16T15:16:37
> >>>> Library: 9.03.08
> >>>> Qt IDE: 1.9.5/5.15.2(5.15.2)
> >>>> Platform: Darwin 64
> >>>> Installer: J903 install
> >>>> InstallPath: /users/rauldmiller/applications/j903
> >>>> Contact: www.jsoftware.com
> >>>>
> >>>> The xywh wd command and the rightmove and bottommove parameters are no
> >>>> longer valid. Simply removing them from the wd command list is
> >>>> sufficient to cause the crash.
> >>>>
> >>>> Alternatively, an updated wd command list also causes the crash:
> >>>>
> >>>> pc P closeok;
> >>>> setp wh 250 300;
> >>>> cc C isigraph;
> >>>> set C sizepolicy expanding;
> >>>> pas 0 0;
> >>>> pshow;
> >>>>
> >>>> The crash happens in the paint event handler (the qt window comes up
> >>>> fine with P_C_paint=: ]).
> >>>>
> >>>> Simplifying the represented data with N=:2 still produces the crash
> >>>>
> >>>> P_C_paint=: gllines_jgl2_@<.@(10 + ,/"2 P-"1<./,/P)
> >>>>
> >>>> still produces the crash.
> >>>>
> >>>> A stack backtrace looks like this:
> >>>>
> >>>> 0   CoreFoundation                      0x00007fff4f8dfa7d
> >>>> __exceptionPreprocess + 256
> >>>> 1   libobjc.A.dylib                     0x00007fff7a10ea17
> >>>> objc_exception_throw + 48
> >>>> 2   CoreFoundation                      0x00007fff4f8df8af
> >>>> +[NSException raise:format:] + 201
> >>>> 3   AppKit                              0x00007fff4d6fc411
> _NSRunModal + 156
> >>>> 4   AppKit                              0x00007fff4d2e5bb8
> >>>> -[NSApplication runModalSession:] + 241
> >>>> 5   libqcocoa.dylib                     0x0000000114623ed6
> >>>>
> _ZN21QCocoaEventDispatcher13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE
> >>>> + 614
> >>>> 6   QtCore                              0x000000010fd6facf
> >>>> _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 431
> >>>> 7   QtWidgets                           0x0000000111ddae9e
> >>>> _ZN7QDialog4execEv + 526
> >>>> 8   QtWidgets                           0x0000000111e18a72
> >>>>
> _ZL17showNewMessageBoxP7QWidgetN11QMessageBox4IconERK7QStringS5_6QFlagsINS1_14StandardButtonEES7_
> >>>> + 354
> >>>> 9   libjqt.dylib                        0x000000011150247a
> >>>> _Z2mbNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_
> >>>> + 12026
> >>>> 10  libjqt.dylib                        0x0000000111544c35 _ZL3wd1v +
> 10821
> >>>> 11  libjqt.dylib                        0x000000011154219b wd + 91
> >>>> 12  libj.dylib                          0x00000001166452b8 stdcalli +
> 280
> >>>> 13  libj.dylib                          0x0000000116636f85 jtcdexec1
> + 4965
> >>>> 14  libj.dylib                          0x0000000116634ddc jtcd + 1164
> >>>>
> >>>> On a tangentially related note, the links to doc.qt.io embedded in
> >>>>
> https://code.jsoftware.com/wiki/Guides/Window_Driver/ChildClasses#Styles_and_set_commands_common_to_all_controls
> >>>> are now invalid.
> >>>>
> >>>> 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
> >>
> >> --
> >> 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
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to