Summary: | -sDefaultGrayProfile causes SEGV with tiff32nc device | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Ken Sharp <ken.sharp> |
Component: | Color | Assignee: | Alex Cherepanov <alex> |
Status: | NOTIFIED FIXED | ||
Severity: | major | CC: | michael.vrhel |
Priority: | P1 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | Windows Vista | ||
Customer: | 850 | Word Size: | --- |
Description
Ken Sharp
2011-06-16 15:36:30 UTC
Upping to P1 for seg fault and customer problem. OK. I see the issue. In the interpreter we are doing a series of getdeviceparameters before procs.get_profile is set. During times like that we do not set up the device profile since we are not ready yet. See gx_default_get_params line 130 At some point the interpreter does a setdevice which ends up setting the procedure procs.get_profile. At this point, we should do a getdeviceparameters so that we can get a profile set up. But instead we do a fillpage. Now it turns out that if we have not set -sDefaultGrayProfile the colorspace is still at this time DeviceGray and we use the DeviceGray colorspace procs for mapping the color. If we have set -sDefaultGrayProfile then the color space is ICC and we use the ICC colorspace procs for mapping the fillpage color. Problem is we have not set the device profile yet. The proper fix for this is to make sure that we do another getdeviceparameters after the setdevice occurs. This will ensure that the device profile is set and in place. Punting off to Alex since this is done in the interpreter. Fixed with http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=f4e1d4b280f6e6ff73d630e2b103a1a6b50c03d9 This amounted to moving the initialization of the icc manager and the device profile earlier in the whole start up process. |