I’ve got a customer who is having garbled image data when running the app on his mac. Same app, same data on other macs doesn’t show corrupt image data. I’m pretty sure this is a “known issue” but I’m having trouble finding the threads here in the forum where it was discussed. My memory is that this seems to be a hardware/driver issue and only shows up on certain combinations of macs + graphic cards?
The app in question is a 32 bit Cocoa app built with Xojo 2014 R2.1.
We see the bug on an iMac (27 inch late 2012) with NVIDIA GeForce GTX 660M 512MB running 10.11.4.
We don’t see the bug on a variety of other Macs running 10.11.4
Does anyone know what I’m talking about?
apple a a return program for the video cards problems like this on these imacs
you must go to an apple service center to have them tested
the exchange of the graphic card is free of charge. (if the imac belongs to the program)
it’s not a public program but the apple repair centers are aware of this.
I’m not sure if this is the same thing? It’s not garbled video in general, it’s a very specific issue with corrupted image data. As far as I can tell, it happens either when loading an image into a Xojo app and/or saving it out as PNG. Other image and picture operations seem OK.
haswell chipset issue?, although I thought that was a windows problem…
Thanks for all the feedback. The Haswell chipset one sounds similar to what I remember, except I thought it was an OS X only bug, not involving windows.
In any case, the user deleted my app’s cache files and now it’s working, so perhaps there was some other issue.
Is your application Sandboxed? If so, this could be a Sandbox issue, especially with later Apple OSes. According to my research, Apple have moved CoreGraphics over to Lazy loading. You can tell the OS to load an image, it returns an image object (very very quickly I might add), but it doesn’t load the data until that image is either processed or drawn (just like Core Image). For most situations this works fine, but is incompatible with Security-Scoped Bodgemarks.
With Security-Scoped Bodgemarks, your application only has access to that file when you request it. However with Lazy Loading, the data isn’t always loaded when your application has access, which results in corrupted images or blank images. If you leave access open, the system closes it and this leads to container corruption.
If you are using SSBs, I would advise immediately drawing the image to another image before you release access. Then use that copy instead of the original. Alternatively if you use declares and CGImageSource, you can specify that you want the image cached, which then seems to help.
Sam, thanks that’s interesting and helpful (and scary!) but no, this is just a plain vanilla 32 bit Cocoa app.
It was very frustrating to figure out. Thankfully, there are a bunch of workaround using SSBs.