can't sync screen shots: error 22

Twice I've had screen shot pngs on my desktop fail to sync. My PHD won't sync until I remove them from the sync dir (~ in this case). Here's the error that I see in FileSyncAgent.log on the client:

[2008/05/08 10:30:37.117] EXCEPTION: EINVAL: Invalid argument
[2008/05/08 10:30:37.128] <ERROR> network: ADD "Desktop/Picture 1.png" {(Priority=1, EXECUTING)} (-[SStoreFileOperator_FS copyUsingFileDescriptorsFromObject:] (StoreFileOperator-FS.m:376): "'((fcopyfile(srcObj.readFD, self.writeFD, state, (((((1<<1) | (1<<0)) | (1<<2)) | (1<<3)) | ((1<<18) | (1<<19))))))' error 22")

Anyone seen this?

MBP, Mac OS X (10.5.2)

Posted on May 8, 2008 7:53 PM

Reply
2 replies

May 9, 2008 8:40 AM in response to jurvis

Tried taking another screen shot, this time using Grab. The tiff synced fine. It seems to be the pngs created when you use cmd shift4 to take a screenshot. No matter what it's named or where it is in my sync directory, all syncs fail until I rid the png from my syncdir. Here's the relevant portion from the verbose log.

1:: [50942] network: UPDATE VERSIONS "Desktop" {(Priority=1, BLOCKED)}
1:: [50942] network: ADD "Desktop/Date Sent.png" {(Priority=1, READY)}
1:: [50942] Items to copy: 1, bytes to copy: 154,937
0:: [50942] [2008/05/09 11:20:46.148] EXCEPTION: EINVAL: Invalid argument <-[SStoreFileOperator_FS copyUsingFileDescriptorsFromObject:] (StoreFileOperator-FS.m:376): "'((fcopyfile(srcObj.readFD, self.writeFD, state, (((((1<<1) | (1<<0)) | (1<<2)) | (1<<3)) | ((1<<18) | (1<<19))))))' error 22">
0:: [50942] [2008/05/09 11:20:46.148] USERINFO: {
0:: [50942] [2008/05/09 11:20:46.148] NSLocalizedDescription = "EINVAL: Invalid argument";
0:: [50942] [2008/05/09 11:20:46.148] }
0:: [50942] [2008/05/09 11:20:46.148] BACKTRACE: {
0:: [50942] [2008/05/09 11:20:46.148] ? | 0x986bc
0:: [50942] [2008/05/09 11:20:46.148] ? | 0x51613
0:: [50942] [2008/05/09 11:20:46.148] ? | 0x4a34e
0:: [50942] [2008/05/09 11:20:46.148] ? | 0x48eea
0:: [50942] [2008/05/09 11:20:46.148] ? | 0x48555
0:: [50942] [2008/05/09 11:20:46.148] ? | 0x482d5
0:: [50942] [2008/05/09 11:20:46.148] ? | 0x31b35
0:: [50942] [2008/05/09 11:20:46.148] ? | 0x3146c
0:: [50942] [2008/05/09 11:20:46.148] ? | 0x48271
0:: [50942] [2008/05/09 11:20:46.148] ? | 0x480dd
0:: [50942] [2008/05/09 11:20:46.148] ? | 0x15ae3
0:: [50942] [2008/05/09 11:20:46.148] ? | 0x902345ad
0:: [50942] [2008/05/09 11:20:46.148] ? | 0x90234154
0:: [50942] [2008/05/09 11:20:46.148] ? | 0x96514c55
0:: [50942] [2008/05/09 11:20:46.148] ? | 0x96514b12
0:: [50942] [2008/05/09 11:20:46.148] }
0:: [50942] [2008/05/09 11:20:46.161] <ERROR> network: ADD "Desktop/Date Sent.png" {(Priority=1, EXECUTING)} (-[SStoreFileOperator_FS copyUsingFileDescriptorsFromObject:] (StoreFileOperator-FS.m:376): "'((fcopyfile(srcObj.readFD, self.writeFD, state, (((((1<<1) | (1<<0)) | (1<<2)) | (1<<3)) | ((1<<18) | (1<<19))))))' error 22")
1:: [50942] CANCEL: JOB: network: UPDATE VERSIONS "Desktop" {(Priority=1, CANCELLED)}
1:: [50942] CANCEL: JOB: network: UPDATE VERSIONS "" {(Priority=1, CANCELLED)}
1:: [50942] CANCEL: JOB: network: ADD "Desktop/Date Sent.png" {(Priority=1, CANCELLED)}

May 9, 2008 3:32 PM in response to jurvis

Made a small breakthrough here. Noticed that png files made other ways synced fine. On a hunch, used xattr utility to check the metadata:

=>xattr -l Picture\ 1.png
com.apple.FinderInfo:
0000 00 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 ................
0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

com.apple.metadata:kMDItemIsScreenCapture:
0000 62 70 6C 69 73 74 30 30 09 08 00 00 00 00 00 00 bplist00........
0010 01 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 ................
0020 00 00 00 00 00 00 00 00 00 09 ..........

com.apple.metadata:kMDItemScreenCaptureType:
0000 62 70 6C 69 73 74 30 30 57 64 69 73 70 6C 61 79 bplist00Wdisplay
0010 08 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 ................
0020 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0030 10 .

Deleted the second two pieces of metadata and voilá, file syncs fine now. Works, but I don't know why. Can anyone else reproduce this bug and fix?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

can't sync screen shots: error 22

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.