[vlc-devel] [patch] VLCKit: exhaustive fix of VLCEventManager crashes, deadlocks and other issues

Florent Pillet fpillet at gmail.com
Tue Jun 24 23:50:10 CEST 2014


This patch is rather large and restructures a good chunk of VLCKit's VLCEventManager.
Most notable in this patch are:

- using @autoreleasepool instead of the old NSAutoreleasePool.
  Easier to read, slightly improves performance

- fixed an issue where a messages's target, and further the target's delegate
  were not being retained for the duration of the delegate's selector callback.
  This could lead to crashes if the code executed by the delegate was leading
  to releasing the delegate itself prior to executing other methods (I can give
  a complete explanation for this with examples if needed)

- fixed a deadlock that occurred under some severe conditions (most developers
  don't stress VLCKit that much, but I do) due to cancelling messages the had the side
  effect of releasing other objects which themselves tried to cancel their own messages.
  Parties involved were VLCMediaPlayer and VLCMedia, complete explanation of the issue
  with resolution is in the -cancelCallToObject: method.

- fixed a crash due to over-releasing secondary objects (arguments, notification name)
  even though the message may have been cancelled before execution and these components
  already released.

I am using VLCKit in some stressing conditions for the framework, and it generally behaves
pretty well. This patch improves stability of this layer by a large factor.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: VLCEventManager.patch
Type: application/octet-stream
Size: 17744 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140624/a1959e3c/attachment.obj>

More information about the vlc-devel mailing list