Bug 687695 - Overprint text missing in 1 bit CMYK device
Summary: Overprint text missing in 1 bit CMYK device
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Other Driver (show other bugs)
Version: master
Hardware: All All
: P2 normal
Assignee: Shailesh Mistry
URL:
Keywords: bountiable
Depends on:
Blocks:
 
Reported: 2004-09-22 21:40 UTC by Dan Coby
Modified: 2011-10-05 07:20 UTC (History)
5 users (show)

See Also:
Customer:
Word Size: ---


Attachments
Patch for bug (906 bytes, patch)
2011-04-20 20:03 UTC, Shailesh Mistry
Details | Diff
Defensive patch (545 bytes, patch)
2011-04-20 20:05 UTC, Shailesh Mistry
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Coby 2004-09-22 21:40:11 UTC
Overprinted text in the regerssion test file 1_2001.pdf is being imaged as 
white instead of black on the display device when in the 1 bit CMYK mode. 
(DisplayFormat=16#20108

cmd line:

gs -dDisplayFormat=16#20108 ../comparefiles/1_2001.pdf
Comment 1 Masaki Ushizaka 2009-08-05 02:19:08 UTC
Tried with r9932.  I don't know the original reporters environment, but using Windows XP SP3 + VS2008 
Express SP1,  I think I could reproduce it.  Using following command, the text is printed white or not 
printed (I'm not sure).

C>bin\gswin32c -dDisplayFormat=16#20108 1_2001.pdf


I also tried r9932 on Mac OS X 10.5.7 with Xcode 3.1.2.  Using x11cmyk device, it crashed.  (This may 
be a separate problem.)

cloud9-wl:gs mushizak$ gdb debugobj/gs
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries .............. done

(gdb) run -sDEVICE=x11cmyk 1_2001.pdf
Starting program: /Users/mushizak/develop/artifex/ghostpdl/gs/debugobj/gs -sDEVICE=x11cmyk 
1_2001.pdf
Reading symbols for shared libraries +++++++++++++......... done
Reading symbols for shared libraries . done
GPL Ghostscript SVN PRE-RELEASE 8.71 (2009-08-01)
Copyright (C) 2009 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x00208229 in x_wrap_get_bits (dev=0x1813e34, y=230, str=0x152a880 "", actual_data=0x0) at 
gdevxalt.c:341
341	    *actual_data = str;
(gdb) backtrace
#0  0x00208229 in x_wrap_get_bits (dev=0x1813e34, y=230, str=0x152a880 "", actual_data=0x0) at 
gdevxalt.c:341
#1  0x0049c7e5 in gx_default_get_bits_rectangle (dev=0x1813e34, prect=0xbfffd134, 
params=0xbfffd144, unread=0x0) at gdevdgbr.c:668
#2  0x0040bdce in gx_overprint_sep_fill_rectangle_1 (tdev=0x1813e34, retain_mask=14, x=55, 
y=231, w=5, h=0, color=1, mem=0x1808a34) at gxoprect.c:500
#3  0x0040afe5 in overprint_sep_fill_rectangle (dev=0x180a834, x=55, y=230, width=5, height=1, 
color=1) at gsovrc.c:940
#4  0x00451b00 in gx_dc_pure_fill_rectangle (pdevc=0xbfffd3d4, x=55, y=230, w=5, h=1, 
dev=0x180a834, lop=240, source=0x0) at gxdcolor.c:414
#5  0x004522dd in gx_dc_default_fill_masked (pdevc=0xbfffd3d4, data=0x2ae9064 "\a?", data_x=0, 
raster=4, id=0, x=50, y=230, w=11, h=9, dev=0x180a834, lop=240, invert=0) at gxdcolor.c:673
#6  0x0048e781 in gx_default_copy_mono (dev=0x180a834, data=0x2ae9064 "\a?", dx=0, raster=4, 
id=0, x=50, y=230, w=11, h=9, zero=18446744073709551615, one=1) at gdevdbit.c:78
#7  0x00439cb5 in gx_image_cached_char (penum=0x2ae6abc, cc=0x2ae9018) at gxccache.c:409
#8  0x0043f256 in show_update (penum=0x2ae6abc) at gxchar.c:856
#9  0x0043ef0d in continue_show_update (penum=0x2ae6abc) at gxchar.c:767
#10 0x0043eefa in gx_show_text_process (pte=0x2ae6abc) at gxchar.c:756
#11 0x00435596 in gs_text_process (pte=0x2ae6abc) at gstext.c:545
#12 0x000e4b93 in op_show_continue (i_ctx_p=0x1346184) at zchar.c:527
#13 0x000b1ae6 in call_operator (op_proc=0xe4b51 <op_show_continue>, i_ctx_p=0x1346184) at 
interp.c:111
#14 0x000b42ca in interp (pi_ctx_p=0x1401bec, pref=0xbfffecc4, perror_object=0xbfffee80) at 
interp.c:1162
#15 0x000b21ce in gs_call_interp (pi_ctx_p=0x1401bec, pref=0xbfffedc8, user_errors=1, 
pexit_code=0xbfffee88, perror_object=0xbfffee80) at interp.c:496
#16 0x000b202b in gs_interpret (pi_ctx_p=0x1401bec, pref=0xbfffedc8, user_errors=1, 
pexit_code=0xbfffee88, perror_object=0xbfffee80) at interp.c:454
#17 0x000a5b1f in gs_main_interpret (minst=0x1401b98, pref=0xbfffedc8, user_errors=1, 
pexit_code=0xbfffee88, perror_object=0xbfffee80) at imain.c:214
#18 0x000a6673 in gs_main_run_string_end (minst=0x1401b98, user_errors=1, 
pexit_code=0xbfffee88, perror_object=0xbfffee80) at imain.c:526
#19 0x000a653b in gs_main_run_string_with_length (minst=0x1401b98, str=0x1407f58 
"<315f323030312e706466>.runfile", length=30, user_errors=1, pexit_code=0xbfffee88, 
perror_object=0xbfffee80) at imain.c:484
#20 0x000a64a3 in gs_main_run_string (minst=0x1401b98, str=0x1407f58 
"<315f323030312e706466>.runfile", user_errors=1, pexit_code=0xbfffee88, 
perror_object=0xbfffee80) at imain.c:466
#21 0x000a9560 in run_string (minst=0x1401b98, str=0x1407f58 
"<315f323030312e706466>.runfile", options=3) at imainarg.c:798
#22 0x000a9510 in runarg (minst=0x1401b98, pre=0x4b9e68 "", arg=0x1402538 "1_2001.pdf", 
post=0x4be475 ".runfile", options=3) at imainarg.c:788
#23 0x000a91f3 in argproc (minst=0x1401b98, arg=0xbffff9d5 "1_2001.pdf") at imainarg.c:723
#24 0x000a7996 in gs_main_init_with_args (minst=0x1401b98, argc=3, argv=0xbffff8e4) at 
imainarg.c:207
#25 0x000023e1 in main (argc=3, argv=0xbffff8e4) at gs.c:77
(gdb) quit
The program is running.  Exit anyway? (y or n) y
cloud9-wl:gs mushizak$ 
Comment 2 Ralph Giles 2009-10-06 08:30:22 UTC
Passing to Michael, who's more responsible for overprint. However, this bug is
bountiable and we don't expect to get to it soon.
Comment 3 Shailesh Mistry 2011-04-20 20:03:09 UTC
Created attachment 7463 [details]
Patch for bug

