Ubuntu Software center crashes when trying to open, but open successfully if tried to open via terminal.

Bug #725938 reported by ExperiencedNoobie
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: software-center

I am using ubuntu 10.10 upgraded from 10.04. When ever I try to access/open Ubuntu software center through Applications menu, software-center says "starting ubuntu software center" and then closes automatically without opening. But if I try opening via terminal "sudo software-center" then it opens successfully. I have tried re-installing the package but didnt work. I have also tried build-dep which also didnt fix. I am using software-center 3.0.7

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: software-center 3.0.7
ProcVersionSignature: Ubuntu 2.6.35-25.44-generic 2.6.35.10
Uname: Linux 2.6.35-25-generic i686
Architecture: i386
Date: Sun Feb 27 15:06:19 2011
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_IN
 SHELL=/bin/bash
SourcePackage: software-center

Revision history for this message
ExperiencedNoobie (techie) wrote :
Revision history for this message
Aaron Peachey (aaronp) wrote :

Hi, thanks for reporting this issue.
Can you please try running Software Centrefrom the terminal without using sudo (i.e. just 'software-center') to see if the behaviour is the same as when you try to run it from the menu. If you experience the same behaviour, please come back and attach any terminal output which will hopefully help us look at the problem.
Thanks

Changed in software-center (Ubuntu):
status: New → Incomplete
Revision history for this message
ExperiencedNoobie (techie) wrote :

No, it does not open and gives this error:
WARNING:root:trying to fix not writable cache directory
ERROR:root:failed to fix not writable cache directory
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/paths.py", line 31, in try_to_fixup_root_owned_dir_via_remove
    os.rmdir(directory)
OSError: [Errno 39] Directory not empty: '/home/username/.cache/software-center'
Traceback (most recent call last):
  File "/usr/bin/software-center", line 38, in <module>
    import softwarecenter.log
  File "/usr/share/software-center/softwarecenter/log.py", line 94, in <module>
    backupCount=5)
  File "/usr/lib/python2.6/logging/handlers.py", line 112, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.6/logging/handlers.py", line 64, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.6/logging/__init__.py", line 827, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python2.6/logging/__init__.py", line 846, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/home/username/.cache/software-center/software-center.log'

But this used to work fine till like last month end, suddenly started crashing ...

Revision history for this message
Aaron Peachey (aaronp) wrote :

Thanks for the follow up. Did this start happening straight after you upgraded or just started happening?
It appears that the permissions may be incorrect on your .cache directory or sub-directories.

Could you please run the following commands in a terminal and attach the output here.
ls -l ~/.cache
ls -l ~/.cache/software-center

You can use sudo on these commands if you get permission denied errors.

We should be able to help you fix the problem but don't yet know what caused it to happen. It's possibly not a bug with Software Centre but something that has been caused by something else.
Do you recall doing any upgrades or changing anything when this started?
Do you have other permission issues with other programs or places in your home directory?

Revision history for this message
ExperiencedNoobie (techie) wrote :

Output of ls -l ~/.cache

Revision history for this message
ExperiencedNoobie (techie) wrote :

Output of ls -l ~/.cache/software-center

Revision history for this message
ExperiencedNoobie (techie) wrote :

No, it just started happening when I removed few junk programs (unwanted programs that I had installed) using software center. Normally I use apt-get or dpkg commands via terminal to remove and install stuff. But just to try software-center I gave it a try and since after that, its crashing.

Till now, I have not checked or known any permission issues, may be because I did not attempt to check or I dont know how to check...if there's one way to check all permissions ...

Revision history for this message
Aaron Peachey (aaronp) wrote :

Is your username for this system actually 'username' or did you mask it when you posted the output?
The issue is your software-center directory in the .cache directory is owned by root.

Try this command:

sudo chown -R username:username ~/.cache

Then try starting Software Centre. (Note the uppercase -R is important and also if your username is actually something else, replace it in the command)

Let us know if this fixes your problem

Revision history for this message
Aaron Peachey (aaronp) wrote :

Sorry missed a bit off that command. Do this instead:

sudo chown -R username:username ~/.cache/software-center

Revision history for this message
ExperiencedNoobie (techie) wrote :

Hey,
Thanks a ton .. now I can successfully open software-center without any problems :)

Thanks once again :)

I have another problem with my via chipsets .. do i have to create another bug in appropriate section??

Revision history for this message
Aaron Peachey (aaronp) wrote :

Glad to help. If you think of any more information that might help us to determine if this is a bug caused by Software Center (or perhaps anotherpackage), please report it back here. For now, I'm going to mark this as invalid.

In regards to your other bug, if it is just troubleshooting that you need, rather than raise a bug report try getting help somewhere such as Ubuntu Forums or on irc (#ubuntu channel on freenode). If it is actually a bug, then you should raise it as a new bug report.

Thanks!

Changed in software-center (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Sid Saxon (ssups) wrote :

I have followed this thread becasue I had similar problem , but it did not fix mine. :-(

Revision history for this message
Sid Saxon (ssups) wrote :

Sorry....printed retraction: I forgot to restart the system.....It did work. Thanks a ton Aaron P. you guys and gals are great and provide a great service for the Linux/Unix community. The world needs some ammo again monopolies like (ms) and others.

-sid

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.