Sparkle sometimes crashes due to File Manager API use on Lion

Bug #827357 reported by Whitney
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Sparkle
Fix Committed
Undecided
Unassigned

Bug Description

It seems that Sparkle is crashing sometimes due to the use of the File Manager API on Lion. This API seems to be pretty buggy on Lion, and from what I can tell, it would be possible to use mostly Cocoa APIs within Sparkle. Specifically, I'm seeing the following backtrace:

objc_msgSend_fixup
_ZN16TFileCoordinatorD1Ev
_ZN11TCopyReaderD2Ev
_ZN16TFSCopyOperationD2Ev
_NodeOperation
__NodeOperation
_FSOperateOnObjectSync
??? (0x10025e8dc)
??? (0x10026520f)
-[NSThread main]
__NSThread__main__
_pthread_start
thread_start

I know this is from Sparkle, but have misplaced my dSYM files, so I can't get symbols for what's going on in Sparkle (sorry).

Revision history for this message
Andy Matuschak (andymatuschak) wrote :

Indeed. There's a pull request for a fix to this at https://github.com/andymatuschak/Sparkle/pull/21 that I haven't had a chance to review.

Changed in sparkle:
status: New → Confirmed
Revision history for this message
Whitney (wbyoung) wrote :

I believe in addition to that pull request, there's a little more that needs to be fixed in +[SUPlainInstaller copyPathWithAuthentication:overPath:temporaryName:error:], but that should be a good starting place.

Revision history for this message
Hofman (cmhofman) wrote :

There are a few problems with that pull request. First of all it uses GCD, which is only available on 10.6 and later. Second, it uses a temporary directory name based on a globallyUniqueString. That should not be done, because it is pretty long, and hdiutil does not accept paths that become too long, something that could easily happen this way. This is the reason CFUUID is used in the current sources. Also, if you'd drop 10.4, why not use a local NSFileManager instance on the background thread? Or do that on 10.5 and later, while going to the main thread only on 10.4?

Revision history for this message
Mark Carver (markcarver) wrote :

+1 on this issue for me as well. Gotta love apple innovation, although sometimes it comes with a bit of a rough start ;)

Revision history for this message
Andy Matuschak (andymatuschak) wrote :

Fixed in 613b759077e5b66cc0fc80f1cafa043ddf4ada69.

Changed in sparkle:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.