Bug 839707

Summary: xwd driver
Product: [Fedora] Fedora EPEL Reporter: resler <resler>
Component: nclAssignee: Orion Poplawski <orion>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: el6CC: orion
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-05 06:40:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch for xwd.c
none
Patch ready for applying
none
Example cgm file
none
xwd image made by original ctrans
none
xwd image made by patched ctrans none

Description resler 2012-07-12 15:28:10 UTC
Created attachment 597832 [details]
Patch for xwd.c

Description of problem:
ctrans program don't work correctly for xwd raster driver in x86_64 environment. The problem causes struct XColor which has platform dependent length. The problem and its solution is described in:
http://www.ncarg.ucar.edu/ncarg-talk/2006/0000.html

Version-Release number of selected component (if applicable):
ncl 5.2.1-6, x86_64

How reproducible:
Use ctran with xwd raster driver.

Steps to Reproduce:
1. Create xwd file from cgm file:
ctrans -d xwd -res 640x480 xxx.cgm > xxx.xwd
2. Explore resulting raster image:
xwud -in ./xxx.xwd
  
Actual results:
The xwd image is broken.

Expected results:


Additional info:
I append a simple patch for ncarview/src/lib/libncarg_ras/xwd.c which solves the problem and which could be easily added to src.rpm.

Comment 1 Orion Poplawski 2012-07-12 16:12:56 UTC
Thanks, but please attach a diff made with "diff -u" so it can be applied with patch.

Comment 2 resler 2012-07-12 16:53:27 UTC
Created attachment 597852 [details]
Patch ready for applying

The correct patch file appended. Sorry for my mistake.

Comment 3 Orion Poplawski 2012-07-12 22:10:58 UTC
No worries, thanks a lot for the patch.  It appears that this may not be fixed upstream in ncl 6.1.0-beta even which seems suprising.  Could you attach a test cgm image as well?

Comment 4 resler 2012-07-13 07:27:36 UTC
Created attachment 597991 [details]
Example cgm file

Comment 5 resler 2012-07-13 07:31:46 UTC
Created attachment 597992 [details]
xwd image made by original ctrans

Comment 6 resler 2012-07-13 07:32:25 UTC
Created attachment 597993 [details]
xwd image made by patched ctrans

Comment 7 resler 2012-07-13 07:41:18 UTC
You are right. The problem has not been corrected for long time upstream. This causes all binary distributions are not useful if you work in x86_64 environment and you need xwd driver. NCAR prefers ps driver over xwd but ps driver has still some quirks and xwd driver seems to be more straightforward for many applications.

Comment 8 Fedora Update System 2012-07-13 21:28:14 UTC
ncl-6.0.0-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/ncl-6.0.0-2.el6

Comment 9 Fedora Update System 2012-07-14 18:32:40 UTC
Package ncl-6.0.0-2.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing ncl-6.0.0-2.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-6393/ncl-6.0.0-2.el6
then log in and leave karma (feedback).

Comment 10 resler 2012-07-16 07:43:30 UTC
I confirm that ctrans from testing package works properly with xwd driver.

Comment 11 Fedora Update System 2012-07-19 22:35:02 UTC
Package ncl-6.0.0-3.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing ncl-6.0.0-3.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-6393/ncl-6.0.0-3.el6
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2012-08-05 06:40:32 UTC
ncl-6.0.0-3.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.