scratch the above comment! it's panicing because it's rightfully OOM when it can't store 10000 geojson objects in 8M heap. good news though, we can strip nonblocking-input-ports and still reproduce it: ;;; running like this: ;;; [klm@kth arp]$ csi -s geojson-generator.scm | csi -s ./arp-boats.scm -:g -:hm8M 2>&1 | grep resize -C 5 (use cjson) (define state '()) (define (geojson-mmsi geojson) (let ((mmsi (alist-ref 'mmsi (or (alist-ref 'properties geojson) '())))) (assert (number? mmsi)) mmsi)) (define (prj-geojson geojson state) (assert (<= (length state) 20000)) ;; set properties for mmsi key: (alist-update (geojson-mmsi geojson) ;; key (mmsi) geojson ;; value (geojson feature) state)) (define count 0) (port-for-each (lambda (line) (let ((json (string->json line))) (set! count (add1 count)) (set! state (prj-geojson json state)))) read-line)