verbose error message on memory error

(debugging https://algospot.com/forum/read/2494/?c=11735&c=11736
which doesn't seem to be reproducible in VM)