(I'm having problems with my mail sending to forums.jsoftware.com)
Does this help?
wheagy@bigflight:~/git/jsource$ gdb jlibrary/bin/jconsole
GNU gdb (Debian 8.3.1-1) 8.3.1
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from jlibrary/bin/jconsole...
(gdb) r
Starting program: /home/wheagy/tmp/jsource.git/trunk/jlibrary/bin/jconsole
[Detaching after vfork from child process 76651]
13!:0 (1)
aJson =. ('weight';1) ,. (1;3)
NB. left - boxed elem, right - boxed json array in format convert/json
getJsonEl =: dyad : 0
string =. >x
> (1 { y) {~ 1 i.~ ((string&=)@>) {. y
)
getJsonNode =: dyad : 0
path =. }. '/' splitstring x
y getJsonEl F.. ] x
)
echo 'weight' getJsonNode aJson
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7a68c3e in suspset (d=0x4972c0) at ../../../../jsrc/dsusp.c:81
81 if(d->dcc)e->dcsusp=1; /* if explicit, set
susp on line */
(gdb) bt
#0 0x00007ffff7a68c3e in suspset (d=0x4972c0) at
../../../../jsrc/dsusp.c:81
#1 jtdebug (jt=0x44e000) at ../../../../jsrc/dsusp.c:149
#2 0x00007ffff7a692cf in jtdbunquote (jt=0x44e000, a=0x46bb80, w=0x46bd80,
self=0x46c500) at ../../../../jsrc/dsusp.c:213
#3 0x00007ffff7a973e9 in jtunquote (jt=<optimized out>, a=<optimized out>,
w=<optimized out>, self=0x46de80) at ../../../../jsrc/sc.c:105
#4 0x00007ffff7a0ee7b in jtfoldx (jt=0x44e000, a=0x3800fce0, w=0x46bd80,
self=0x46de80) at ../../../../jsrc/ar.c:710
#5 0x00007ffff7a8a33d in jtparsea (jt=0x44e000, queue=<optimized out>,
m=<optimized out>) at ../../../../jsrc/p.c:644
#6 0x00007ffff7a690bd in jtparsex (jt=0x44e000, queue=0x496ef0, m=5,
ci=<optimized out>, c=<optimized out>) at ../../../../jsrc/dsusp.c:193
#7 0x00007ffff7a63e12 in jtxdefn (jt=<optimized out>, a=<optimized out>,
w=<optimized out>, self=0x46cb00) at ../../../../jsrc/cx.c:318
#8 0x00007ffff7a28a24 in jtdfs2 (jt=0x44e000, a=0x3800fce0, w=0x8000000,
self=0xf7ffffff) at ../../../../jsrc/au.c:38
#9 0x00007ffff7a69249 in jtdbunquote (jt=0x44e000, a=0x46bd80, w=0x46bb80,
self=0x46cb00) at ../../../../jsrc/dsusp.c:204
#10 0x00007ffff7a973e9 in jtunquote (jt=<optimized out>, a=<optimized out>,
w=<optimized out>, self=0x46be80) at ../../../../jsrc/sc.c:105
#11 0x00007ffff7a8a33d in jtparsea (jt=0x44e003, queue=<optimized out>,
m=<optimized out>) at ../../../../jsrc/p.c:644
#12 0x00007ffff7a897ed in jtparse (jt=0x44e000, w=<optimized out>)
at ../../../../jsrc/p.c:235
#13 0x00007ffff7a8cbd7 in jtimmex (jt=0x44e000, w=<optimized out>)
at ../../../../jsrc/px.c:44
#14 0x00007ffff7a7c02f in jdo (jt=0x44e000, lp=<optimized out>)
at ../../../../jsrc/io.c:174
#15 0x00007ffff7a7c470 in JDo (jt=0x44e000,
lp=0x3800fce0 <error: Cannot access memory at address 0x3800fce0>)
at ../../../../jsrc/io.c:237
#16 0x0000000000401b6d in main (argc=<optimized out>, argv=0x7fffffffe298)
at ../../../../jsrc/jconsole.c:302
(gdb)
On 1/21/20 12:59 PM, Henry Rich wrote:
@Sergey: yes, debug errors, and all crashes, are worth sending.
I can't make sense of this trace. foldx processes the fold verb.
unquote resolves a name into a verb/adv/conj for execution; dbunquote
executes for debug. That makes sense. But the next thing should have
been a call to xdefn to run getJsonEl, which would call the parser
again, hit the error, and suspend; but none of that is there.
I will need help from someone who can build from the source on Linux,
and can spend the time to shoot this. That person might be from
Jsoftware or from outside. Volunteers requested!
hhr
On 1/21/2020 11:56 AM, Raul Miller wrote:
Your suspicion is correct: I get an index error with debug turned off.
Here's a partial stack trace
0 libj.dylib 0x0000000115ca1cde jtdebug + 110
1 libj.dylib 0x0000000115ca228d jtdbunquote + 253
2 libj.dylib 0x0000000115cd0951 jtunquote + 1153
3 libj.dylib 0x0000000115c47e4c jtfoldx + 188
4 libj.dylib 0x0000000115cc3417 jtparsea + 2807
5 libj.dylib 0x0000000115ca2172 jtparsex + 162
6 libj.dylib 0x0000000115c9cd93 jtxdefn + 6707
7 libj.dylib 0x0000000115c615b7 jtdfs2 + 39
8 libj.dylib 0x0000000115ca220f jtdbunquote + 127
9 libj.dylib 0x0000000115cd0951 jtunquote + 1153
...
Thanks,
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm