Page 1 of 1
PulseEvent Bug with VLC...
Posted: 07 Apr 2004 18:09
by rlyle
I've been developing some plugins for VLC using MSVC... which has been working great, except for one problem!
It's a known bug, that when running under a debugger, PulseEvent (even SetEvent/ResetEvent) will fail to release a waiting thread. See Article ID: Q173260 in MSDN for full details on this quirk. The fix, is to add a Sleep( 0 ) before calling PulseEvent(), to make sure all threads are in a wait state.
It's making it very hard to debug my plugins, as 1/2 the time VLC just hangs when trying to start up...
Please, add a Sleep(0) before the PulseEvent in vlc_mutex_unlock() for WIN32...
Thanks,
Richard
Posted: 08 Apr 2004 19:20
by Gibalou
You should have read the INSTALL.win32 file a bit more carefully :p
Extract: if you want to run vlc under the msvc debugger, you need to run it with the --fast-mutex --win9x-cv-method=1 options because the debugger usually loses signals sent by PulseEvent().
And the Sleep(0) solution is certainly not acceptable because it will slow down things (de-schedules the current thread) and breaks the "fairness" of the threading implementation... all this to work-around a bug (bad implementation) in a debugger.
Posted: 09 Apr 2004 03:40
by rlyle
Ah. thanks that will work...
I read alot of documentation, I assure you, just so happened to miss that part
-Richard
Posted: 09 Apr 2004 22:12
by mack_psu
rlyle,
can we find a way to exchange msvc compiled vlc files...
i'm having trouble running vlc using command line after compiling using msvc 6.0.
thanks.
Posted: 09 Sep 2004 12:29
by Pacific
Hi Richard (and mack_psu),
It's really gr8 to see that someone got VLC running on MSVC.
But you had said that :
"Please, add a Sleep(0) before the PulseEvent in vlc_mutex_unlock() for WIN32... "
In Vlc-0.7.2's vlc_mutex_unlock function there is no call to PulseEvent().
Please tell me if I am missing something.
I have already added "--fast-mutex --win9x-cv-method=1" in the "Program arguments:" section.
Please let me know if you can share the original VLC code with your changes in it.
Posted: 09 Sep 2004 14:34
by rlyle
Actually, the command line arguments ended up working fine for me.. so I didn't modify any of the VLC base source or includes.
Posted: 09 Sep 2004 14:38
by Pacific
Please tell me which version you are using.
May be that particular version will help me.
Thank you