I'm running j64-805 on a Mid 2012 MacBook Air with 8GB RAM. I have a script that causes jqt to crash. The script implements the F(m,n) function as described in here: https://projecteuler.net/problem=115 and is as follows:
params =: ( <:@:i.@:(] - <:@:[)) coeffs =: (|.@:>:@:i.@(] - <:@:[)) f =: 4 : 0 M. if. y < x do. 1 else. >: +/ ((x coeffs y) * x f"0 (x params y)) end. ) It generates most answers correctly, however for certain larger inputs it causes jqt to crash. It crashes after less than a second, i.e.it doesn't churn for a long time, and the highest entries that don't fail execute very rapidly. Furthermore it doesn't consistently fail on the same inputs, for instance, it has always failed on 50 f 168, but has occasionally crashed on some lower inputs. I've tried running the script in jconsole to get some more information, and I get two different error messages: load 'fill.ijs' 50 f 168 jconsole(941,0x7fff7cc9f000) malloc: *** error for object 0x102005e00: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Abort trap: 6 logout Saving session... ...copying shared history... ...saving history...truncating history files... ...completed. Showing that the error isn't necessarily the same each time: load 'fill.ijs' 50 f 168 Segmentation fault: 11 logout Saving session... ...copying shared history... ...saving history...truncating history files... ...completed. Any ideas on what's going on? Is there anyway to complete the computation without encountering these errors? ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
