i hope you folks will find this interesting.
it certainly has me stumped.
i have a fairly complicated (for me anyway) procedure i run once a month that does an aged inventory valuation, that is, it evaluates tranches of inventory based on when they were purchased.
last month, and many, many previous months, it ran correctly.
this month, on a new mac and new os (10.15.7), it reliably crashes panorama.
the block that causes the crash is a nested loop.
what i find very odd is that the proc runs several iterations of the loop before crashing, and it doesn’t always crash at the same place. the last two times i tried it ran 174 and 189 iterations respectively then crashed on the next one. (it would run about 700 if it worked correctly.)
this is the offending code:
i added the save near the end to see where the crash occurred. this slows the proc down enormously. it crashes with or without it.
loop theitem = array(itms, n, ¶) select item = theitem theqty = val(lookup('itemlist', 'item', theitem, 'onhand', '', 0)) firstrecord case theqty ≤ datavalue(pqty) ohqty = theqty n = n + 1 case theqty > datavalue(pqty) ohqty = datavalue(pqty) theqty = theqty - datavalue(pqty) downrecord loop if theqty ≤ datavalue(pqty) ohqty = theqty n = n + 1 stoploopif theqty ≤ datavalue(pqty) else //theqty > datavalue(pqty) ohqty = datavalue(pqty) theqty = theqty - datavalue(pqty) downrecord endif while forever endcase save
until n = arraysize(itms, ¶) + 1
i’ll happily share the entire proc if anybody’s that interested.