This patch solves the segmentation fault in the x11cmyk device and also solves the missing overprint problem.
Comment 4 Shailesh Mistry 2011-04-20 20:05:47 UTC
Created attachment 7464 [details]
Defensive patch

This is a defensive patch for the wts device which might show the same problem as the original overprint bug in x11cmyk.
Comment 5 Shailesh Mistry 2011-07-11 20:07:45 UTC
Bug still reproducible in Ghostscript 9.03
Comment 6 Henry Stiles 2011-07-26 01:45:11 UTC
Sorry marked the wrong bug fixed.
Comment 7 Shailesh Mistry 2011-07-26 21:03:44 UTC
Please note that part of the first patch is now invalid due to the code update in Bug 692360
Comment 8 Michael Vrhel 2011-08-19 06:13:18 UTC
Fixed http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=c7404eceab4d308c67130f43e9a4d4c0b58cd73c

Using the patch for gdevdgbr.c from Shailesh.
Comment 9 Michael Vrhel 2011-08-23 17:09:16 UTC
Patch turns out to have broken all the tiff devices.
Comment 10 Michael Vrhel 2011-08-23 17:39:48 UTC
After the patch was committed it was discovered that the patch broke all the tiff devices.  Since a bounty was likely already paid on this, pushing this back to the patch author.
Comment 11 Michael Vrhel 2011-10-05 07:20:50 UTC
Resolved with recent fixes to overprinting.