PulseEvent Bug with VLC...

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
rlyle
New Cone
New Cone
Posts: 4
Joined: 07 Apr 2004 18:05

PulseEvent Bug with VLC...

Postby rlyle » 07 Apr 2004 18:09

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

Gibalou
Big Cone-huna
Big Cone-huna
Posts: 608
Joined: 26 Nov 2003 10:59

Postby Gibalou » 08 Apr 2004 19:20

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.

rlyle
New Cone
New Cone
Posts: 4
Joined: 07 Apr 2004 18:05

Postby rlyle » 09 Apr 2004 03:40

Ah. thanks that will work...

I read alot of documentation, I assure you, just so happened to miss that part :)

-Richard

mack_psu

Postby mack_psu » 09 Apr 2004 22:12

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.

Pacific
Blank Cone
Blank Cone
Posts: 13
Joined: 09 Sep 2004 08:21
Location: Bharat

Postby Pacific » 09 Sep 2004 12:29

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.
Thanks & Regards,
A1Pacific

rlyle
New Cone
New Cone
Posts: 4
Joined: 07 Apr 2004 18:05

Postby rlyle » 09 Sep 2004 14:34

Actually, the command line arguments ended up working fine for me.. so I didn't modify any of the VLC base source or includes.

Pacific
Blank Cone
Blank Cone
Posts: 13
Joined: 09 Sep 2004 08:21
Location: Bharat

Postby Pacific » 09 Sep 2004 14:38

Please tell me which version you are using.
May be that particular version will help me.
Thank you
Thanks & Regards,
A1Pacific


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 10 guests