Thursday, April 06, 2006

Fixing Azureus Error Messages

Every time I start Azureus(2.4.0.2) on my Gentoo Linux box, two error messages will pop up, saying
Open Error '' could not be opened: Not a file
and
Error Failed to access torrent file ''. Ensure sufficient temporary file space available (check browser cache usage).

That looks like Azureus tries to open a file with empty name every time it starts up. And if you take a look at the file /usr/bin/azureus, you will see that the line responsible for calling up Azureus reads:
java -cp $(java-config -p systray4j,azureus-bin 2>/dev/null) -Djava.library.path="${AZDIR}" org.gudy.azureus2.ui.swt.Main "$1"

So the problem is when we start Azureus with no arguments, $1 will become an empty string, and Azureus will try to find a file named '', which, of course, does not exist.

To fix this, we have to check whether $1 is empty or not, and then call Azureus in appropriate way. What I did is replacing that line with:
if [ "$1" == "" ]; then
java -cp $(java-config -p systray4j,azureus-bin 2>/dev/null) -Djava.library.path="${AZDIR}" org.gudy.azureus2.ui.swt.Main
else
java -cp $(java-config -p systray4j,azureus-bin 2>/dev/null) -Djava.library.path="${AZDIR}" org.gudy.azureus2.ui.swt.Main "$1"
fi

And no more error messages on startup! :)

23 Comments:

At 12:35 AM, Anonymous Anonymous said...

Thanks! I had the exact same bug in my Gentoo. This fixed it!

 
At 1:46 AM, Anonymous Anonymous said...

Same problem here, same solution. Thanks!
Have you tried to contact Gentoo and/or Azureus teams to fix it?

 
At 5:22 AM, Anonymous Anonymous said...

not only did i get the error message. i could not get rid of it. stayed on screen until i closed azureus. not sure if its xgl causing that. anyway, thanks

 
At 11:11 AM, Anonymous Anonymous said...

Thank you. This has been bothering me.

 
At 8:02 PM, Anonymous Anonymous said...

Thank you!

joolz: i hade exactly the same problem, after an update from gnome 2.12 to 2.14 the warningmessage windows wouldn't close when clicking ok button.

 
At 10:53 PM, Anonymous Anonymous said...

you rock man... simple copy and paste fix... works just fine, i wonder if the azureus team knows about the error notification window can't be hidden in gnome 2.14 - just upgraded and i finally did something about these annoying messages, simply because now they're always in the way. if you haven't yet, you should really let them know about this bug. you're awesome for giving a temp fix tho - keep up the good werk.

 
At 7:52 PM, Anonymous Anonymous said...

Thank you! :)
I 've got exactly the same error when Azureus-2.4x starts until i use your howto
Great job!

 
At 8:14 PM, Anonymous Anonymous said...

sorry, but can someone tell me where do i find these lines and how to change?

 
At 7:32 PM, Anonymous Anonymous said...

Get root by using "su"

edit the file with

nano -w /usr/bin/azureus

Now replace the last line with the text above.


-> be happy ;)


It helped for me! Thank you!

 
At 2:11 AM, Anonymous Anonymous said...

Thank you very much. I'm another Gentoo user with 2.4.0.2. That was getting quite annoying.

 
At 10:52 PM, Anonymous Anonymous said...

thanks, love it all the way :)

 
At 3:03 AM, Anonymous Anonymous said...

Good job ! I'm using KDE 3.4.3 nad that window couldn't be hided with the ok button, that was really annoying me... It must be a bug with the GTK library or something we should all post our config to determine what upgrade made this bug happen.

 
At 11:57 PM, Anonymous Anonymous said...

Larry,

I and some other folk I've talked to have the exact same problem. I've yet to find a solution. :( Right now, I just try very hard to avoid having error dialogs pop up.

 
At 1:56 PM, Anonymous Anonymous said...

Man, if it weren't for you I'd have had this crappy grey box on my desktop for days. thanks for the help, this bug was driving me nuts.

 
At 5:47 PM, Anonymous Anonymous said...

Sorry, but what does "SU" mean?

 
At 9:36 AM, Anonymous Anonymous said...

Thank you so much for this patch. I never would have found that. Now if only they would fix the issue everywhere.

 
At 2:58 AM, Anonymous Anonymous said...

Aleks -

su is the linux command to become "root", also known as the Super User (or to change to another user, but that's less common for home desktop linux users).

Open a terminal window and type in "man su" for the manual page on su and how to use it. You'll need to know your admin/superuser password to use the command. When you're done with the fix, type "exit" to return to being your usual user. (Note - if you're already logged in as root, that's a HUGE no-no. You should always use a "normal" user account unless you absolutely MUST be root for something.

WARNING: many experienced Unix/Linux users will go nuts and tell you it is NOT safe to use su, especially for an inexperienced user. They'll tell you to use "sudo" instead. They're right, but it's often much harder to set up and use sudo.

 
At 7:40 AM, Anonymous Anonymous said...

sweet! thanks. fixed it for me as well.

 
At 5:12 AM, Anonymous Anonymous said...

Thanks! That was really annoying, had no idea it was so easy to fix

 
At 12:04 AM, Anonymous Anonymous said...

Thanks for the fix: I now see it is covered as Gentoo Bugs 137201 and 126822 and there is an experimental script here: http://www.gentooexperimental.org/svn/java/gentoo-java-experimental/net-p2p/azureus/files/azureus-gentoo-2.4.0.2.sh

 
At 5:24 PM, Anonymous Anonymous said...

Worked like a charm! (Well... charms don't usually work, but this did) Thanks a bunch!

 
At 3:24 AM, Anonymous Anonymous said...

Intresting fix, nice work. Odd how it's only gentoo that does it though :S

As for the problem with not being able to close error boxes, it's fixed in any beta from the website or CVS repo :)

 
At 10:46 PM, Blogger Maverick Prowls said...

My /usr/bin/azureus didn't look anything like that, but thanks to your succinct guide I was able to use your solution anyway. Many thanks, that's been bugging me for quite some time.

 

Post a Comment

<< Home