I suspect an API issue with QT, among other things.

When I run this script:

T=:2 2 2$".;._2]0 :0
0 1 1.5 2.5 3 4 4.5 5.5 6
0 1 1.5 2.5 3 4 4.5 5.5 6
0 1 1.5 2.5 3 4 4.5 5.5 6
0 1 1.5 2.5 3 4 4.5 5.5 6
        0         0  0.8660254  0.8660254         0         0
0.8660254  0.8660254         0
1.7320508 1.7320508  2.5980762  2.5980762 1.7320508 1.7320508
2.5980762  2.5980762 1.7320508
        0         0 _0.8660254 _0.8660254         0         0
_0.8660254 _0.8660254         0
1.7320508 1.7320508  0.8660254  0.8660254 1.7320508 1.7320508
0.8660254  0.8660254 1.7320508
)
require'plot'
pd 'reset'
pd 'color black; type line ; tics 0; labels 0; frame 0; grids 0'
pd <"_1 T
pd 'aspect ',(": %~/(>./-<./)"1 ,/"2^:2 T)
pd 'show'

under OSX, J crashes, and the error report which OSX generates includes this:

Crashing on exception: -[NSApplication runModalSession:] may not be
invoked inside of transaction begin/commit pair, or inside of
transaction commit (usually this means it was invoked inside of a
view's -drawRect: method.)

Application Specific Backtrace 1:
0   CoreFoundation                      0x00007fff3e4a5a7d
__exceptionPreprocess + 256
1   libobjc.A.dylib                     0x00007fff68b79a17
objc_exception_throw + 48
2   CoreFoundation                      0x00007fff3e4a58af
+[NSException raise:format:] + 201
3   AppKit                              0x00007fff3c2c2411 _NSRunModal + 156
4   AppKit                              0x00007fff3beabbb8
-[NSApplication runModalSession:] + 241
5   libqcocoa.dylib                     0x000000011efe9ed6
_ZN21QCocoaEventDispatcher13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE
+ 614
6   QtCore                              0x000000010ff14acf
_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 431
7   QtWidgets                           0x000000011e148e9e
_ZN7QDialog4execEv + 526
8   QtWidgets                           0x000000011e186a72
_ZL17showNewMessageBoxP7QWidgetN11QMessageBox4IconERK7QStringS5_6QFlagsINS1_14StandardButtonEES7_
+ 354
9   libjqt.dylib                        0x00000001114f1e99
_Z2mbNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_
+ 11721
10  libjqt.dylib                        0x000000011152eea3 _ZL3wd1v + 9795
11  libjqt.dylib                        0x000000011152c816 wd + 86
12  libj.dylib                          0x000000012294e448 stdcalli + 280
13  libj.dylib                          0x000000012293fe80 jtcdexec1 + 6416
14  libj.dylib                          0x000000012293d4d5 jtcd + 853
15  libj.dylib                          0x0000000122665513 withl + 83
16  libj.dylib                          0x00000001226d0e65 jtunquote + 613
17  libj.dylib                          0x00000001226c22df jtparsea + 2303
18  libj.dylib                          0x000000012269d395 jtxdefn + 7301
19  libj.dylib                          0x00000001226d0e65 jtunquote + 613
20  libj.dylib                          0x00000001226c22df jtparsea + 2303
21  libj.dylib                          0x000000012269d395 jtxdefn + 7301
22  libj.dylib                          0x00000001226d0e65 jtunquote + 613
23  libj.dylib                          0x00000001226c22df jtparsea + 2303
24  libj.dylib                          0x000000012269d395 jtxdefn + 7301
25  libj.dylib                          0x00000001226d0e65 jtunquote + 613
26  libj.dylib                          0x00000001226c22df jtparsea + 2303
27  libj.dylib                          0x000000012269d395 jtxdefn + 7301
28  libj.dylib                          0x00000001226d0e65 jtunquote + 613
29  libj.dylib                          0x00000001226c22df jtparsea + 2303
30  libj.dylib                          0x00000001226c19c2 jtparse + 66
31  libj.dylib                          0x00000001226c5cab jtimmex + 91
32  libj.dylib                          0x00000001226b6618 jdo + 280
33  libj.dylib                          0x00000001226b6420 JDo + 112
34  libjqt.dylib                        0x0000000111476ef6
_ZN4Jcon11cmdSentenceENSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE
+ 182
35  libjqt.dylib                        0x0000000111476df9
_ZN4Jcon6cmddopENSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE
+ 41
36  libjqt.dylib                        0x00000001114d48bd
_ZN4Form11signaleventEP5ChildP9QKeyEvent + 1805
37  libjqt.dylib                        0x00000001114ea1a8
_ZN9Isigraph219paintEvent_isigraphEv + 168
38  QtWidgets                           0x000000011df83088
_ZN7QWidget5eventEP6QEvent + 1096

So it looks like something went wrong during a paint event, and
perhaps J tried to raise a popup with an error message, and Qt refused
to display that popup.

I hope this helps.

-- 
Raul

On Sat, Aug 21, 2021 at 7:07 AM R.E. Boss <[email protected]> wrote:
>
> My T is such that ;/T equals
> +-------------------------+---------------------------------------------------------------------------------------------+
> |0 1 1.5 2.5 3 4 4.5 5.5 6|        0         0  0.8660254  0.8660254         
> 0         0  0.8660254  0.8660254         0|
> |0 1 1.5 2.5 3 4 4.5 5.5 6|1.7320508 1.7320508  2.5980762  2.5980762 
> 1.7320508 1.7320508  2.5980762  2.5980762 1.7320508|
> |                         |                                                   
>                                           |
> |0 1 1.5 2.5 3 4 4.5 5.5 6|        0         0 _0.8660254 _0.8660254         
> 0         0 _0.8660254 _0.8660254         0|
> |0 1 1.5 2.5 3 4 4.5 5.5 6|1.7320508 1.7320508  0.8660254  0.8660254 
> 1.7320508 1.7320508  0.8660254  0.8660254 1.7320508|
> +-------------------------+---------------------------------------------------------------------------------------------+
> Yet, if I do
>
> pd 'reset'
> pd 'color black; type line ; tics 0; labels 0; frame 0; grids 0'
> pd <"_1 T
> pd 'aspect ',(": %~/(>./-<./)"1 ,/"2^:2 T)
> pd 'show'
>
> I get the famous
>                 error in: plot_gs_paint
>
>                 domain error: chkgl2
>                    rc=.  glcmds`glcmds_jglc_@.(Poutput=iQTC)buf
>
> which is far beyond my capacities.
> Any help?
>
>
> R.E. Boss
> ----------------------------------------------------------------------
> 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