For me your test case looks bogus. The Ghostscript command line is
cat testcase.ps | gs -sstdout=%stderr -r600 -g0x0 -q -dNOPROMPT -dSAFER -sDEVICE=ppmraw -sOutputFile=%stdout - >/dev/null
The "-g0x0" means that the dimensions of the output bitmap should be 0 pixels wide and 0 pixels high. So it seems obvious for me that one gets
Unrecoverable error: rangecheck in .putdeviceprops
I have tried
cat testcase.ps | gs -sstdout=%stderr -r600 -g1000x1000 -q -dNOPROMPT -dSAFER -sDEVICE=ppmraw -sOutputFile=%stdout - > out
and this does not error and the file "out" is a valid image file (being blank as your testcase.ps is also a blank page).
Does the Ghostscript command line of your testcase.sh come from Canon's printer driver?
For me your test case looks bogus. The Ghostscript command line is
cat testcase.ps | gs -sstdout=%stderr -r600 -g0x0 -q -dNOPROMPT -dSAFER -sDEVICE=ppmraw -sOutputFile= %stdout - >/dev/null
The "-g0x0" means that the dimensions of the output bitmap should be 0 pixels wide and 0 pixels high. So it seems obvious for me that one gets
Unrecoverable error: rangecheck in .putdeviceprops
I have tried
cat testcase.ps | gs -sstdout=%stderr -r600 -g1000x1000 -q -dNOPROMPT -dSAFER -sDEVICE=ppmraw -sOutputFile= %stdout - > out
and this does not error and the file "out" is a valid image file (being blank as your testcase.ps is also a blank page).
Does the Ghostscript command line of your testcase.sh come from Canon's printer driver?