Question
Reply
 
Honor Student
mwsnow
Posts: 2
Member Since: ‎12-14-2010
Message 1 of 5 (2,635 Views)
Accepted Solution

PhotoSmart C4280 repeating error messages in system.log

Running Snow Leopard 10.6.5, but this has been consistent through the past several minor system updates.

My system.log is filled with this repeating error:

 

Dec 14 09:35:04 iMac com.apple.launchd.peruser.502[15393] (com.hp.help.tocgenerator): Throttling respawn: Will start in 7 seconds

Dec 14 09:35:11 iMac com.apple.launchd.peruser.501[11945] (com.hp.help.tocgenerator): Throttling respawn: Will start in 3 seconds

Dec 14 09:35:14 iMac com.apple.launchd.peruser.502[15393] (com.hp.help.tocgenerator): Throttling respawn: Will start in 7 seconds

Dec 14 09:35:21 iMac com.apple.launchd.peruser.501[11945] (com.hp.help.tocgenerator): Throttling respawn: Will start in 3 seconds

 

Removing all HP software made it stop.  Reinstalling brings it back.  I have searched with Google and on HP support with no success.  Anyone?

Top Student
jourh
Posts: 3
Member Since: ‎12-19-2010
Message 2 of 5 (2,604 Views)

Re: PhotoSmart C4280 repeating error messages in system.log

This is because the HP Installer has set up what's called a LaunchAgent in MacOS to generate the table of contents in it's help directory. After looking at it in some depth, it appears to me that this need only be run once after installing, yet the installer registers it as a LaunchAgent that should be running all the time. Since the TOCGenerator program does it's thing and immediately quits, LaunchServices just immediately restarts it.  After so many cycles of this, LaunchServices throttles it to some number of seconds between invocations and writes a message to the syslog.  The message is "harmless" but does indicate that your computer is running this program needlessly over and over and over.

 

You should be able to stop the LaunchAgent by running the following command from the terminal:

 

launchctl unload /Library/LaunchAgents/com.hp.help.tocgenerator.plist

 

At this point, it will stop trying to respawn, but next time you reboot, it will come back; The easiest way to get rid of it permanently (after stopping it with the above command) would be to delete the plist file with the following command:

 

sudo rm -f /Library/LaunchAgents/com.hp.help.tocgenerator.plist

 

That will prompt you for your administrator password, since the file is a system file.

 

If you're not comfortable using Terminal, you can use the Finder to navigate to /Library/LaunchAgents and drag the file named com.hp.help.tocgenerator.plist to the Trash, and reboot.

 

As one might expect, by doing this you're mucking around with what HP installed, and you do so at your own risk, but this approach worked fine for me with no outward ill effects.

 

Hope that helps,

Jour

 

 

Honor Student
mwsnow
Posts: 2
Member Since: ‎12-14-2010
Message 3 of 5 (2,596 Views)

Re: PhotoSmart C4280 repeating error messages in system.log

Removing the .plist worked great.  Thank you.

Honor Student
willowhaus
Posts: 2
Member Since: ‎11-09-2011
Message 4 of 5 (1,912 Views)

Re: PhotoSmart C4280 repeating error messages in system.log

There is a better solution, actually. :smileyhappy: Assuming that HP has a good reason for regenerating the TOC of its Help files, they neglected to add a key that would cause launchd to run the job only once and quit. You have to specify this, because launchd normally wants to keep things alive & will respawn them if they die. You can, however, use the following to alter that default behavior.

 

So long as we're all comfy with the terminal (and hopefully vi), try this to fix the file in question:

macuser$ launchctl unload /Library/LaunchAgents/com.hp.help.tocgenerator.plist

 

This unloads the .plist from the running system.

 

 

macuser$ sudo vi /Library/LaunchAgents/com.hp.help.tocgenerator.plist

 

You'll need to use sudo to gain access to the file and be able to save the changes.

 

The file will look like below, but without the 2 lines of bold text towards the end.

 

Add the <key>LaunchOnlyOnce</key> and the <true/> tag - the bolt text - so your file appears as shown below:

 

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

        <key>RunAtLoad</key>

        <true/>

        <key>WatchPaths</key>

        <array>

                <string>/Library/Documentation/Help/Hewlett-Packard</string>

                <string>/Library/Documentation/Help/Hewlett-Packard/</string>

        </array>

        <key>ProgramArguments</key>

        <array>

                <string>/Library/Documentation/Help/Hewlett-Packard/TOCGenerator.app/Contents/M acOS/TOCGenerator</string>

        </array>

        <key>Label</key>

        <string>com.hp.help.tocgenerator</string>

 

        <key>LaunchOnlyOnce</key>

        <true/>

 

</dict>

</plist>

 

(Spaces between lines added only for clarity - I don't think they will hurt anything, but you don't need them)

 

Save this .plist file, then have launchd re-load the updated .plist:

 

 

macuser$ launchctl load /Library/LaunchAgents/com.hp.help.tocgenerator.plist

 

Problem solved - you should be able to look in Console & see that the errors have stopped.

 

HP - you guys should add these lines to your launchd scripts if you have not already. :smileywink:

Honor Student
willowhaus
Posts: 2
Member Since: ‎11-09-2011
Message 5 of 5 (1,911 Views)

Re: PhotoSmart C4280 repeating error messages in system.log

PS: the first xml line is wrapping on the page, but just to be clear that should be a continuous line. 

† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation