Thread: [Mplayerplug-in-devel] Beat up on CVS time
Brought to you by:
kdekorte
From: Kevin D. <kde...@ya...> - 2005-07-29 20:24:53
|
Can I get a couple of people to beat up on the CVS code. I've had some real= ly=20 good feedback from people and found some interesting corner cases in the=20 code. I'm really trying to get rid of crashes. If you can find something=20 repeatable it would be appreciated if you could send me the test case. How to install., The two CVS command should be all one line cd=20 mkdir cvs cd cvs cvs -d:pserver:ano...@cv...:/cvsroot/mplayerplug-in login (just hit enter for password) cvs -z3 -d:pserver:ano...@cv...:/cvsroot/mplayerplug-in co= =20 mplayerplug-in cd mplayerplug-in =2E/configure make make install The last part will install it as a USER so the .so files will be in=20 $HOME/.mozilla/plugins Please make sure you uninstall the existing plug-in first. Current changes from v3.01 When the same url is accessed via different protocols, make sure they are = all=20 added to the playlist=20 This makes Netflix work better Fix playlist problems resulting from multiprotocol fix Fix crash in NP_FULL mode when plugin is closed Foundation for Configuration Dialog Changed the way config files are read... /etc is read first, then=20 $HOME/.mozilla then $HOME/.mplayer Updated config dialog to update config file options for vo,ao,cachesize an= d=20 cache-percent settings (need localization) Fix crash when switching away from stopped/paused media Pause video playing when not visible in mozilla window (iconization and=20 desktop switching does not work however) Fix dumb in configure.in thanks to Panagiotis Issaris (he fixed it, I mess= ed=20 it up) Added embed callbacks "onHidden" and "onVisible" Added embed flag "nopauseonhide" set to one to disable the pause of video= =20 when covered up Added config flag "nopauseonhide" set to one to disable the pause of video= =20 when covered up Fix deadlock in filename javascript command Fix use of NULL pointer in URLcmp Add embed callback "onDestroy" Specifically add "-nocache" to mplayer when not streaming. Allow mplayerplug-in.types to have comments in it. Force full download of mpeg and mp3 media since mplayer has issues with=20 cached mp3s and mpegs Make sure cache-percent=3D100 is respected. Kevin =2D-=20 Get my public GnuPG key from http://keyserver.veridis.com:11371/export?id=3D7574690260641978351 |
From: Michael R. <mi...@mi...> - 2005-07-30 22:58:08
|
Hi All, On 2005-07-29 22:24:42, Kevin DeKorte wrote: > Can I get a couple of people to beat up on the CVS code. I've had some > really > good feedback from people and found some interesting corner cases in > the > code. I'm really trying to get rid of crashes. If you can find > something > repeatable it would be appreciated if you could send me the test > case. >=20 I have maybe found a bug in lastest cvs (2005-07-31 12:53 am EST) When the plugin runs a video stream you are able to right-click on the =20 mouse and a menu apears. In that menu the last option is configure. =20 Clicking on configure crashes not only MP but also Firefox. Kernel: 2.6.12-skas3-v9-pre4 Dist: Debian Sid loke:~/source/mplayerplug-in$ dpkg -s mozilla-firefox Package: mozilla-firefox Status: install ok installed Priority: optional Section: web Installed-Size: 21012 Maintainer: Eric Dorland <er...@de...> Architecture: i386 Version: 1.0.6-1 Can any other confirm that? --=20 Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael <at> rasmussen <dot> cc http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xD3C9A00E mir <at> datanom <dot> net http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE501F51C mir <at> miras <dot> org http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE3E80917 -------------------------------------------------------------- Q: What do you call a half-dozen Indians with Asian flu? A: Six sick Sikhs (sic). |
From: Panagiotis I. <ta...@gn...> - 2005-07-30 23:39:13
|
Hi, Op za, 30-07-2005 te 22:57 +0000, schreef Michael Rasmussen: > I have maybe found a bug in lastest cvs (2005-07-31 12:53 am EST) > > When the plugin runs a video stream you are able to right-click on the > mouse and a menu apears. In that menu the last option is configure. > Clicking on configure crashes not only MP but also Firefox. > > Kernel: 2.6.12-skas3-v9-pre4 > Dist: Debian Sid > loke:~/source/mplayerplug-in$ dpkg -s mozilla-firefox > Package: mozilla-firefox > Status: install ok installed > Priority: optional > Section: web > Installed-Size: 21012 > Maintainer: Eric Dorland <er...@de...> > Architecture: i386 > Version: 1.0.6-1 > > Can any other confirm that? I can confirm this bug with this configuration: Ubuntu 5.04 on x86 (P4M) Linux 2.6.12 mplayerplug-in 3.01 (CVS of 2005-07-25) Tested both with: Firefox Deer Park Alpha 2: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b4) Gecko/20050728 And Firefox 1.0.4: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050608 Firefox/1.0 (Ubuntu package 1.0.4) With friendly regards, Takis |
From: Kevin D. <kde...@ya...> - 2005-07-31 04:36:55
|
On Saturday 30 July 2005 04:57 pm, Michael Rasmussen wrote: > Hi All, > > On 2005-07-29 22:24:42, Kevin DeKorte wrote: > > Can I get a couple of people to beat up on the CVS code. I've had some > > really > > good feedback from people and found some interesting corner cases in > > the > > code. I'm really trying to get rid of crashes. If you can find > > something > > repeatable it would be appreciated if you could send me the test > > case. > > I have maybe found a bug in lastest cvs (2005-07-31 12:53 am EST) > > When the plugin runs a video stream you are able to right-click on the > mouse and a menu apears. In that menu the last option is configure. > Clicking on configure crashes not only MP but also Firefox. > > Kernel: 2.6.12-skas3-v9-pre4 > Dist: Debian Sid > loke:~/source/mplayerplug-in$ dpkg -s mozilla-firefox > Package: mozilla-firefox > Status: install ok installed > Priority: optional > Section: web > Installed-Size: 21012 > Maintainer: Eric Dorland <er...@de...> > Architecture: i386 > Version: 1.0.6-1 > > Can any other confirm that? Michael, =46ound the problem and fixed. It only happened when no config file existed= =2E the=20 change has been committed to CVS Kevin =2D-=20 Get my public GnuPG key from http://keyserver.veridis.com:11371/export?id=3D7574690260641978351 |
From: Panagiotis I. <ta...@gn...> - 2005-07-31 14:25:22
|
Op za, 30-07-2005 te 22:36 -0600, schreef Kevin DeKorte: > On Saturday 30 July 2005 04:57 pm, Michael Rasmussen wrote: > > Hi All, > > > > On 2005-07-29 22:24:42, Kevin DeKorte wrote: > > > Can I get a couple of people to beat up on the CVS code. I've had some > > > really > > > good feedback from people and found some interesting corner cases in > > > the > > > code. I'm really trying to get rid of crashes. If you can find > > > something > > > repeatable it would be appreciated if you could send me the test > > > case. > > > > I have maybe found a bug in lastest cvs (2005-07-31 12:53 am EST) > > > > When the plugin runs a video stream you are able to right-click on the > > mouse and a menu apears. In that menu the last option is configure. > > Clicking on configure crashes not only MP but also Firefox. > > > > Kernel: 2.6.12-skas3-v9-pre4 > > Dist: Debian Sid > > loke:~/source/mplayerplug-in$ dpkg -s mozilla-firefox > > Package: mozilla-firefox > > Status: install ok installed > > Priority: optional > > Section: web > > Installed-Size: 21012 > > Maintainer: Eric Dorland <er...@de...> > > Architecture: i386 > > Version: 1.0.6-1 > > > > Can any other confirm that? > > Michael, > > Found the problem and fixed. It only happened when no config file existed. the > change has been committed to CVS The change doesn't fix the problem in my case. The attached patch prevents a segmentation fault on my system. The patch adds checks for null-pointers in two cases. plugin-ui.cpp | 26 +++++++++++++------------- plugin.cpp | 9 +++++---- 2 files changed, 18 insertions(+), 17 deletions(-) It is strange though, that this patch fixes my segfaults, as they check for a possible allocation failure for a new text entry for a combo box... Seems unlikely that this would fail... :-/ With friendly regards, Takis |
From: Kevin D. <kde...@ya...> - 2005-07-31 15:06:43
|
> > Found the problem and fixed. It only happened when no config file > > existed. the change has been committed to CVS > > The change doesn't fix the problem in my case. > > The attached patch prevents a segmentation fault on my system. > > The patch adds checks for null-pointers in two cases. > > plugin-ui.cpp | 26 +++++++++++++------------- > plugin.cpp | 9 +++++---- > 2 files changed, 18 insertions(+), 17 deletions(-) > > It is strange though, that this patch fixes my segfaults, as they check > for a possible allocation failure for a new text entry for a combo > box... Seems unlikely that this would fail... :-/ > > With friendly regards, > Takis Takis, Odd, that I have to do that... anyway, I added the patch in... and added a = few=20 more things. Kevin =2D-=20 Get my public GnuPG key from http://keyserver.veridis.com:11371/export?id=3D7574690260641978351 |
From: Greg H. <mp...@am...> - 2005-07-31 09:10:53
Attachments:
mplayerplug-in-3.0-pause.patch
|
On 29-Jul-2005 Kevin DeKorte wrote: > Can I get a couple of people to beat up on the CVS code. I've had some really > good feedback from people and found some interesting corner cases in the > code. I'm really trying to get rid of crashes. If you can find something > repeatable it would be appreciated if you could send me the test case. Hi Kevin, Jason and I have stumbled upon something. I took a look at the code and noticed what I *think* might be happening. I have a proposed (untested) patch attached. here is the scenario. web app sends a javascript pause command to mplayerplug-in then later, no matter how many times it sends a javascript 'getPlayState', it will ALWAYS return state 3 (JS_STATE_PLAYING). Now, my analysis. nsPluginInstance::GetPlayState returns js_state, so whatever js_state is set yo, that's what gets returned. The ONLY line of code that SETS js_state to JS_STATE_PAUSED is in nsPluginInstance::Pause() basically, it sends off a message to mplayer (a pause command), and then it immediately sets js_state = JS_STATE_PAUSED (and sets paused=1). now. I checked for where js_state is being set to JS_STATE_PLAYING, looking for possibilities where js_state might be JS_STATE_PAUSED and being overwritten by JS_STATE_PLAYING. I think I located the code. there are exactly 3 places where js_state is set to JS_STATE_PLAYING plugin.cpp, line 1861 This is within the plugin Play command. We can ignore this one. plugin-threads.cpp, line 1562 This is immediately after mplayer is started (from calling mypopen) -- we can ignore this one. plugin-threads.cpp:963 I believe that this is the culprit. This code is monitoring mplayer's stdout, to manage the player's state. line 963 is invoked whenever stdout has a line beginning with "A:" or "V:" (a line about the Audio, or Video -- this is output while mplayer is playing, and when you see these, you indiscriminately set the state to JS_STATE_PLAYING. unless the state is already set to JS_STATE_STOPPED (line 962). Here is what I believe is happening. Javascript calls the Pause method. The Pause method sends a pause state to mplayer. and sets the js_state to JS_STATE_PAUSED. Meanwhile, the the player thread is running, and mplayer is still spitting out A & V frame lines. So it *RESETS* the state (which I *believe* was set to JS_STATE_PAUSED) to JS_STATE_PLAYING. a few millisecs lated, mplayer reads the "pause" message, and it pauses. But by this time, the plugin has re-registered the state to PLAYING, so all attempts to get a good state value (i.e. calling GetPlayState) will return 'JS_STATE_PLAYING' instead of 'JS_STATE_PAUSED'. I'm not sure of the consequences, but my THOUGHT at a solution is this: plugin-threads.cpp:962 Right now, you test for js_state is set to JS_STATE_STOPPED and if it is, you do NOT overwrite it to PLAY. Note that js_state is set to JS_STATE_STOPPED in EXACTLY 1 place. The javascript 'nsPluginInstance::Stop()' method. Apparently you had this problem earlier, where by (I'm guessing here, tell me how I do :) javascript was used to stop the player but subsequent GetPlayState calls returned (incorrectly) PLAYING because line plugin-threads.cpp:963 was overwriting the state. The same thing is now happening with PAUSE, and I THINK that the same solution is applicable. Patch line 962 to also exempt js_state == stopped. i.e. if (local_td->instance->js_state != JS_STATE_STOPPED) local_td->instance->js_state = JS_STATE_PLAYING; becomes if ((local_td->instance->js_state != JS_STATE_STOPPED) && (local_td->instance->js_state != JS_STATE_PAUSED)) local_td->instance->js_state = JS_STATE_PLAYING; I will patch my version, and try it out in the morning. I suspect that this will fix the GetPlayState() after Pause() problem though... best rgds, -Greg p.s. patch (untested, but I think you can verify what I have said:) attached. :) +---------------------------------------------------------------------+ Please also check the log file at "/dev/null" for additional information. (from /var/log/Xorg.setup.log) | Greg Hosler gr...@ho... | +---------------------------------------------------------------------+ |
From: Kevin D. <kde...@ya...> - 2005-07-31 13:12:37
|
On Sunday 31 July 2005 03:14 am, Greg Hosler wrote: > On 29-Jul-2005 Kevin DeKorte wrote: > > Can I get a couple of people to beat up on the CVS code. I've had some > > really good feedback from people and found some interesting corner cases > > in the code. I'm really trying to get rid of crashes. If you can find > > something repeatable it would be appreciated if you could send me the > > test case. > > Hi Kevin, > > Jason and I have stumbled upon something. I took a look at the code and > noticed what I *think* might be happening. I have a proposed (untested) > patch attached. > > here is the scenario. > > web app sends a javascript pause command to mplayerplug-in > > then later, no matter how many times it sends a javascript 'getPlayState', > it will ALWAYS return state 3 (JS_STATE_PLAYING). > > Now, my analysis. > > nsPluginInstance::GetPlayState returns js_state, so whatever js_state is > set yo, that's what gets returned. > > The ONLY line of code that SETS js_state to JS_STATE_PAUSED is in > > nsPluginInstance::Pause() > > basically, it sends off a message to mplayer (a pause command), and then = it > immediately sets js_state =3D JS_STATE_PAUSED (and sets paused=3D1). > > now. I checked for where js_state is being set to JS_STATE_PLAYING, looki= ng > for possibilities where js_state might be JS_STATE_PAUSED and being > overwritten by JS_STATE_PLAYING. > > I think I located the code. > > there are exactly 3 places where js_state is set to JS_STATE_PLAYING > > > plugin.cpp, line 1861 > > This is within the plugin Play command. We can ignore this > one. > > plugin-threads.cpp, line 1562 > > This is immediately after mplayer is started (from calling > mypopen) -- we can ignore this one. > > plugin-threads.cpp:963 > > I believe that this is the culprit. > > This code is monitoring mplayer's stdout, to manage the > player's state. line 963 is invoked whenever stdout has a line beginning > with "A:" or "V:" (a line about the Audio, or Video -- this is output whi= le > mplayer is playing, and when you see these, you indiscriminately set the > state to JS_STATE_PLAYING. unless the state is already set to > JS_STATE_STOPPED (line 962). > > Here is what I believe is happening. > > Javascript calls the Pause method. The Pause method sends a pause state to > mplayer. and sets the js_state to JS_STATE_PAUSED. Meanwhile, the the > player thread is running, and mplayer is still spitting out A & V frame > lines. So it *RESETS* the state (which I *believe* was set to > JS_STATE_PAUSED) to JS_STATE_PLAYING. a few millisecs lated, mplayer reads > the "pause" message, and it pauses. But by this time, the plugin has > re-registered the state to PLAYING, so all attempts to get a good state > value (i.e. calling GetPlayState) will return 'JS_STATE_PLAYING' instead = of > 'JS_STATE_PAUSED'. > > I'm not sure of the consequences, but my THOUGHT at a solution is this: > > plugin-threads.cpp:962 > > Right now, you test for js_state is set to JS_STATE_STOPP= ED > and if it is, you do NOT overwrite it to PLAY. > > Note that js_state is set to JS_STATE_STOPPED in EXACTLY 1 > place. The javascript 'nsPluginInstance::Stop()' method. > > Apparently you had this problem earlier, where by (I'm > guessing here, tell me how I do :) javascript was used to stop the player > but subsequent GetPlayState calls returned (incorrectly) PLAYING because > line plugin-threads.cpp:963 was overwriting the state. > > The same thing is now happening with PAUSE, and I THINK > that the same solution is applicable. > > Patch line 962 to also exempt js_state =3D=3D stopped. > > i.e. > > if (local_td->instance->js_state !=3D JS_STATE_STOPPED) > local_td->instance->js_state =3D JS_STATE_PLAYING; > > becomes > > if ((local_td->instance->js_state !=3D JS_STATE_STOPPED) && > (local_td->instance->js_state !=3D JS_STATE_PAUSED)) > local_td->instance->js_state =3D JS_STATE_PLAYING; > > I will patch my version, and try it out in the morning. I suspect that th= is > will fix the GetPlayState() after Pause() problem though... > > best rgds, > > -Greg Greg, I agree... patch committed. Kevin =2D-=20 Get my public GnuPG key from http://keyserver.veridis.com:11371/export?id=3D7574690260641978351 |
From: Michael R. <mi...@mi...> - 2005-07-31 13:32:06
|
Hi all, On 2005-07-31 06:36:45, Kevin DeKorte wrote: >=20 > Found the problem and fixed. It only happened when no config file > existed. the > change has been committed to CVS >=20 I can now confirm it works. Another problem though, the changes entered in the config menu are not =20 saved. Next time you open the config menu the changes are missing. Is =20 this maybe related to a situation where the mplayerplug-in folder does =20 not exists in the users home folder? Are maybe because it tries to save =20 the config in the system folder if the plugin is installed system wide? --=20 Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael <at> rasmussen <dot> cc http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xD3C9A00E mir <at> datanom <dot> net http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE501F51C mir <at> miras <dot> org http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE3E80917 -------------------------------------------------------------- Condense soup, not books! |
From: Kevin D. <kde...@ya...> - 2005-07-31 15:01:55
|
On Sunday 31 July 2005 07:32 am, Michael Rasmussen wrote: > Hi all, > > On 2005-07-31 06:36:45, Kevin DeKorte wrote: > > Found the problem and fixed. It only happened when no config file > > existed. the > > change has been committed to CVS > > I can now confirm it works. > Another problem though, the changes entered in the config menu are not > saved. Next time you open the config menu the changes are missing. Is > this maybe related to a situation where the mplayerplug-in folder does > not exists in the users home folder? Are maybe because it tries to save > the config in the system folder if the plugin is installed system wide? Michael, The changes are saved... but here is how it gets the filename Reads the environment variable HOME and then adds=20 "/.mplayer/mplayerplug-in.conf" to it.. and saves in there.. See line 1640 of plugin-ui.cpp Perhaps you don't have $HOME set? Kevin =2D-=20 Get my public GnuPG key from http://keyserver.veridis.com:11371/export?id=3D7574690260641978351 |
From: Panagiotis I. <ta...@gn...> - 2005-07-31 15:08:51
|
Hi Kevin, Op vr, 29-07-2005 te 14:24 -0600, schreef Kevin DeKorte: > Can I get a couple of people to beat up on the CVS code. I've had some really > good feedback from people and found some interesting corner cases in the > code. I'm really trying to get rid of crashes. If you can find something > repeatable it would be appreciated if you could send me the test case. The following crashes appeared when playing a media file with mplayerplugin, and one changes the url editbox in firefox to browse another location: Program received signal SIGPIPE, Broken pipe. [Switching to Thread -1253598288 (LWP 6168)] 0xffffe410 in __kernel_vsyscall () (gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0xb7e5347b in __write_nocancel () from /lib/tls/i686/cmov/libpthread.so.0 #2 0xb443bccf in sendCommand (instance=0x9202600, command=0xb5477160 "get_percent_pos\n") at Source/plugin-support.cpp:465 #3 0xb44492a3 in playNode (local_td=0x92023a8, local_list=0x91a19c8, local_url=0xb54782c0 "file:///home/takis/crash/rzffd6Vv2KHV.wmv", local_mmsstream=0, usefps=0xffffffe0, nomouseinput=0xffffffe0, maybeplaylist=0xb54782ac) at Source/plugin-threads.cpp:973 #4 0xb444a070 in playPlaylist (td=0x92023a8) at Source/plugin-threads.cpp:1577 #5 0xb7e4eae0 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #6 0xb75eac9a in clone () from /lib/tls/i686/cmov/libc.so.6 (gdb) Program received signal SIG32, Real-time event 32. [Switching to Thread -1254093904 (LWP 6186)] 0xffffe410 in __kernel_vsyscall () (gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0xb75649cb in read () from /lib/tls/i686/cmov/libc.so.6 #2 0xb750a1ef in _IO_file_read () from /lib/tls/i686/cmov/libc.so.6 #3 0xb750973b in _IO_file_underflow () from /lib/tls/i686/cmov/libc.so.6 #4 0xb750b7d7 in _IO_default_uflow () from /lib/tls/i686/cmov/libc.so.6 #5 0xb750b64a in __uflow () from /lib/tls/i686/cmov/libc.so.6 #6 0xb7505f8e in getc () from /lib/tls/i686/cmov/libc.so.6 #7 0xb43c2496 in playNode (local_td=0x9437000, local_list=0x9441560, local_url=0xb53ff2c0 "file:///home/takis/crash/rzffd6Vv2KHV.wmv", local_mmsstream=0, usefps=0xfffffe00, nomouseinput=0xfffffe00, maybeplaylist=0xb53ff2ac) at Source/plugin-threads.cpp:733 #8 0xb43c4070 in playPlaylist (td=0x9437000) at Source/plugin-threads.cpp:1577 #9 0xb7dd5ae0 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #10 0xb7571c9a in clone () from /lib/tls/i686/cmov/libc.so.6 [New Thread -1254483024 (LWP 6244)] [New Thread -1272972368 (LWP 6245)] Program received signal SIG32, Real-time event 32. [Switching to Thread -1254483024 (LWP 6244)] 0xffffe410 in __kernel_vsyscall () Program received signal SIG32, Real-time event 32. [Switching to Thread -1331041360 (LWP 6325)] 0xffffe410 in __kernel_vsyscall () (gdb) With friendly regards, Takis |
From: Panagiotis I. <ta...@gn...> - 2005-07-31 15:23:18
|
Op zo, 31-07-2005 te 17:08 +0200, schreef Panagiotis Issaris: > ... > > [New Thread -1254483024 (LWP 6244)] > [New Thread -1272972368 (LWP 6245)] > > Program received signal SIG32, Real-time event 32. > [Switching to Thread -1254483024 (LWP 6244)] > 0xffffe410 in __kernel_vsyscall () > > > Program received signal SIG32, Real-time event 32. > [Switching to Thread -1331041360 (LWP 6325)] > 0xffffe410 in __kernel_vsyscall () > (gdb) The crashes also appear when playing audio-only files. Here's some more info from the previous crashes after telling GDB to continue on SIG32: ... READ: A: 5.1 (05.0) 1.2% ANS_PERCENT_POSITION=2 READ: A: 5.1 (05.1) 1.2% A: 5.2 (05.1) 1.2% ANS_PERCENT_POSITION=2 READ: A: 5.2 (05.2) 1.2% ANS_PERCENT_POSITION=2 shut called shutdown called READ: A: 5.2 (05.2) 1.2% A: 5.3 (05.3) 1.2% Program received signal SIGPIPE, Broken pipe. [Switching to Thread -1254122576 (LWP 6446)] 0xffffe410 in __kernel_vsyscall () (gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0xb7dd347b in __write_nocancel () from /lib/tls/i686/cmov/libpthread.so.0 #2 0xb43bbccf in sendCommand (instance=0x9438850, command=0xb53f7160 "get_percent_pos\n") at Source/plugin-support.cpp:465 #3 0xb43c92a3 in playNode (local_td=0x9439788, local_list=0x9438f30, local_url=0xb53f82c0 "test.mp3", local_mmsstream=0, usefps=0xffffffe0, nomouseinput=0xffffffe0, maybeplaylist=0xb53f82ac) at Source/plugin-threads.cpp:973 #4 0xb43ca070 in playPlaylist (td=0x9439788) at Source/plugin-threads.cpp:1577 #5 0xb7dceae0 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #6 0xb756ac9a in clone () from /lib/tls/i686/cmov/libc.so.6 (gdb) With friendly regards, Takis |
From: Michael R. <mi...@mi...> - 2005-07-31 15:28:15
|
Hi Kevin, On 2005-07-31 17:01:46, Kevin DeKorte wrote: >=20 > Reads the environment variable HOME and then adds > "/.mplayer/mplayerplug-in.conf" to it.. and saves in there.. >=20 > See line 1640 of plugin-ui.cpp >=20 I activated DEBUG and tried again. This was printed: config /home/mir/.mplayer/mplayerplug-in.conf tmp /tmp/confX4nwOxU write new config file But still nothing is written? In temp there exists a file with the name confX4nw0xU and is contains =20 this: loke:~/.mplayer$ cat /tmp/confX4nwOxU vo=3Dxv ao=3Dalsa cachesize=3D512 cachepercent=3D25 > Perhaps you don't have $HOME set? loke:~/.mplayer$ echo $HOME /home/mir --=20 Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael <at> rasmussen <dot> cc http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xD3C9A00E mir <at> datanom <dot> net http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE501F51C mir <at> miras <dot> org http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE3E80917 -------------------------------------------------------------- C-3PO: Don't call me a mindless philosopher, you overweight glob of grease! |
From: Kevin D. <kde...@ya...> - 2005-07-31 15:32:37
|
On Sunday 31 July 2005 09:08 am, Panagiotis Issaris wrote: > Hi Kevin, > > Op vr, 29-07-2005 te 14:24 -0600, schreef Kevin DeKorte: > > Can I get a couple of people to beat up on the CVS code. I've had some > > really good feedback from people and found some interesting corner cases > > in the code. I'm really trying to get rid of crashes. If you can find > > something repeatable it would be appreciated if you could send me the > > test case. > > The following crashes appeared when playing a media file with > mplayerplugin, and one changes the url editbox in firefox to browse > another location: > Takis, Can you help me setup the test case... I was unable to duplicate the crash doing the following. Loaded a web page that contains an embedded media Started it playing Entered a URL into the box and it switched fine. I also tried Loaded a direct image url into the browser file:///home/kdekorte/Movies/duality.divx waited for it to start playing entered a new url and it switched to the URL fine. BTW, what version of GTK are you using? I'm curious since you had the other= =20 problem with the widget not being created. Also, any options set in your mplayerplug-in.conf file? Kevin =2D-=20 Get my public GnuPG key from http://keyserver.veridis.com:11371/export?id=3D7574690260641978351 |
From: Panagiotis I. <ta...@gn...> - 2005-07-31 15:54:37
|
Hi Kevin, Op zo, 31-07-2005 te 09:32 -0600, schreef Kevin DeKorte: > Takis, >=20 > Can you help me setup the test case... Yes. First, I've let gdb continue and got the following output, after which Firefox continued to work again.=20 (gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0xb7dd347b in __write_nocancel () from /lib/tls/i686/cmov/libpthread.so.0 #2 0xb43bbccf in sendCommand (instance=3D0x9438850, command=3D0xb53f7160 "get_percent_pos\n") at Source/plugin-support.cpp:465 #3 0xb43c92a3 in playNode (local_td=3D0x9439788, local_list=3D0x9438f30, local_url=3D0xb53f82c0 "test.mp3", local_mmsstream=3D0, usefps=3D0xffffff= e0, nomouseinput=3D0xffffffe0, maybeplaylist=3D0xb53f82ac) at Source/plugin-threads.cpp:973 #4 0xb43ca070 in playPlaylist (td=3D0x9439788) at Source/plugin-threads.cpp:1577 #5 0xb7dceae0 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #6 0xb756ac9a in clone () from /lib/tls/i686/cmov/libc.so.6 (gdb) cont Continuing. Program received signal SIGPIPE, Broken pipe. [Switching to Thread -1220812128 (LWP 6437)] 0xffffe410 in __kernel_vsyscall () (gdb) cont Continuing. [Thread -1281365072 (LWP 6448) exited] *****sendCommand Truncated*****[Thread -1244808272 (LWP 6442) exited] [Thread -1262515280 (LWP 6445) exited] [Thread -1272972368 (LWP 6447) exited] Program received signal SIG32, Real-time event 32. *****sendCommand Truncated***** alsa-uninit: pcm closed READ: READ: Exiting... (Quit) ----player thread: breaking read loop - Quit ----player thread: tryagain =3D 0 ----player thread: playNode returned =3D 0 ----player thread: close done ----player thread: transitioning to next item ----player thread: entering loop ----player thread: looking for node to play ----player thread: nothing on the list to play ----player thread: nothing to play ----player thread: callbacks complete ----player thread: normal exit [Thread -1254122576 (zombie) exited] Trying to kill mplayer process(6449), if it still exists mplayer dead Removing function from idle handler Removing function from idle handler Removing function from idle handler Removing function from idle handler Removing function from idle handler Removing function from idle handler Removing function from idle handler Removing function from idle handler Removing function from idle handler Removing function from idle handler Window Cleaned up Entering deleteList DELETE test.mp3 size: 5557620 remove: 0 play: 1 playlist: 0 speed: -1 cancelled: 0 retrieved: 1 mms stream: 0 cache bytes: 1048576 Actual Size: 0x0 Play Size: 0x0 memory free ~nsPluginInstance called >=20 > I was unable to duplicate the crash doing the following. >=20 > Loaded a web page that contains an embedded media > Started it playing > Entered a URL into the box and it switched fine. >=20 > I also tried >=20 > Loaded a direct image url into the browser > file:///home/kdekorte/Movies/duality.divx > waited for it to start playing > entered a new url and it switched to the URL fine. The procedure I follow to reproduce the bug is: 1. Start Firefox 2. Browse to /home/takis/crash/ 3. Click on localmp3.html (the MP3 starts loading and playing) 4. Click on the URL entrybox, to make it active and remove the "localmp3.html" from the URL again, so the URL is again "/home/takis/crash". This locks up Firefox and shows the SIGPIPE error in GDB. Commands being written to a pipe which has already been closed? (That was the thing I'm thinking after searching Google and seeing that "shut called" "shutdown called" appear) shut called shutdown called READ: A: 4.6 (04.6) 1.3% alsa-uninit: pcm closed Program received signal SIGPIPE, Broken pipe. [Switching to Thread -1254474832 (LWP 6619)] 0xffffe410 in __kernel_vsyscall () Switching to a true website instead of a local folder gives exactly the same results on my system. >=20 > BTW, what version of GTK are you using? I'm curious since you had the o= ther=20 > problem with the widget not being created. I'm using GTK 2.6.4-0ubuntu3 > Also, any options set in your mplayerplug-in.conf file? debug=3D1 logfile=3D$HOME/mpp.log vo=3Dxv,x11 ao=3Dalsa,esd,oss download=3D1 dload-dir=3D$HOME/tmp keep-download=3D1 This is the localmp3.html file, which is based on the one which caused the crash on a website initially: <html><body> <object id=3D"MediaPlayer1" classid=3D"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" height=3D"400" width=3D"450" codebase=3D"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp= 2inf.cab#Version=3D5,1,52,701" standby=3D"Loading Microsoft=C2=AE Windows=C2=AE Media Player components.= .." type=3D"application/x-oleobject" align=3D"middle"> <embed type=3D"application/x-mplayer2" pluginspage=3D"http://www.microsoft.com/Windows/MediaPlayer/" src=3D"test.mp3" > </embed> </object> </body></html> With friendly regards, Takis |
From: Panagiotis I. <ta...@gn...> - 2005-07-31 16:16:37
|
Hi Kevin, Op zo, 31-07-2005 te 09:32 -0600, schreef Kevin DeKorte: > On Sunday 31 July 2005 09:08 am, Panagiotis Issaris wrote: > > Hi Kevin, > > > > Op vr, 29-07-2005 te 14:24 -0600, schreef Kevin DeKorte: > > > Can I get a couple of people to beat up on the CVS code. I've had some > > > really good feedback from people and found some interesting corner cases > > > in the code. I'm really trying to get rid of crashes. If you can find > > > something repeatable it would be appreciated if you could send me the > > > test case. > > > > The following crashes appeared when playing a media file with > > mplayerplugin, and one changes the url editbox in firefox to browse > > another location: > > > > Takis, > > Can you help me setup the test case... > > I was unable to duplicate the crash doing the following. Please ignore my previous reports... :-( Sorry for wasting your time... It appears it is a GDB problem. The crashes only appear when I'm running Firefox from within GDB. I switched to run Firefox from within GDB to be able to trace the first crashes I noticed (the one with the configure pop-up menu-item crash), after which I stayed using GDB to be able to backtrace further crashes... Again, my apologies for my mistake... With friendly regards, Takis |
From: Kevin D. <kde...@ya...> - 2005-07-31 15:42:19
|
On Sunday 31 July 2005 09:28 am, Michael Rasmussen wrote: > Hi Kevin, > > On 2005-07-31 17:01:46, Kevin DeKorte wrote: > > Reads the environment variable HOME and then adds > > "/.mplayer/mplayerplug-in.conf" to it.. and saves in there.. > > > > See line 1640 of plugin-ui.cpp > > I activated DEBUG and tried again. This was printed: > config /home/mir/.mplayer/mplayerplug-in.conf > tmp /tmp/confX4nwOxU > write new config file > > But still nothing is written? > > In temp there exists a file with the name confX4nw0xU and is contains > this: > loke:~/.mplayer$ cat /tmp/confX4nwOxU > vo=3Dxv > ao=3Dalsa > cachesize=3D512 > cachepercent=3D25 > > > Perhaps you don't have $HOME set? > > loke:~/.mplayer$ echo $HOME > /home/mir What are the permissions on /home/mir/.mplayer/mplayerplug-in.conf I'm guessing the plugin can't delete the file and so therefore can't move t= he=20 tmp file into the correct place.=20 Kevin =2D-=20 Get my public GnuPG key from http://keyserver.veridis.com:11371/export?id=3D7574690260641978351 |
From: Michael R. <mi...@mi...> - 2005-07-31 15:53:50
|
On 2005-07-31 17:42:12, Kevin DeKorte wrote: >=20 > What are the permissions on /home/mir/.mplayer/mplayerplug-in.conf >=20 > I'm guessing the plugin can't delete the file and so therefore can't > move the > tmp file into the correct place. >=20 There is no mplayerplug-in.conf in the folder. Tried touch mplayerplug-in.conf and now it writes this: config /home/mir/.mplayer/mplayerplug-in.conf tmp /tmp/confX2ddFnv update existing config But now the file is deleted! loke:~/.mplayer$ cat mplayerplug-in.conf cat: mplayerplug-in.conf: No such file or directory Also this was written: File to delete /tmp/mplay4M0wqr/ which was not the case before. The file is deleted. --=20 Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael <at> rasmussen <dot> cc http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xD3C9A00E mir <at> datanom <dot> net http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE501F51C mir <at> miras <dot> org http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE3E80917 -------------------------------------------------------------- indent does _not_ solve the problem of: * buggers who think that MyVariableIsBiggerThanYourVariable is a good name - Alexander Viro on coding style |
From: Panagiotis I. <ta...@gn...> - 2005-07-31 16:00:15
|
Hi Kevin, Op zo, 31-07-2005 te 09:32 -0600, schreef Kevin DeKorte: > On Sunday 31 July 2005 09:08 am, Panagiotis Issaris wrote: > > Hi Kevin, > > > > Op vr, 29-07-2005 te 14:24 -0600, schreef Kevin DeKorte: > > > Can I get a couple of people to beat up on the CVS code. I've had some > > > really good feedback from people and found some interesting corner cases > > > in the code. I'm really trying to get rid of crashes. If you can find > > > something repeatable it would be appreciated if you could send me the > > > test case. > > > > The following crashes appeared when playing a media file with > > mplayerplugin, and one changes the url editbox in firefox to browse > > another location: > > > > Takis, > > Can you help me setup the test case... > > I was unable to duplicate the crash doing the following. What I think is rather strange is that when the crash appears, and I repeatedly ask GDB to continue, it continues after lets say 4 "cont"s and after this keeps working if I repeat the procedure which led to a crash the first time :-/ So, it crashes, I enter a few "cont"s and Firefox continues again. Then I repeat the procedure, thus, I go to the localmp3.html file, play the MP3 and change the URL again. Then, at first the browser appears to hang for a second or so, but then continues on without the SIGPIPE... shut called shutdown called Program received signal SIG32, Real-time event 32. [Switching to Thread -1245160528 (LWP 6633)] 0xffffe410 in __kernel_vsyscall () (gdb) Continuing. [Thread -1245160528 (zombie) exited] Trying to kill mplayer process(6635), if it still exists waiting for player to go NULL waiting for player to go NULL waiting for player to go NULL waiting for player to go NULL waiting for player to go NULL waiting for player to go NULL waiting for player to go NULL waiting for player to go NULL waiting for player to go NULL waiting for player to go NULL kill(15) status = -1 mplayer dead Removing function from idle handler Removing function from idle handler Removing function from idle handler Removing function from idle handler Removing function from idle handler Window Cleaned up Entering deleteList DELETE test.mp3 size: 5557620 remove: 0 play: 1 playlist: 0 speed: -1 cancelled: 0 retrieved: 1 mms stream: 0 cache bytes: 1048576 Actual Size: 0x0 Play Size: 0x0 memory free ~nsPluginInstance called With friendly regards, Takis |
From: Panagiotis I. <ta...@gn...> - 2005-07-31 16:10:37
|
Op zo, 31-07-2005 te 17:59 +0200, schreef Panagiotis Issaris: > What I think is rather strange is that when the crash appears, and I > repeatedly ask GDB to continue, it continues after lets say 4 "cont"s > and after this keeps working if I repeat the procedure which led to a > crash the first time :-/ So, it crashes, I enter a few "cont"s and > Firefox continues again. Then I repeat the procedure, thus, I go to the > localmp3.html file, play the MP3 and change the URL again. Then, at > first the browser appears to hang for a second or so, but then continues > on without the SIGPIPE... Oh, one thing I forgot to note explicitly, is that I tell gdb that it shouldn't stop on signal SIG32. With friendly regards, Takis |
From: Kevin D. <kde...@ya...> - 2005-07-31 16:22:08
|
On Sunday 31 July 2005 10:10 am, Panagiotis Issaris wrote: > Op zo, 31-07-2005 te 17:59 +0200, schreef Panagiotis Issaris: > > What I think is rather strange is that when the crash appears, and I > > repeatedly ask GDB to continue, it continues after lets say 4 "cont"s > > and after this keeps working if I repeat the procedure which led to a > > crash the first time :-/ So, it crashes, I enter a few "cont"s and > > Firefox continues again. Then I repeat the procedure, thus, I go to the > > localmp3.html file, play the MP3 and change the URL again. Then, at > > first the browser appears to hang for a second or so, but then continues > > on without the SIGPIPE... > > Oh, one thing I forgot to note explicitly, is that I tell gdb that it > shouldn't stop on signal SIG32. > > With friendly regards, > Takis Takis, I added SIGPIPE to the signal mask that we are setting on the thread. Can y= ou=20 see if that helps your problem? Index: plugin-threads.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-threads.cpp,v retrieving revision 1.160 retrieving revision 1.161 diff -C2 -d -r1.160 -r1.161 *** plugin-threads.cpp 31 Jul 2005 15:07:11 -0000 1.160 =2D-- plugin-threads.cpp 31 Jul 2005 16:18:37 -0000 1.161 *************** *** 188,191 **** =2D-- 188,192 ---- sigaddset(&newmask, SIGTERM); sigaddset(&newmask, SIGKILL); + sigaddset(&newmask, SIGPIPE); pthread_sigmask(SIG_UNBLOCK, &newmask, 0L); usleep(500); *************** *** 201,204 **** =2D-- 202,206 ---- sigaddset(&newmask, SIGTERM); sigaddset(&newmask, SIGKILL); + sigaddset(&newmask, SIGPIPE); pthread_sigmask(SIG_UNBLOCK, &newmask, 0L); Kevin =2D-=20 Get my public GnuPG key from http://keyserver.veridis.com:11371/export?id=3D7574690260641978351 |
From: Kevin D. <kde...@ya...> - 2005-07-31 16:08:16
|
On Sunday 31 July 2005 09:53 am, Michael Rasmussen wrote: > On 2005-07-31 17:42:12, Kevin DeKorte wrote: > > What are the permissions on /home/mir/.mplayer/mplayerplug-in.conf > > > > I'm guessing the plugin can't delete the file and so therefore can't > > move the > > tmp file into the correct place. > > There is no mplayerplug-in.conf in the folder. > Tried touch mplayerplug-in.conf and now it writes this: > config /home/mir/.mplayer/mplayerplug-in.conf > tmp /tmp/confX2ddFnv > update existing config > > But now the file is deleted! > loke:~/.mplayer$ cat mplayerplug-in.conf > cat: mplayerplug-in.conf: No such file or directory > > Also this was written: > File to delete /tmp/mplay4M0wqr/ > which was not the case before. The file is deleted. Michael, Well I added some code to CVS to tell us the error. So I guess you'll have = to=20 get it and see... Also here is the patch Index: Source/plugin-ui.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-ui.cpp,v retrieving revision 1.127 retrieving revision 1.130 diff -u -r1.127 -r1.130 =2D-- Source/plugin-ui.cpp 31 Jul 2005 04:35:50 -0000 1.127 +++ Source/plugin-ui.cpp 31 Jul 2005 16:05:43 -0000 1.130 @@ -1615,6 +1615,7 @@ char config_name[1000]; char tmp_name[1000]; char buffer[1000]; + int ret; instance->cachesize =3D (int) gtk_range_get_value(GTK_RANGE(instance->conf_cachesize)); @@ -1670,8 +1671,23 @@ fprintf(output, "cache-percent=3D%i\n", instance->cache_percent); fclose(input); fclose(output); =2D unlink(config_name); =2D rename(tmp_name, config_name); + ret =3D unlink(config_name); + if (ret =3D=3D 0) { + ret =3D rename(tmp_name, config_name); + if (ret =3D=3D -1) { + ret =3D errno; + if (DEBUG) { + printf("Unable to rename the file %s to=20 %s\n",tmp_name,config_name); + printf("Error code: %i - %s\n",ret,strerror(ret)); + } + } + } else { + ret =3D errno; + if (DEBUG) { + printf("Unable to delete the file %s\n",config_name); + printf("Error code: %i - %s\n",ret,strerror(ret)); + } + } } else { if (DEBUG) printf("write new config file\n"); @@ -1681,7 +1697,14 @@ fprintf(output, "cachesize=3D%i\n", instance->cachesize); fprintf(output, "cachepercent=3D%i\n", instance->cache_percent); fclose(output); =2D rename(tmp_name, config_name); + ret =3D rename(tmp_name, config_name); + if (ret =3D=3D -1) { + ret =3D errno; + if (DEBUG) { + printf("Unable to rename the file %s to=20 %s\n",tmp_name,config_name); + printf("Error code: %i - %s\n",ret,strerror(ret)); + } + } } } Kevin =2D-=20 Get my public GnuPG key from http://keyserver.veridis.com:11371/export?id=3D7574690260641978351 |
From: Michael R. <mi...@mi...> - 2005-07-31 18:55:46
|
On 2005-07-31 18:08:08, Kevin DeKorte wrote: >=20 > Michael, >=20 > Well I added some code to CVS to tell us the error. So I guess you'll > have to > get it and see... >=20 It does not change anything - it reads the file first time, but =20 changing something and the file is deleted. I have been trying varius =20 setups and it seems that writing just dos not happen. I activated debug =20 in the config file but no log showed up anyware. Tried directing =20 logging to tmp but the same thing happend. I am only able to see debug =20 output is I start firefox from a terminal. Output: config /home/mir/.mplayer/mplayerplug-in.conf tmp /tmp/confXt7zDta write new config file Unable to rename the file /tmp/confXt7zDta to =20 /home/mir/.mplayer/mplayerplug-in.conf Error code: 18 - Invalid cross-device link running as root though is alright: config /root/.mplayer/mplayerplug-in.conf tmp /tmp/confXUN5FpL write new config file I think I know the reason: In Unix link and unlink is not allow across file systems. In my case =20 home is mounted via nfs, but it also would be the same if home was on a =20 different file system than /usr/bin/ where firefox is installed. =20 Therefore, in my case, root is allow to link and unlink since /root is =20 on the same file system as /usr/bin. --=20 Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael <at> rasmussen <dot> cc http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xD3C9A00E mir <at> datanom <dot> net http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE501F51C mir <at> miras <dot> org http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE3E80917 -------------------------------------------------------------- The surest protection against temptation is cowardice. -- Mark Twain |
From: Michael R. <mi...@ra...> - 2005-08-01 01:12:14
|
Hi Kevin, On 2005-07-31 21:23:02, Kevin DeKorte wrote: >=20 > I thought this might be a problem, but I thought rename would solve > this > issue. >=20 As reported in the last mail it did not do any good. So instead of =20 having others solve my problems I solved it myself:-) Patch for plugin-ui.cpp: --- plugin-ui.cpp 2005-08-01 00:03:31.540847840 +0200 +++ plugin-ui.cpp-new 2005-07-31 23:54:00.676743857 +0200 @@ -1676,6 +1676,21 @@ ret =3D rename(tmp_name, config_name); if (ret =3D=3D -1) { ret =3D errno; + if (ret =3D=3D 18) { + /* Dealing with a link to another file system */ + input =3D fopen(tmp_name, "r"); + output =3D fopen(config_name, "w"); + if (input !=3D NULL && output !=3D NULL) { + if (DEBUG) + printf("update existing config on and =20 external file system\n"); + while (fgets(buffer, sizeof(buffer), =20 input) !=3D NULL) { + fprintf(output, "%s", buffer); + } + fclose(input); + fclose(output); + unlink(tmp_name); + } + } if (DEBUG) { printf("Unable to rename the file %s to %s \n",tmp_name,config_name); printf("Error code: %i - =20 %s\n",ret,strerror(ret)); @@ -1700,6 +1715,21 @@ ret =3D rename(tmp_name, config_name); if (ret =3D=3D -1) { ret =3D errno; + if (ret =3D=3D 18) { + /* Dealing with a link to another file system */ + input =3D fopen(tmp_name, "r"); + output =3D fopen(config_name, "w"); + if (input !=3D NULL && output !=3D NULL) { + if (DEBUG) + printf("update existing config on =20 and external file system\n"); + while (fgets(buffer, sizeof(buffer), =20 input) !=3D NULL) { + fprintf(output, "%s", buffer); + } + fclose(input); + fclose(output); + unlink(tmp_name); + } + } if (DEBUG) { printf("Unable to rename the file %s to %s \n",tmp_name,config_name); printf("Error code: %i - =20 %s\n",ret,strerror(ret)); A suggestion: To keep things simple I think all writing of config files =20 should be done the way I have handle the problem with home on another =20 file system as it seems this way is more robust? Language Files: The reason way they are not installed if you run make install as root =20 is simple. The Makefile in po needs $DESTDIR "if [ "$(DESTDIR)" then" =20 so install.sh NEW MAKEFILE: LANGUAGES=3Dde dk es fr it ja ko pl pt_BR nl ru MOFILES=3Dde.mo dk.mo es.mo fr.mo it.mo ja.mo ko.mo pl.mo pt_BR.mo nl.mo =20 ru.mo PACKAGE=3Dmplayerplug-in .SUFFIXES: .SUFFIXES: .po .mo .pot .PHONY: all install uninstall clean distclean $(LANGUAGES) .po.mo: msgfmt -o $@ $< all: $(MOFILES) install: $(MOFILES) if [ "$(DESTDIR)" ]; then \ $(INSTALL) -d -m0755 $(DESTDIR)$(LOCALEDIR); \ LOCALEDIR=3D$(DESTDIR)/$(LOCALEDIR); \ fi; \ for lang in $(LANGUAGES); do \ dir=3D$(LOCALEDIR)/$$lang/; \ if test ! -x "$$dir"; then \ mkdir $$dir; chmod 755 $$dir; \ fi; \ dir=3D$(LOCALEDIR)/$$lang/LC_MESSAGES; \ if test ! -x "$$dir"; then \ mkdir $$dir; chmod 755 $$dir; \ fi; \ if test -r $$lang.mo; then \ install -m644 $$lang.mo $$dir/$(PACKAGE).mo; \ fi; \ done; \ uninstall: @$(MAKE) check for cat in $(MOFILES); do \ cat=3D`basename $$cat`; \ lang=3D`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ rm -f $(LOCALEDIR)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \ done clean: rm -f core core.* *.old.po *.mo *.pot sjiscorr distclean: clean $(PACKAGE).pot: ../Source/*.cpp xgettext --default-domain=3D$(PACKAGE) --add-comments --keyword=3D_ =20 -- keyword=3DN_ ../Source/*.cpp -o $(PACKAGE).pot $(LANGUAGES): @$(MAKE) $(PACKAGE).pot if test ! -f $@.po.orig; then cp $@.po $@.po.orig; fi mv $@.po $@.po.old if msgmerge $@.po.old $(PACKAGE).pot -o $@.po; then \ rm -f $@.po.old; \ else \ echo "msgmerge for $@.po failed!"; mv $@.po.old $@.po; \ fi A last remark: The language file for danish must be called da.po as the =20 $LANG is set to da when danish should be enabled. As of now the =20 language is not activated since it is placed in folder called =20 $LOCALEDIR/LC_MESSAGES/dk/ where it should be $LOCALEDIR/LC_MESSAGES/da/ PS. The po folder is not opdated from cvs? --=20 Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael <at> rasmussen <dot> cc http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xD3C9A00E mir <at> datanom <dot> net http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE501F51C mir <at> miras <dot> org http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE3E80917 -------------------------------------------------------------- Forrest Gump: "They sending me to Vietnam - it's this whole other country" |
From: Michael R. <mi...@mi...> - 2005-08-01 01:21:43
|
Hi Kevin, On 2005-07-31 21:23:02, Kevin DeKorte wrote: >=20 > I thought this might be a problem, but I thought rename would solve > this > issue. >=20 As reported in the last mail it did not do any good. So instead of =20 having others solve my problems I solved it myself:-) Patch for plugin-ui.cpp: --- plugin-ui.cpp 2005-08-01 00:03:31.540847840 +0200 +++ plugin-ui.cpp-new 2005-07-31 23:54:00.676743857 +0200 @@ -1676,6 +1676,21 @@ ret =3D rename(tmp_name, config_name); if (ret =3D=3D -1) { ret =3D errno; + if (ret =3D=3D 18) { + /* Dealing with a link to another file system */ + input =3D fopen(tmp_name, "r"); + output =3D fopen(config_name, "w"); + if (input !=3D NULL && output !=3D NULL) { + if (DEBUG) + printf("update existing config on and =20 external file system\n"); + while (fgets(buffer, sizeof(buffer), =20 input) !=3D NULL) { + fprintf(output, "%s", buffer); + } + fclose(input); + fclose(output); + unlink(tmp_name); + } + } if (DEBUG) { printf("Unable to rename the file %s to %s \n",tmp_name,config_name); printf("Error code: %i - =20 %s\n",ret,strerror(ret)); @@ -1700,6 +1715,21 @@ ret =3D rename(tmp_name, config_name); if (ret =3D=3D -1) { ret =3D errno; + if (ret =3D=3D 18) { + /* Dealing with a link to another file system */ + input =3D fopen(tmp_name, "r"); + output =3D fopen(config_name, "w"); + if (input !=3D NULL && output !=3D NULL) { + if (DEBUG) + printf("update existing config on =20 and external file system\n"); + while (fgets(buffer, sizeof(buffer), =20 input) !=3D NULL) { + fprintf(output, "%s", buffer); + } + fclose(input); + fclose(output); + unlink(tmp_name); + } + } if (DEBUG) { printf("Unable to rename the file %s to %s \n",tmp_name,config_name); printf("Error code: %i - =20 %s\n",ret,strerror(ret)); A suggestion: To keep things simple I think all writing of config files =20 should be done the way I have handle the problem with home on another =20 file system as it seems this way is more robust? Language Files: The reason way they are not installed if you run make install as root =20 is simple. The Makefile in po needs $DESTDIR "if [ "$(DESTDIR)" then" =20 so install.sh NEW MAKEFILE: LANGUAGES=3Dde dk es fr it ja ko pl pt_BR nl ru MOFILES=3Dde.mo dk.mo es.mo fr.mo it.mo ja.mo ko.mo pl.mo pt_BR.mo nl.mo =20 ru.mo PACKAGE=3Dmplayerplug-in .SUFFIXES: .SUFFIXES: .po .mo .pot .PHONY: all install uninstall clean distclean $(LANGUAGES) .po.mo: msgfmt -o $@ $< all: $(MOFILES) install: $(MOFILES) if [ "$(DESTDIR)" ]; then \ $(INSTALL) -d -m0755 $(DESTDIR)$(LOCALEDIR); \ LOCALEDIR=3D$(DESTDIR)/$(LOCALEDIR); \ fi; \ for lang in $(LANGUAGES); do \ dir=3D$(LOCALEDIR)/$$lang/; \ if test ! -x "$$dir"; then \ mkdir $$dir; chmod 755 $$dir; \ fi; \ dir=3D$(LOCALEDIR)/$$lang/LC_MESSAGES; \ if test ! -x "$$dir"; then \ mkdir $$dir; chmod 755 $$dir; \ fi; \ if test -r $$lang.mo; then \ install -m644 $$lang.mo $$dir/$(PACKAGE).mo; \ fi; \ done; \ uninstall: @$(MAKE) check for cat in $(MOFILES); do \ cat=3D`basename $$cat`; \ lang=3D`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ rm -f $(LOCALEDIR)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \ done clean: rm -f core core.* *.old.po *.mo *.pot sjiscorr distclean: clean $(PACKAGE).pot: ../Source/*.cpp xgettext --default-domain=3D$(PACKAGE) --add-comments --keyword=3D_ =20 -- keyword=3DN_ ../Source/*.cpp -o $(PACKAGE).pot $(LANGUAGES): @$(MAKE) $(PACKAGE).pot if test ! -f $@.po.orig; then cp $@.po $@.po.orig; fi mv $@.po $@.po.old if msgmerge $@.po.old $(PACKAGE).pot -o $@.po; then \ rm -f $@.po.old; \ else \ echo "msgmerge for $@.po failed!"; mv $@.po.old $@.po; \ fi A last remark: The language file for danish must be called da.po as the =20 $LANG is set to da when danish should be enabled. As of now the =20 language is not activated since it is placed in folder called =20 $LOCALEDIR/LC_MESSAGES/dk/ where it should be $LOCALEDIR/LC_MESSAGES/da/ PS. The po folder is not opdated from cvs? --=20 Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael <at> rasmussen <dot> cc http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xD3C9A00E mir <at> datanom <dot> net http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE501F51C mir <at> miras <dot> org http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE3E80917 -------------------------------------------------------------- Forrest Gump: "They sending me to Vietnam - it's this whole other country" |