Your message dated Wed, 27 Nov 2019 19:35:39 +0000 with message-id <[email protected]> and subject line Bug#941864: fixed in ghostscript 9.50~dfsg-5 has caused the Debian Bug report #941864, regarding cups: pxlmono fails to print on Samsung ML-2250 with 9.28rc to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 941864: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=941864 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: ghostscript Version: 9.28~~rc4~dfsg-1 Severity: important Tags: upstream Dear Maintainer, my Samsung ML-2250 printer stopped to work, it outputs a page with this error message: PCL6 ERROR - sb_count != -128 POSITION : 0xbc8 (3016) SYSTEM : XLPGP/xl_pattern LINE : 890 VERSION : PCL6 3.34 05-01-2004 It took me a while to figure out what part of the printing system caused the failure, but after downgrading ghostscript to 9.27~dfsg-3.1 printing worked again. For fun I decided to dig into it: - I used "gs -sDEVICE=pxlmono -sOutputFile=t.raw -r300x300 foo.pdf" to generate output for 9.27 and 9.28 - I used ghostpdl/pcl/tools/pxldis.py tool from ghostscript source to convert it to something readable and compared it -> the only difference is the use of RLE compression with 9.28 - I checked the RLE encoding and it is correct (pcl_xl_2_0_technical_reference_rev2_2.pdf appendix Q) Then it dawned on me that ghostscript's 0x80 "EOD" marker is rejected by the Samsung printer firmware. Ghostscript adds the (apparently useless, at least for PCL6) EOD marker as the last byte of RLE compressed data. According to spec, 0x80 bytes have no meaning and should be ignored ("A control byte of -128 is ignored and is not included in the decompressed data. The byte following a control byte of 128 is treated as the next control byte."). But the error message from my printer reads like a failed assertion for this case, i.e. the printer firmware is buggy. To test my theory I made the following change: --- ghostscript-9.28~~rc4~dfsg.orig/base/srle.c +++ ghostscript-9.28~~rc4~dfsg/base/srle.c @@ -329,11 +329,13 @@ run_len_0_n0_read: *++q = n0; } case state_eod_unmarked: +#if 0 if (wlimit - q < 1) { ss->state = state_eod_unmarked; goto no_output_room; } *++q = 128; /* EOD */ +#endif case state_eod: ss->run_len = 0; ss->state = state_0; Success! It make my printer work again. Best Regards, Johannes -- System Information: Debian Release: bullseye/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.2.15 (SMP w/4 CPU cores; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=de_DE.utf-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages ghostscript depends on: ii libc6 2.29-2 ii libgs9 9.28~~rc4~dfsg-1 ghostscript recommends no packages. Versions of packages ghostscript suggests: ii ghostscript-x 9.28~~rc4~dfsg-1 -- no debconf information
--- End Message ---
--- Begin Message ---Source: ghostscript Source-Version: 9.50~dfsg-5 We believe that the bug you reported is fixed in the latest version of ghostscript, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [email protected], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Jonas Smedegaard <[email protected]> (supplier of updated ghostscript package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [email protected]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Format: 1.8 Date: Wed, 27 Nov 2019 20:15:08 +0100 Source: ghostscript Architecture: source Version: 9.50~dfsg-5 Distribution: unstable Urgency: medium Maintainer: Debian Printing Team <[email protected]> Changed-By: Jonas Smedegaard <[email protected]> Closes: 941864 Changes: ghostscript (9.50~dfsg-5) unstable; urgency=medium . * add patch cherry-picked upstream to add 'omitEOD' flag to RLE compressor and use for PXL; closes: bug#941864, thanks to Agustin Martin and Johannes Stezenbach Checksums-Sha1: 23e91db4e614175b93b7cf20a40dbc79bebef38e 2799 ghostscript_9.50~dfsg-5.dsc 5cacf71c9e0cd6f16ca071459b9f4c29f139aa04 112516 ghostscript_9.50~dfsg-5.debian.tar.xz cad2d44ca68c5f3de48d01a34e0575879ab52a56 11502 ghostscript_9.50~dfsg-5_amd64.buildinfo Checksums-Sha256: ba8dbaebe7192a0969d01e2ff1ca6693800b3b6f7398bc4f26f432f8d3228916 2799 ghostscript_9.50~dfsg-5.dsc e0bca24cc60966d4940b2473563ae82e9edd500fcb3e6b8845c27bc4826f92f3 112516 ghostscript_9.50~dfsg-5.debian.tar.xz 6ad7e2999cb766109805c1eaab878bde67958715afa4db3c33b24f1354142e08 11502 ghostscript_9.50~dfsg-5_amd64.buildinfo Files: d605aa7d8d1cda2c63d33a296454d9a7 2799 text optional ghostscript_9.50~dfsg-5.dsc 0065c74ae7b779acc99ed00b15c11678 112516 text optional ghostscript_9.50~dfsg-5.debian.tar.xz e6751650acb16788bab3d4ceae6fd9e3 11502 text optional ghostscript_9.50~dfsg-5_amd64.buildinfo -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEn+Ppw2aRpp/1PMaELHwxRsGgASEFAl3ezHMACgkQLHwxRsGg ASGBvRAAicT40LxCiqwXUL9tnL+UFmpUftKF0hzH6vvgc4vC3ltKSyRrc1UfYJC2 vptXriZPthEjpAc6JBVxopBed5aTjr6v5uX76qKAuJZaVRA0qL0ClWTyoPlyC84s 8/t+Mje6ZZf6FBavlQQnPJf+okkSk7+gtFTDXML5nAJCX4gJS9oaMVFgjHVz7s3b K99sXRA8idf/5tfFx4sjCgbEYsLREQZYLP2XTXjIgbRS9qpKiaZ/pEoafYpPVYU9 +Ju0ZoJRGLvqmvXVdqbmD7/4BWvUBPojKdFGW6M2dm4/fWdFMl23X+e/faT8Hbt5 wbhnJ/vVQXhgOmMZ7wrI4i7m/VDjicNxuS0bOTBojb7Q/qa9x7IffINRAw9W9a84 BzKiwWSJ1ps0n281oASzxuXVYlGtQDQ1XNFJKJlwB7DRHtpULCCw0Fa86jHUSP1h w6Im1M3aIM9bSRn5xvEWIlVjNW9hxO48Jasono/AZhTEqHe3iaEInhK11Bkc/1dT t++UEDuDlRZAXIwcSMb6cjIFY2Xn/dJwtfRtqw7+nOwYVb7syQL9WkIO+/BIMzsV sZudRT9IeDbz4oy+1RWKf0uqTZKgVyz4QNmi0IcIlg2n0aYmsWKgEYFej4+/1ZHL wsgO8jZfQTd42smCEo4O0n19KbdpcL9lpGasBxGUQ/6eXCXcTZw= =IM8D -----END PGP SIGNATURE-----
--- End Message ---
