Ticket #1031 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

vlc plugin freezes when democracy (or firefox) is run with -console.

Reported by: clahey Assigned to: md
Priority: normal Milestone: 0.8.6-b
Component: LibVLC Version: 0.8.6a
Severity: normal Keywords: unicode
Cc: Platform(s): Win32
Difficulty: unknown Work status: Not started

Description

In democracy we use the vlc plugin to display movies on windows. (I'm on xp for testing.)

mozilla has a -console parameter that we use to display debugging information. Unfortunately, when running with the latest vlc version (0.8.6a) this freezes mozilla.

To reproduce, run firefox with the -console parameter (I used the windows command prompt.) Then browse over to http://participatoryculture.org/clahey/revver.html . The console prints a bunch of arg information and then prompts for the user to "Press the RETURN key to continue...". At this point mozilla is frozen. Once you hit return, it prints a bit more information and then loads the page, but the video doesn't display.

On democracy, this happens at startup and hitting return doesn't help.

To debug this, I did a binary search of the vlc svn repository, testing with Democracy.exe -console. The revision is 17739. 17738 does not have the bug. http://trac.videolan.org/vlc/changeset/17739

I hoped that applying the reversed patch to 0.8.6a would fix the problem, but it doesn't apply exactly, and once it's applied (libvlc_common.c moved into libvlc.c), the app no longer works (even without -console.) Our overall patch to vlc is available at https://develop.participatoryculture.org/trac/democracy/browser/trunk/dtv-binary-kit/mozplugin/vlc-moz-fix.patch?rev=4093 (the relevant parts are libvlc.c and win32_specific.c.) The problem is different than it is with 17739.

I'm not in front of the machine I've been using for testing, so I don't have the different outputs. I will attach traces of all three states (17738, 17739, and 0.8.6a patched) later tonight.

Change History

01/02/07 17:40:46 changed by Spellcoder

Related to ticket #900 and #920 ?

#900 - vlc 0.8.6-test2 and higher don't work with Mobile/Portable Firefox anymore ( my guess is because their loader passes arguments to the Firefox executble )
#920 - libvlc arguments need to be in UTF8

Quovodis says in the web&scripting forum ( http://forum.videolan.org/viewtopic.php?t=29891 ):
...you will need to make sure that IE/firefox command line is empty

06/02/07 04:53:04 changed by clahey

I've been reading the code. It looks like the problem here is that on win32, the command line passed into VLC_Init is replaced with a command line from wgetmainargs. This is fine for the vlc main app, but doesn't work for the mozilla plugin. My patch reverting the given change doesn't work because the parameter -vv gets converted to --vv somewhere in the code. I haven't yet figured out where this happens, but will keep looking.

Once I figure out how to revert the change so that wgetmainargs is called in app specific code instead of in the library, without converting -vv to --vv, I will attach the patch and suggest that it goes into trunk.

06/02/07 06:51:23 changed by clahey

I discovered that the --vv thing was in our code, not vlc's, so that's fixed, but the patch I've developed for our use just removes the calls to wgetmainargs. I suggest moving the call to app specific code instead of having it in the library code. Specifically, the code that's there is always wrong for the plugin since the command line is artificially built for the plugin and will never match the actual command line that wgetmainargs returns.

10/02/07 21:36:18 changed by courmisch

  • keywords changed from -console to unicode.
  • owner set to md.
  • component changed from Mozilla plugin to LibVLC.
  • milestone set to 0.8.6-buxfix.

06/03/07 21:17:41 changed by courmisch

  • status changed from new to closed.
  • resolution set to fixed.

(In [19224]) Backport [18807] (partial) Win32 Unicode fixes of fixes Closes #1031 It's probably unrealistic to fix this completely within the 0.8.6 branch