<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
git version control wrote:
<blockquote cite="mid:20090305202810.39B222FF9C@skanda.videolan.org"
 type="cite">
  <pre wrap="">vlc | branch: master | Rémi Denis-Courmont <a class="moz-txt-link-rfc2396E" href="mailto:remi@remlab.net"><remi@remlab.net></a> | Thu Mar  5 22:27:30 2009 +0200| [bde4f0ba22eb98928ed68b236d5cd80efbe0651d] | committer: Rémi Denis-Courmont 

Hack to get the leaked object tree back

  </pre>
  <blockquote type="cite">
    <pre wrap=""><a class="moz-txt-link-freetext" href="http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bde4f0ba22eb98928ed68b236d5cd80efbe0651d">http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bde4f0ba22eb98928ed68b236d5cd80efbe0651d</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->---

 src/libvlc.c       |    6 ++++++
 src/misc/objects.c |    5 +++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/libvlc.c b/src/libvlc.c
index e949996..f90994d 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -1134,6 +1134,12 @@ void libvlc_InternalDestroy( libvlc_int_t *p_libvlc )
     vlc_mutex_destroy( &priv->config_lock );
     vlc_mutex_destroy( &priv->timer_lock );
 
+#ifndef NDEBUG /* Hack to dump leaked objects tree */
+    if( vlc_internals( p_libvlc )->i_refcount > 1 )
+        while( vlc_internals( p_libvlc )->i_refcount > 0 )
+            vlc_object_release( p_libvlc );
+#endif
+
     assert( vlc_internals( p_libvlc )->i_refcount == 1 );
     vlc_object_release( p_libvlc );
 }
diff --git a/src/misc/objects.c b/src/misc/objects.c
index 3f55190..13f1a84 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -572,8 +572,6 @@ void __vlc_object_release( vlc_object_t *p_this )
 
     if( b_should_destroy )
     {
-        /* We have no children */
-        assert (internals->i_children == 0);
         parent = p_this->p_parent;
 
 #ifndef NDEBUG
@@ -607,6 +605,9 @@ void __vlc_object_release( vlc_object_t *p_this )
         if (parent)
             /* Detach from parent to protect against FIND_CHILDREN */
             vlc_object_detach_unlocked (p_this);
+
+        /* We have no children */
+        assert (internals->i_children == 0);
  </pre>
</blockquote>
<br>
vlc.exe have already quit is there a point of assert here ?!<br>
This assert fails at the last seconds before vlc.exe is shutdown
completely.<br>
<br>
Deint / Blend + quit assert fail misc/objects.c line 610.<br>
<br>
<hr size="2" width="100%"><br>
[0x642f54] main libvlc debug: removing playlist<br>
[0x4e018c] main playlist debug: Destroyed<br>
[0x642f54] main libvlc debug: removing interaction<br>
[0x642f54] main libvlc debug: TIMER ML Load : Total 227.000 ms / 1
intvls (Avg 227.000 ms)<br>
[0x642f54] main libvlc debug: TIMER Items array build : Total 0.000 ms
/ 2 intvls (Avg 0.000 ms)<br>
[0x642f54] main libvlc debug: TIMER ML Dump : Total 4.000 ms / 1 intvls
(Avg 4.000 ms)<br>
[0x642f54] main libvlc debug: removing stats<br>
[0x642f54] main libvlc debug: removing module "memcpymmxext"<br>
[0x642f54] main libvlc debug: opening config file
(C:\Users\vista\AppData\Roaming\vlc\vlcrc)<br>
[0x642f54] main libvlc debug: opening config file
(C:\Users\vista\AppData\Roaming\vlc\vlcrc)<br>
[0x642f54] main libvlc debug: writing plugins cache
C:\Users\vista\AppData\Roaming\vlc\plugins-zxzx04.dat<br>
ERROR: leaking object (0x10892f2c, type:generic, name:fontlist builder)<br>
[New thread 21136.0x49cc]<br>
[New thread 21136.0x46d4]<br>
<br>
Program received signal SIGTRAP, Trace/breakpoint trap.<br>
0x77554aaf in msvcrt!_assert () from C:\Windows\syswow64\msvcrt.dll<br>
(gdb) Error: dll starting at 0x77b60000 not found.<br>
Error: dll starting at 0x76290000 not found.<br>
Error: dll starting at 0x77b60000 not found.<br>
Error: dll starting at 0x77a90000 not found.<br>
bt<br>
#0  0x77554aaf in msvcrt!_assert () from C:\Windows\syswow64\msvcrt.dll<br>
#1  0x6a5926a3 in __vlc_object_release (p_this=0x642f54) at
misc/objects.c:276<br>
#2  0x6a541616 in libvlc_InternalDestroy (p_libvlc=0x642f54) at
libvlc.c:1140<br>
#3  0x6a301488 in libvlc_release (p_instance=0x643730) at
control/core.c:175<br>
#4  0x004013f6 in WinMain (hInstance=0x400000, hPrevInstance=0x0, <br>
    lpCmdLine=0x943e26 "", nCmdShow=10) at winvlc.c:153<br>
#5  0x004015aa in main ()<br>
<hr size="2" width="100%"><br>
vlc.exe caused a Breakpoint at location 77554aae in module msvcrt.dll.<br>
<br>
Call stack:<br>
77554AAE  msvcrt.dll:77554AAE  _assert<br>
6A5926A3  libvlccore.dll:6A5926A3  __vlc_object_release  objects.c:282<br>
void __vlc_object_release(<br>
    vlc_object_t * p_this = &(indirect)<br>
)<br>
6A541616  libvlccore.dll:6A541616  libvlc_InternalDestroy  libvlc.c:1140<br>
void libvlc_InternalDestroy(<br>
    libvlc_int_t * p_libvlc = &(indirect)<br>
)<br>
6A301488  libvlc.dll:6A301488  libvlc_release  core.c:176<br>
void libvlc_release(<br>
    libvlc_instance_t * p_instance = &(indirect)<br>
)<br>
004013F6  vlc.exe:004013F6  WinMain  winvlc.c:153<br>
int WinMain(<br>
    HINSTANCE hInstance = &{<br>
        int i = 9460301<br>
    },<br>
    HINSTANCE hPrevInstance = &{<br>
        int i = <br>
    },<br>
    LPSTR lpCmdLine = &0,<br>
    int nCmdShow = 1<br>
)<br>
004015AA  vlc.exe:004015AA  WinMain  winvlc.c:165<br>
int WinMain(<br>
    HINSTANCE hInstance = &{<br>
        int i = <br>
    },<br>
    HINSTANCE hPrevInstance = &{<br>
        int i = 14165825<br>
    },<br>
    LPSTR lpCmdLine = &'h',<br>
    int nCmdShow = -1<br>
)<br>
0040124C  vlc.exe:0040124C<br>
004012B8  vlc.exe:004012B8<br>
7631E3F3  kernel32.dll:7631E3F3  BaseThreadInitThunk<br>
77EACFED  ntdll.dll:77EACFED  RtlCreateUserProcess<br>
77EAD1FF  ntdll.dll:77EAD1FF  RtlCreateProcessParameters<br>
<hr size="2" width="100%"><br>
Regards.<br>
<br>
</body>
</html>