[vlc-devel] libvlc Issues and Questions

mlist at marxbitware.com mlist at marxbitware.com
Sun Jun 15 18:01:14 CEST 2008


Quoting Pierre d'Herbemont <pdherbemont at free.fr>:

>
> On Jun 15, 2008, at 5:24 PM, mlist at marxbitware.com wrote:
>>
>
>
>> Even without events, it crashes saying it quit in an unexpected   
>> manner.  I'm thinking that it may be to do with the vout   
>> issue...media and window not being released on stop.
>
> Of course you need to properly call release() on your allocated objects.
>

I do this.  In fact, when using a safe handle, its an automatic part  
of the garbage collection process.

The issue is that calling libvlc_release() results in a crash.

>> System.AccessViolationException was unhandled
>> Message="Attempted to read or write protected memory. This is often  
>>  an indication that other memory is corrupt."
>> Source="Marx_libvlc_wrapper"
>> StackTrace:
>>      at   
>> Marx_libvlc_wrapper.Marx_libvlc_media_player.libvlc_video_set_parent(Marx_libvlc_core_handle libvlc_core_handle, IntPtr Hwnd, libvlc_exception_struct&   
>> ex)
>
> Your tool doesn't show much, so it's harder but it tells that it seems
> that you have a but in your bindings.
>
> Also, I would strongly enourage you to look at the official CIL
> bindings located in bindings/cil, and probably use/improve them.
>

I just enabled debugging of unmanaged code.  This puts a breakpoint in  
place when calling libvlc_media_player_play() and in the call stack is  
this:

  	ntdll.dll!776f7dfe()
  	[Frames below may be incorrect and/or missing, no symbols loaded  
for ntdll.dll]
  	ntdll.dll!77761c93()
  	ntdll.dll!77732b26()
  	ntdll.dll!77762cf3()
  	ntdll.dll!7772bfe8()
  	ntdll.dll!77718652()
  	kernel32.dll!771ac56f()

Here's the output:

'Marx Media Player v2.exe': Loaded 'C:\Windows\System32\iertutil.dll',  
No symbols loaded.
'Marx Media Player v2.exe': Loaded 'C:\Windows\System32\odbc32.dll',  
No symbols loaded.
'Marx Media Player v2.exe': Loaded 'C:\Windows\System32\odbcint.dll',  
Binary was not built with debug information.
HEAP[Marx Media Player v2.exe]: Invalid address specified to  
RtlFreeHeap( 00370000, 063054A8 )
HEAP[Marx Media Player v2.exe]: Invalid address specified to  
RtlFreeHeap( 008D0000, 0046DB30 )
Windows has triggered a breakpoint in Marx Media Player v2.exe.

This may be due to a corruption of the heap, and indicates a bug in  
Marx Media Player v2.exe or any of the DLLs it has loaded.

The output window may have more diagnostic information


I got the other bug fixed.  The crashing of  
libvlc_media_player_set_media() is due to the DLLs being debug  
versions.  Once I enabled unmanaged code debugging, this worked fine.   
I have concerns about a release version of this though.




More information about the vlc-devel mailing list