Click for iPod Batteries and Accessories!
Keep this site growing - Please visit my Sponsors
The Source for Mac Performance News and Reviews
Don't forget to check out all the other site features!Photoshop 5.5/Altivec Bug - Just a Compiler/Software Issue?
Published: 10/20/99 (Updated: 10/22/99 PM)Introduction:
Note:Officially this is a confirmed software bug. Here's info from Chris Cox (Adobe programmer) on the cause:
" You know, it would help a LOT if customers reported problems to the company repsonsible instead of publicly complaining and whining. That makes it much easier for the company to find and fix the bugs, instead of just hearing third hand about problems without enough details to do anything about them.It would also help if people would take the time to check the company's web site for information about their problem -- they might find that it's already a known and acknowledged problem, sometimes there's even a work around or fix already available.
That being said, the distort plug-in bug is a bug in our AltiVec code. I've already found the bad math, and already fixed it. But I'm waiting for compiler updates/fixes before I release a bug fix release (and even when I have said compiler in hand, we have to do QA testing on the plug-in before releasing it).
Clock speed doesn't affect it, file type doesn't affect it, and it has nothing to do with the chip errata -- just memory alignment on 3 channel (RGB and Lab) images and a math mistake made about 4 months ago.
"
ChrisSee my 10/22/99 front page news for my reply to this and also one reader's comments below that a bug this easy to find should have been noted in initial testing.
[Original coverage of the bug reports (varying reports from G4/400 owners) follows. Latest user feedback is in the updates section:]In yesterday's news (Oct 19, 1999) a reader reported unwanted color bars in Photoshop 5.5 filter operations when run on a G4/450 system with the Altivec extensions active that did not occur when the Altivec extensions were disabled. I verified the same errors happened here on my G4/450. One reader also noted that german magazine MacWelt also reported the bug. The image below shows a sample of the problem:
![]()
See below for more samplesShortly after the posting several Yikes (G4/400) owners reported the bug was not present on their systems at 400MHz, but did appear when they overclocked the CPU to 450MHz. [Update - at least one Yikes owner has reversed his original comments.] Later many other Yikes G4/400 owners reported they did see the bug, even at the rated 400MHz speed. Although originally seen in JPEG files, later feedback indicates it was also present with TIFF and other file formats as well.
Software Bug or G4 Errata to Blame? Since several Yikes 400MHz G4 owners did not see the bug (based on feedback yesterday), yet 450MHz G4 owners consistently did (100%), my first concern was that this error is related to the current G4 CPU errata, since it seemed to be affected by CPU speed (100% of non-overclocked 450's affected, less than 100% of 400MHz owners reported it). [Thankfully, as more Yikes G4/400 retests are done, it seems to affect all CPU speeds.] Motorola acknowledged that 500MHz G4s were not being shipped due to problems with corruption at higher speeds -see this Macweek article). In that article Motorola is quoted as saying the current chip errata can result in corruption in the processor's data cache. Their recommended workaround was to enable the "GlobalWaitR" register in the processor which has a performance penalty. If this is indeed a chip errata related bug, the fix may also result in lower performance, but that remains to be seen.
If this was an G4/Altivec bug, why doesn't the DVD software player show the same problems? (Assuming the software player uses Altivec extensions - it may not since the iMac DV uses the same player and has only a G3 CPU.) [Update: An insider replied that the player does not use Altivec extensions.]
If this were just a software bug, logic would state that it would be repeatable at any CPU speed, not just at the higher speeds. If 100% of G4/400 owners reported the bug, then I'd feel more confident it was software related only. [Update: As more G4/400 owner comments pour in - literally all of them report the bug - good news in a way.] If it was errata related, then the higher speeds would tend to make the problem more prevalent (which owner feedback seems to indicate is true). Unless the G4/400 owners that reported they did not see the problem missed something (although the bug is easily seen/reproduced), it seems that CPU speed does make the problem more likely to show itself (so far 100% at 450MHz). However since some say not all images are affected (see some of the latest updated comments below) - perhaps this explains why some G4/400 owners don't report seeing the problem. Recent feedback from one user said that filter operations on complete images (not just a selection) don't show the bug but I've not had time to test this personally. The inconsistencies of reports like this make it more likely some owners may have the problem and just have not seen it in their initial checks.
Adobe Comments: Here's a comment from a reader that says an Adobe programmer says it is a bug in the Altivec core and will be fixed:
" If you go to the User-to-User support forums on Adobe's page, there is a thread entitled "AltivecCore Bug in 5.5 and g4-400".The third post, by Chris Cox, an Adobe programmer "responsible for the hardware support code and optimizations," reads:
"Yes, this is a known bug with AltiVecCore. I'm still waiting for a compiler bug fix before releasing the fixed plug-in.
Applying the filters to the entire image shouldn't cause a problem - but applying the distort filters to a selection will usually cause the lines.
Chris
"
PS. JPEG has nothing to do with it
--Todd Sternisha "Possible Solutions: Regardless of the reason (software bug or CPU errata), Adobe will surely fix this in software but if it is CPU errata related the fix may result in lower performance. Issues like these are why I reminded readers of the history of 'revison 1' systems (beige g3, imac, B&W G3, PB G3) - early buyers run on the bleeding edge and often have to endure some bugs that are fixed later. That's the price we pay for being early adopters. I had originally ordered a G4/500 just to ensure I got the latest stepping as I had noted G4 errata issues possibly being responsible for lower performance in my First Look at the XLR8 G4/400 Upgrade back in August. After the order was cancelled however and prices increased I jumped on a 450 system to be able to cover it for this site. I still think it's a great system however and don't regret the purchase for a minute.
A reader suggested if this was errata related, raising the CPU core voltage or increasing cooling might help. However modifying the CPU voltage is not an option for most owners, and the huge heatsink on the G4 systems seems to never get even slightly warm to the touch in my experience. (There have been two articles on G3 CPU voltage boosting published here in the past, see my CPU Cards page for links.) Note that according to the original Motorola G4 CPU specs, the higher speed G4s ran at a higher core voltage, indicating as one reader commented, yield issues with the G4 CPU (boosting voltage is an old overclocking trick to aid in running CPUs at faster speeds).
G4 Steppings: The G4/400 CPU supplied in the XLR8 upgrade was an early 2.2 stepping (revision), and as of August I had heard there were 2.6 and 2.7 steppings in use, with 2.8 being the 500MHz that was to fix all existing errata. Now it appears the 2.8 stepping may not show up in retail systems until early next year.
Feedback: I welcome other G4 owner reports on Photoshop and other Altivec aware software. Please include your system (Yikes/PCI or AGP Model), CPU speed and OS/Software versions. I especially urge Yikes G4/400 owners that originally reported not seeing the problem retest again to verify their system is immune.
Regardless of reason, I'm sure this will be addressed in software, but the question is if it will cost performance and if other Altivec applications will show similar errors. I'll keep you posted as I have several readers that are investigating this issue further (more tests in Altivec apps) and have reported it to Motorola. This page will be updated as more information is received and/or software is updated.
Latest Owner Feedback on the Bug:
(10/22/99) More info on independent reader tests and clock speeds:
" [Steve replies to my question: 'is the problem less noticeable or repeatable at 400mhz vs 450? (it seems to be from some reports)?'Mike,
Yes, but to be fair, I haven't completed an exhaustive and systematic evaluation of Photoshop at both speeds (my boss insists that I spend most of my day at work...go figure). I did notice, however, that the 450 MHz speed made my G4 more susceptible to the bug. As I mentioned before, certain color images seem to trigger the problem more than others (a strange thing, if you ask me).My background tells me the bug occurs when a specific series of AltiVec instructions is executed repeatedly using a certain pattern of data. Note the repeating nature of the image disruption (green line, red line, no line, repeat). Apparently, increasing clock speed somehow makes the problem worse.
In any case, new bug-aware compilers could recompile AltiVec code to avoid the triggering instruction sequence, which may or may not degrade AltiVec performance. (Interestingly, in my tests the time required to perform the Photoshop distortion filters was essentially the same regardless of whether the AltiVec Plug-active or not...was the Plug-in even working properly at all , I wonder?). Once bug-avoiding compilers are widely available and in use, the AltiVec bug should disappear from any newly written code. Of course, any existing AltiVec software (what little there is) will have to be patched.
[If it was errata related-Mike] When future chip revisions are available, the problem will be fixed permanently.
[emphasis mine-Mike]
Here's the $64,000 question: How did Apple/Motorola/Adobe all fail to discover this problem early on? It is *so* easy to stumble upon, they all should have found it months before the G4 shipped. Considering the prominence of Photoshop and its importance to the Mac's success (remember Steve Job's quote about the G4 being designed as the "ultimate Photoshop machine?"), you would think they would have gone over that program with a fine tooth comb. I stumbled across the Photoshop in my first hour using the program on the G4. Seems like quality control was lacking, to say the least.
Steve "
G4TimeDemo Tests: As I promised earlier, to see if any other Altivec optimized graphics software would show any bugs on my G4/450 system I ran a G4 optimized G4TimeDemo app. (see http://www.altorsys.com/) set to the maximum quality. I saw no defects in the image and pretty amazing speeds - up to 61 fps with a PCI Rage128 Orion card. The mirrored balls in the demo and sky/landscape showed no trace of any lines or discoloration that I could tell (thousands color mode). Once I saw what appeared to be a clipping issue (blob shown halfway in and out of a fence) but that's not uncommon for many 3D games I've seen. This makes me feel a lot better.
"Mike,
I read your reader's submission about finding the AltiVec Photoshop 5.5 bug in his G4/400 folks when applying filters to only a portion of an image. Honestly, I can't remember ever applying the filters to just selections of images when my G4 ran at 400 MHz. I know the problem DOESN'T show up when working with whole images at 400 MHz, yet it ALWAYS shows up in whole images when running at 450 MHz. This would indicate (at least to me) that there is some kind of speed sensitive error in the G4.
This afternoon I will test whether the bug shows itself on selections of images when my G4 is running at 400 MHz. Expect an update (with additional images) this evening. Thanks for your diligent efforts. Steve"
Another Yikes G4/400 owner retests and discovers the bug:
"The problem has been reproduced here on a G4/400 Yikes!, but only when the JPEG is RGB, not CMYK. Of course this sucks because who has any use for a CMYK JPEG. I guess at least there isn't much use for running filters on JPEGs anyway.
Regards,
Andrew Crow"
Andy Watters, who originally reported he did not see the bug at 400MHz but did at 450MHz in his Yikes now says he can produce it at 400MHz as well:
"Mike, I found just now that if I select only part of an image and apply the twirl filter, the banding *does* show up. Sorry for the misunderstanding! This is most unfortunate... but that should mean that it's a software bug, because without AltiVecCore, there are no problems at all.
- Andrew Watters "Now if the other Yikes G4/400 owners that reported they did not see the problem could verify this again I'd appreciate it. If all G4 systems are affected, then it may just be a software bug as noted by Adobe.
"i just finished some testing in photoshop 5.5 on my G4/450 AGP. i ran it through all of the filters in the distort menu. first i ran the filter through the filter menu and choosing it from the distort submenu. then hit command-z and command-f. note that this made a difference in the severity of it (normally they ran through the image in 3 columns, but when using command-f on certain filters only the far right column was present. very strange.). after that i hit command-z again, hit command-a to select the entire image and reran the filters using both methods. having the image selected did not alter my results.
filter/ bug present
diffuse glow - no
displace - yes
glass - no
pinch - yes, less when rechoosing via command-f
polar coordinates - yes, same as pinch
ripple - yes, same as pinch
shear - yes
sphereize - yes, same as pinch
twist - yes, same as pinch
wave - only on right side
zig zag - yes, same as pinch
-adam "
More comments that all G4/400's are affected (good news really)
"Hi Mike
I tested this PS 5.5 with AltiVec core plugin bug on 8 other G4/400 Macs (Yikes/PCI Graphics) we purchased and they all exhibit the same problem. They are not overclocked, don't even know how to. I double checked that the G4 ROM upgrade has nothing to do with it too.I'm the technical director at an authorized Adobe service provider so I gave them a call today to let them know we were having this problem. He suggested disabling the plugin if we would be using the Distort filters. Also that there should be an update on their website in the future to fix this problem.
I tried the undo - then use the "last filter" command in Photoshop as suggested on your site but the problem is still there. In my experience, when you re-do the filter, only half the image has the problem.
I tested to see if the bug manifests in a selection vs the whole image but it shows up either way.
will"
"I intend to run some detailed analyzes tonight using Photoshop 5.5 and the few other programs (mostly utilities) that I've managed to find which take advantage of the G4 AltiVec subprocessor. I'm hoping to find a pattern.Two strategies I intend to pursue are (1) to identify whether the problem occurs at speeds between 450 and 400, and (2) whether backside cache settings (speed, write-through vs write-back, etc.) have any influence on the problem.
Finally, here's one other interesting note: I scanned two color photos directly into Photoshop 5.5 at the same resolution and color depth, applied the same distortion filter to both images, and yet only one exhibited the green lines problem. Explain that...
I'll keep hunting this one down...
steve"
"Mike-
I can duplicate this bug too. It appears to be a Photoshop/Altivec plugin bug, because the corruption will go away if you undo and then use the "Last Filter" (cmd-F) command. The problem shows up in both TIFFs and JPEGs; it's unlikely that file format is an issue.
System configuration:
G4/400 (Yikes)
Photoshop 5.5 w/ approx. 350MB allocated to Photoshop, 832MB total Mac OS 9.0
The machine has an ATTO Ultra2 LVD card with a Quantum Atlas 10k 18GB drive as the scratch volume.
(Name withheld by request)"
"Mike,
Here are three images I played with in Photoshop 5.5. The first one (labeled G4bugpic.jpg) was distorted in Photoshop 5.5 with the AltiVec plug-in active. The second file (labeled G4_noAltiVec.jpg) was distorted with the plug-in disabled. You can see the result plainly. Backside cache settings have no effect. Neither do any third party extensions. The problem is not effected by file type or size, as far as I can tell. However, the problem does not affect B&W images.Now here's the strange part. The third picture (labeled unaffected_AltiVec.jpg) was acquired in the same way as the image used in pictures 1 and 2 (on a 32 bit UMAX scanner), but when I apply the same Photoshop distortion filter using the AltiVec plug-in to this image, the bug does not appear. I have no explanation for why this happens.
Twirl w/Altivec
Twirl w/o Altivec Unaffected Steve "
One report said that only selection areas were affected (not if you applied the filter to the entire image), but there have been conflicting reports on this.
"Mike,
After reading about this glitch on your site, I tested Ps5.5 on my 450 Sawtooth as well.
Not only do I get the same problem with JPG files using twist or spherize, but oddly, it doesnt seem to affect glass, ocean ripple or some of the other distort filters Does not seem to affect GIF, EPS, TIFF or PICT files.
But what's even more wierd, I get the same artifacts when applying the twist or spherize filters on PSD files - - but only intermittently!! Removing Altivec from the PS plugins folder seems to resolve the issue, but it makes me wonder why I bothered to upgrade to 5.5 now, not to mention causing me to wonder about purchasing the Sawtooth. I'll be reading with interest whatever you can discover about this. Thanks again for the valuable resource that is xlr8yourmac.
Pete McKeeman "Adobe will surely fix this with a software update.
"Mike-
I have a Yikes system which exhibits the same photoshop filter errors (red&green horizontal lines).
These errors only occur on the disort filters....but seem to occur on all of the distort subfilters i've checked so far. Im not sure why this subset of filters would be the only ones to exibit this problem. My coworker surmises that these particular filters may use many filters/algorithyms on top of one another resulting in a noticeable additive distortion (the error starts small and builds with each transform).
I myself dont seem to think this would be the case....i just feel there would be noticeable problems with other filters and i havent noticed any yet. It does everything fast and good, excluding the distort filters.
-Dave Brossa "
"I just overclocked my Yikes G4/400 to 450 and saw the bug you speak of...
HOWEVER, the bug only manifests itself when in RGB and LAB color modes, NOT when in CMYK, Grayscale, or Multichannel modes.This leads me to believe that it has less to do with chip errata (which would manifest itself in every mode, no?) and more to do with Photoshop itself. If this were an errata problem, you'd think it would be worse in CMYK mode (as this is a more memory and processor-intensive mode), yet here it doesn't happen at all!
I hope it's not a chip problem... I'm getting my G4/450 in two days!
If it is a chip problem, Apple may be staring at a major recall or class action lawsuit...
Sonny Shrivastava
Senior Designer
studioGRAFX "Again if it was purely a software bug, why would many Yikes G4/400MHz owners say the problem is not there until they overclock the CPU? Yet some G4/400 owners do report the problem, which may indicate there are different steppings in the supply chain or that some CPUs are marginally affected at 400MHz, or that it really is a software only bug.
"that's correct Mike, stock 400 Mhz speed. I have not altered anything. I installed the G4 ROM update yesterday and that's it. That's my computer at work. I just tried it on a G4/400 we have here at home and the same thing happens. They both have the new ROM but I don't know if that has anything to do with it.
will "
"Mike,
Your reader with the G4/400 PCI reported that the Photoshop bug did NOT appear on his G4 machine. This is the confirmation I feared. My G4/400 PCI never showed the Photoshop problem either...until I overclocked it to 450 MHz. Then the bug appeared.I'm not suggesting that the overclocking itself is responsible for problem - the machine runs fine otherwise, and the Photoshop problem disappears when I reduce the speed back to 400 MHZ. It seems that once the G4 chip hits 450 MHz, the Photoshop bug appears. Sounds like we have a chip errata associated with speed. It's definitely NOT a motherboard design problem, since it happens consistently on my 450 MHz PCI bus G4 and on other readers' 450 MHz AGP boards.
My guess is that the Velocity Engine is kicking out errors under certain conditions when speeds reach 450 MHz.
steve "
Original Posts from 10/19/99 News More on Photoshop 5.5/Altivec Bug: I've updated my earlier post on the Photoshop 5.5/Altivec bug with disturbing info from a Yikes G4/400 owner that states his system didn't have the problem until he overclocked it to 450MHz. So far the systems that have the problem (verified here) are 450MHz G4s. As I noted earlier - I had hoped this was not related to the G4 errata (which was the reason for delays in 500MHz G4s) but now I wonder. I cringe at the thought that the G4/450's CPU errata may be responsible for these image problems but let's wait until more is known about the issue before assuming the worst.Photoshop 5.5/Altivec Bug: A reader notes an odd problem with the Altivec G4 extensions enabled (see the update below for the latest feedback on the problem):
"Mike,
I've got a G4/450. I was wondering if you have Photoshop 5.5, and if so, whether you can confirm this glitch:With AltiVecCore enabled (either by having it or its alias placed in the Adobe Photoshop 5.5:Plug-Ins:Adobe Photoshop Only:Extensions folder), open any JPEG on your hard drive. Select an area and use one of the distortion filters (say, spherize or twirl).
I get distorted green bands overlaying the selected area, visible both in the preview window and in the actual image.
Disabling AltiVecCore eliminates the problem.
The problem does not seem to manifest itself on other types of graphics, even with the plug-in enabled.
I'd be interested to see if anyone else is having this problem. I don't believe this is a third party extension issue, as the same thing happens when booting off of the Power Mac G4 CD.
--Todd "I tested this here on my G4/450 with PS 5.5 and saw the problem with the 'twirl' filter (horizontal color bars in the image - see sample). I hope this is just a Photoshop bug (or video driver issue) and not due to G4 chip errata.
Update: Andy Watters reported his Yikes G4/400 system (not AGP) does not seem to have the problem. This seems to indicate it's a Sawtooth system releated issue (extensions/drivers/ROM/CPU chip speed related?) but I welcome other owner comments. This Yikes G4/400 owner's report is especially disturbing for us G4/450 owners:
Related Links:
- G4 Forums - discuss G4 system and upgrade topics in this message board.
- G3-ZONE - Tons of info on upgrades and tweaks to Beige and B&W G3s
- Other Articles and Site content.
= Back to the XLR8YOURMAC.COM = © Accelerate Your Mac , all rights reserverd.
Disclaimer: Users of this web site must read and are bound by the terms and conditions of use.