Article View: bionet.software.acedb
Article #142Re: Off-by-one in $obj->asGif after upgrading to ACEDB_4.9s
From: Morten Hulden
Date: Tue, 08 Jul 2003 08:01
Date: Tue, 08 Jul 2003 08:01
50 lines
2866 bytes
2866 bytes
Update: In 4_9s, if connected over sgifaceserver, a command that outputs a gif image to standard output: > gif map mymap;gifdump - will include the trailing NULL (from the C-string?) after the first line: // 11052 bytes ^@GIF89a.... Only sgifaceserver will do this. The giface client will not include trailing NULLs if printing to standard output. AcePerl's obj->asGif method will fail producing a valid gif-file from this output, as it will not split away the NULL byte in front of GIF89a. Following change in Ace::Object.pm will fix it. It's not the correct fix (which should be made in AceDB source, not in AcePerl), however, just a workaround. Object.pm line 1764, Aceperl 1.86: - return unless ($bytes, $trim) = $data=~m!^// (\d+) bytes\n(.+)!sm; + return unless ($bytes, $trim) = $data=~m!^// (\d+) bytes\n\x0?(.+)!sm; But I'm still interested to know if others have seen this problem, or if I just screwed something up. I have it on two diffent machines though.. MHu On Mon, 7 Jul 2003, Morten Hulden wrote: > > After upgrading to ACEDB_4.9s, sgifserver seems to provide gif-images > where the first byte is NULL and the last byte is dropped. > > AcePerl now outputs faulty gifs with the obj->asGif method (Object.pm). As > AcePerl has not changed, and giface client produces good gifs I assume > something changed in sgifserver. Anyone else seen this? > > I also tested 4.9u with same results. > Compiled with gcc 3.2.2 on Linux RH9, -O2/-03 optimation. > > MHu >
Technical Details
Message-ID:
<Pine.LNX.4.44.0307080053020.29134-100000@untamo.ngb.se>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!hgmp.mrc.ac.uk!net.bio.netShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f6d40,196502b48d6a5094 X-Google-Attributes: gidf6d40,public X-Google-ArrivalTime: 2003-07-08 01:01:33 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!hgmp.mrc.ac.uk!net.bio.net From: Morten Hulden <morten@ngb.se> Newsgroups: bionet.software.acedb Subject: Re: Off-by-one in $obj->asGif after upgrading to ACEDB_4.9s Date: 8 Jul 2003 09:01:31 +0100 Organization: BIOSCI/MRC Human Genome Mapping Project Resource Centre Lines: 52 Sender: mod-ace@hgmp.mrc.ac.uk Approved: BIOSCI Approval Key <biosci-approval-key@net.bio.net> Message-ID: <Pine.LNX.4.44.0307080053020.29134-100000@untamo.ngb.se> NNTP-Posting-Host: mercury.hgmp.mrc.ac.uk Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: niobium.hgmp.mrc.ac.uk 1057651291 12623 193.62.192.80 (8 Jul 2003 08:01:31 GMT) X-Complaints-To: news@net.bio.net NNTP-Posting-Date: Tue, 8 Jul 2003 08:01:31 +0000 (UTC) X-Original-To: bionet-software-acedb@net.bio.net X-Auth: PGPMoose V1.1 PGP bionet.software.acedb iQCVAwUAPwp6WqCIqsWvyF5FAQFosgQAgIywS06+iWUTwdjhV52Ivojn6oswYtPu JuyWOwKh1SFGJXLyT6zQTnllQ1dS0oFSoBCuhRrG8zsVP8qJVyf6IvU+swKF10dX zVjUlOa3LPAgdzauoCEaVSesV9EzMVpBdPlfy8UoYNQHjY4E3U/m9LcCiJNwkN4B ysfH5nGsGvQ= =J4h8