[vlc-devel] gui/macosx - menus memory issues

Dilaroga Dev dilaroga at gmail.com
Fri Dec 25 16:32:40 CET 2009


Hi,

I figured out an issue that causes frequents gui crashes. For now, we can easily reproduce a crash :
- launch vlc (trunk)
- open a video
- click on the video menu bar to show its contents.
- click on the video menu bar to hide its contents
- click on the video menu bar to cause a crash.

Moreover, the VLC.app never quit properly after playing a video. VLC.app is not able to play more than one video after we have stopped a previous playback.

The program fails on an assertion in the __vlc_object_release() :
Assertion failed: (internals->i_children == 0)

I can't really see where this issue come from but i've noticed that if the input object is released only one times in the implementation of validateMenuItem: (from control.m) the gui stability is improved (at least the problems listed in the beginning of this message are fixed) but maybe leaked... In this method the input object is retained at the beginning and released at the end with a check if the input object is not null. This check seems to prevent if the input object has already been released and this case could happen. So i modify the function to retain only once at the beginning and releasing only once at the end of the method. I've provided a patch to see modification. But i'm not enough familiar with vlc core and especially with vlc's objects memory management to be sure that these changes have no leak effect.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gui.macosx.validateMenuItem.patch
Type: application/octet-stream
Size: 691 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20091225/740c9bb1/attachment.obj>
-------------- next part --------------


--
S?bastien Zwickert.




More information about the vlc-devel mailing list