Hmm...

I did a quick run through the J plot lab until I got to a pd example,
and then I tried out my variation on your script, and it worked fine.

So I exited J (j903) restarted it, and ran the script as my first
action, and this caused J to crash.

So I expect something is not being initialized properly in jqt or
there's some kind of race condition here.

Here's my variation on your script:

polpopts=: 'aspect 1'; 'polar 1'; 'frame 0'; 'axes 1 1'; 'labels 0 0';
'tics 0 0'; 'grids 0 0'
require'plot'
pd 'reset'
pd each polpopts
pd 'text 50x 100x G#'
pd 'show'

Here's the OSX error I got:

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.)

Here's the top of stack trace which I got;

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                     0x0000000105f54ed6
_ZN21QCocoaEventDispatcher13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE
+ 614
6   QtCore                              0x0000000101679acf
_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 431
7   QtWidgets                           0x00000001036c5e9e
_ZN7QDialog4execEv + 526
8   QtWidgets                           0x0000000103703a72
_ZL17showNewMessageBoxP7QWidgetN11QMessageBox4IconERK7QStringS5_6QFlagsINS1_14StandardButtonEES7_
+ 354
9   libjqt.dylib                        0x0000000102cf1e99
_Z2mbNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_
+ 11721
10  libjqt.dylib                        0x0000000102d2eea3 _ZL3wd1v + 9795
11  libjqt.dylib                        0x0000000102d2c816 wd + 86
12  libj.dylib                          0x0000000107e0b448 stdcalli + 280
13  libj.dylib                          0x0000000107dfce80 jtcdexec1 + 6416
14  libj.dylib                          0x0000000107dfa4d5 jtcd + 853
15  libj.dylib                          0x0000000107b22513 withl + 83
16  libj.dylib                          0x0000000107b8de65 jtunquote + 613
17  libj.dylib                          0x0000000107b7f2df jtparsea + 2303
18  libj.dylib                          0x0000000107b5a395 jtxdefn + 7301

I hope this helps,

-- 
Raul

On Mon, Aug 2, 2021 at 11:36 PM Arthur Anger <[email protected]> wrote:
>
> All--
> After setting plot options as:
>      polpopts=: 'aspect 1'; 'polar 1'; 'frame 0'; 'axes 1 1'; 'labels 0 0'; 
> 'tics 0 0'; 'grids 0 0'
> I try to place a notation on the plot:
>    pd 'text 50x 100x G#'
>    pd 'show'
> |length error: canvas_text
> |   res=.tolist(<fn),each(<'ctx.fillText('),each txt    
> ,each(<','),each(<("1)0&pfmtjs flipxy pos>.0),each<');'
> |canvas_text[11]
> Debug shows txt to be empty.
>
> The same error occurs with p-coordinates.
> Thanks for any help.
> --Art
> ----------------------------------------------------------------------
> 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