f940 Flash leaving behind npviewer.bin 'stuff'. - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Desktop Usage > Multimedia

Multimedia Having problems running your new shiny and blinking gadget or watching DVDs, listening to CDs etc.?

Reply
 
Thread Tools Display Modes
  #1  
Old July 9th, 2010, 04:24
dralex999 dralex999 is offline
Junior Member
 
Join Date: Jun 2010
Location: Boise Idaho, U.S.A.
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default Flash leaving behind npviewer.bin 'stuff'.

I'm having a problem with flash leaving behind npviewer.bin 'things'... It tends to slow down my browsing and increases my memory usage.

I need to know why it isn't cleaned up after the web page dies and how I can modify my browser, Firefox 3.5.10, to automatically kill them... ps -ax shows many occurances of npviewer.bin . And, um, I don't like that.

Even though a killall npviewer.bin works to get rid of them and thus improves my surfing speed I'd like to know how to rid myself of this little problem permanently.

Anyone ?
Reply With Quote
  #2  
Old July 9th, 2010, 06:45
Oxyd's Avatar
Oxyd Oxyd is offline
Member
 
Join Date: Nov 2008
Location: Czech Republic
Posts: 167
Thanks: 5
Thanked 15 Times in 13 Posts
Default

I don't think there's a fix for that. Flash is simply buggy on FreeBSD. It is not that long ago when there still was no native Flash for FBSD.

I simply use FlashBlock for Firefox, so that FF doesn't try to launch Flash for every stupid Flash-based banner, and run pkill npviewer.bin every now and then. (Or when Firefox freezes.)
Reply With Quote
  #3  
Old July 9th, 2010, 07:49
vermaden's Avatar
vermaden vermaden is offline
Giant Locked
 
Join Date: Nov 2008
Location: pl_PL.lodz
Posts: 2,192
Thanks: 59
Thanked 632 Times in 349 Posts
Default

@dralex999

I do not use Flash enabled browser for all time browsing (Opera) and when I want to see a site with Flash, I launch Firefox with Flash enabled, and after I have seen what I wanted, I kill(1) both npviewer.bin and firefox processes.
__________________
Religions, worst damnation of mankind.
"FreeBSD has always been the operating system that GNU/Linux should have been." Frank Pohlmann, IBM
http://vermaden.blogspot.com
Reply With Quote
  #4  
Old July 9th, 2010, 13:05
SirDice's Avatar
SirDice SirDice is online now
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,696
Thanks: 47
Thanked 2,021 Times in 1,860 Posts
Default

$ pkill npviewer does the trick for me.

NB try not to use killall. If you're ever on Solaris killall does something completely different. It really kills all processes, including init.
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
The Following User Says Thank You to SirDice For This Useful Post:
noz (September 8th, 2010)
  #5  
Old July 9th, 2010, 19:37
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Administrator
 
Join Date: Nov 2008
Location: Rotterdam, the Netherlands
Posts: 9,824
Thanks: 30
Thanked 1,884 Times in 1,330 Posts
Default

I have this in my user's crontab:

Code:
*/5 * * * *	/home/myuser/flashkill > /dev/null
This is the script:

Code:
#!/bin/sh

flashcount=$(/bin/pgrep npviewer.bin | /usr/bin/wc -l)

if [ $flashcount = 1 ]
then
/usr/bin/killall npviewer.bin
fi
See http://forums.freebsd.org/showthread...7155#post67155 for rationale.

Works like a charm. Never looked back. Don't use it on Solaris
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules
FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki
Before you post: How to ask questions the smart way
If you must know .. So, what does an Adminstrator/Moderator do?
---> Do not PM me with FreeBSD questions. I do not work here. <---
Reply With Quote
  #6  
Old July 31st, 2010, 00:06
ScopeDog ScopeDog is offline
Junior Member
 
Join Date: Jul 2010
Location: Oregon, USA
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default pkill npviewer.bin when core dumps

Thanks for the script DutchDaemon, but it doesn't always kill all unused npviewer.bin.
Especially when I switch flash videos from next to next, some processes remain.

So, I tried

npviewer_monitor.sh
Code:
#!/bin/sh

corefile=${HOME}/npviewer.bin.core
intervaltime=1

while getopts p:s: option
do
    case "${option}" in
    p)
        parentpid=$OPTARG
        ;;
    s)
        intervaltime=$OPTARG
        ;;
    esac
done
shift $(($OPTIND - 1))

while :
do
    procstat "${parentpid}" > /dev/null 2>&1 || 
        break

    if [ -f "${corefile}" ]
    then
        pkill npviewer.bin
        rm "${corefile}"
    fi

    sleep "${intervaltime}"
done
which I picked up at http://gihyo.jp/admin/clip/01/fdt/200810/10, and use it as

% daemon npviewer_monitor.sh -p $$

It pkills npviewer.bin only when npviewer.bin.core exists and I put in my ~/.xsession.
(Also, I recommend not to start it on xterm etc, because it automatically terminates when its parent process dies.)
So far, it works well.

Last edited by DutchDaemon; July 31st, 2010 at 00:35.
Reply With Quote
  #7  
Old July 31st, 2010, 00:36
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Administrator
 
Join Date: Nov 2008
Location: Rotterdam, the Netherlands
Posts: 9,824
Thanks: 30
Thanked 1,884 Times in 1,330 Posts
Default

Well, it hasn't failed me once since I started using it, and I don't have coredumps. Probably a slightly different setup. Whatever works for you is fine, of course.
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules
FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki
Before you post: How to ask questions the smart way
If you must know .. So, what does an Adminstrator/Moderator do?
---> Do not PM me with FreeBSD questions. I do not work here. <---
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
leaving Linux juniorsatanas General 4 June 23rd, 2010 19:26
Posters and stuff xy16644 Off-Topic 5 November 11th, 2009 07:31
[Solved] Weird stuff happening with SMTP dennylin93 Web & Network Services 4 September 7th, 2009 15:14
Help support the BSDs by buying stuff! aragon Off-Topic 11 June 29th, 2009 14:05
locale stuff cL0N31 General 1 December 11th, 2008 08:20


All times are GMT +1. The time now is 12:08.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0