1

Recently—I'm not sure exactly when—iPhoto 9.5.1 started behaving very strangely on my Mac. Browsing through events, albums and photos seems to work fine. However, when I click on the Edit icon to manipulate a photo, I either see a completely black working area or what appears to be corrupt image data.

Interestingly, I can actually edit the photo, even though I can't see what I'm doing. For example, if I rotate the photo and then back out to the event view, the thumbnail shows up rotated. Also, this appears to only affect images of certain sizes: if I start with a very small photo (e.g., 600x600 pixels), editing works fine.

Here's an example of what it looks like:

screen shot

I've tried a variety of suggestions I've found online (particularly in Apple's support forums), including:

  • Repairing the iPhoto library.
  • Rebuilding the iPhoto library.
  • Removing the iPhoto preferences files.
  • Removing the iPhoto cache files from /Users/user/Library/Containers/com.apple.iPhoto/Data/Library/Caches.
  • Creating an entirely new test library.
  • Rebooting my Mac.
  • Deleting iPhoto and reinstalling via the app store.

Unfortunately, none of these approaches fixed the problem.

Interestingly, other users on my Mac can use iPhoto without problems. In fact, if I log in as a different user and load up the exact same test library I created as described above, it works fine.

With that in mind, it appears that there's something going on with my account configuration that is causing this problem, rather than an issue with the library itself, but I'm at a loss to explain what it is.

Update

I'm still having this issue, but I tried running iPhoto from the command line and noticed that this message is logged every time the app tries to display a photo in editing mode:

clBuildProgram() failed (-11) for kernel _CIClampToAlpha.

This message doesn't appear when I run iPhoto as a different user, even using the same library, so it seems to be related to the problem I'm having, but I'm still unsure as to just how they're tied together.

Update #2

Based on some additional reading, I tried running iPhoto like this:

CL_LOG_ERRORS=stdout /Applications/iPhoto.app/Contents/MacOS/iPhoto

This generated some additional log output when I tried to edit a photo:

[CL_DEVICE_NOT_AVAILABLE] : OpenCL Error : Error: build program driver returned (-2)
Break on OpenCLErrorBreak to debug.

OpenCL Warning : clBuildProgram failed: could not build program for 0xffffffff (Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz) (err:-2)
Break on OpenCLWarningBreak to debug.
[CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log:
fatal error: cannot open file '/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h': Too many open files in system

This seemed interesting, particularly because this error doesn't appear when I (successfully) run iPhoto as a different user. However, the number of open files "in the system" isn't appreciably different in these cases, particularly since I'm using fast user switching to switch between users, so nothing much is changing between invocations. Here are the number of open files in iPhoto and system-wide on my account:

<shadow>:~ $ lsof -p 11989 | wc -l   # open files in the iPhoto process on my account
221
<shadow>:~ $ sudo lsof | wc -l       # open files, system-wide while iPhoto is open
12245

And here are the number of open files in iPhoto and system-wide while another user is running iPhoto:

<shadow>:~ $ lsof -p 12163 | wc -l   # open files in the iPhoto process in another account
226
<shadow>:~ $ sudo lsof | wc -l       # open files, system-wide while iPhoto is open
12466

As you can see, the number of open files isn't significantly different when iPhoto is run as a different user, so again, something peculiar seems to be up with my account. I remain at a loss as to what that could be, however.

Note that I've tried increasing the system-wide limit on the number of open files as follows:

<shadow>:~ $ sudo sysctl -w kern.maxfiles=20480
kern.maxfiles: 12288 -> 20480

Unfortunately, this had no effect.

  • Remove the complete iPhoto (first check if there's and update available) and install it again via the AppStore to check if this solves your issue. – Rob Mar 24 '14 at 7:09
  • Thanks for the suggestion. I forgot to mention that I tried that, as well. :-( – Jim Wong Mar 24 '14 at 7:23
  • Alright, it was not in the list. Did you find this already? discussions.apple.com/thread/4954972 If so, please add information which you've found already. – Rob Mar 24 '14 at 7:24
  • Yeah, I found the discussions on Apple's site. Two users (Old Toad and TD) have suggested rebuilding the database in response to questions there over the last few years, but their suggestions didn't work for me. I didn't try the third-party database tool because I found that a database that fails on my account works on other accounts on the machine (after updating permissions), so the problem doesn't seem to lie with the database itself. – Jim Wong Mar 24 '14 at 7:26
  • I just double-checked by loading the same library from the screen shot above in a different account: editing the same photo worked correctly, without a black screen or the garbage in the screen shot. – Jim Wong Mar 24 '14 at 7:34

You must log in to answer this question.

Browse other questions tagged .