Thanks for this! I already fixed that a while ago in
http://bazaar.launchpad.net/~apport-hackers/apport/trunk/revision/2516 ,
so it is fixed Apport 2.6.2 and thus in Raring.

** Changed in: apport (Ubuntu)
       Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/1055110

Title:
  apport-retrace crashed with AttributeError in join(): 'NoneType'
  object has no attribute 'endswith'

Status in “apport” package in Ubuntu:
  Fix Released

Bug description:
  I'm on Ubuntu 12.10 Beta 1 (upgraded from 12.04) using apport-retrace
  2.5.2-0ubuntu4. I initially tried to run apport-retrace to regenerate
  a stack trace from a .crash file in /var/crash (sending it to stdout),
  using the following command:

  apport-retrace --stdout /var/crash/_usr_bin_nautilus.1000.crash

  Instead of producing the expected result (the trace printed on
  stdout), it crashed ungracefully with the following traceback:

  Traceback (most recent call last):
    File "/usr/bin/apport-retrace", line 464, in <module>
      apt_root = os.path.join(options.cache, report['DistroRelease'], 'apt')
    File "/usr/lib/python2.7/posixpath.py", line 77, in join
      elif path == '' or path.endswith('/'):
  AttributeError: 'NoneType' object has no attribute 'endswith'

  I tried running apport-retrace with a few other options (e.g., -o, to
  output to a file; I am *very much* a newbie here, so I was
  experimenting a bit), and they all seemed to result in the same crash
  *unless* I also specified that apport-retrace should use a sandbox
  (using the -S or --sandbox option). Having discovered that, I took a
  look at the code and noticed that options.cache only gets assigned --
  at least if you don't manually assign it yourself from the command
  line -- if you are using a sandbox; if you do not specify the sandbox
  option, options.cache is never assigned and is instead of type 'None',
  which results in the above crash when apport-retrace attempts to pass
  options.cache as the first argument for os.path.join().

  I was able to prevent this behavior with a quick patch that forces
  apport-retrace to assign something to options.cache even when the
  sandbox option is not specified (and even when you do not manually
  assign something from the command line). The patch, which I have
  attached, is *utterly* simplistic and, for all I know, might still be
  producing unwanted behavior -- I emphasize again that I am a total
  newbie to apport-retrace and at this point have virtually no
  understanding of its inner workings (plus, I happen to be in a bit of
  a hurry at the moment, unfortunately!). All that the patch does is
  "plug the hole," so to speak, by assigning something to options.cache
  even when the sandbox option is not specified, thereby allowing
  apport-retrace to exit with a seemingly-appropriate error message
  rather than simply crashing. Probably, it would be better if it did
  something a bit more helpful, though. In any case, I'm hoping that it
  might be of some small help; the behavior now produced seems at least
  marginally better than the total crash. (I'm also hoping that the
  crash didn't occur simply because I did something dumb and was
  supposed to specify a cache file from the command line in the first
  place -- again, I don't know much about apport-retrace at all! -- but,
  even so, an error message in that case would be better than a crash.)

  ProblemType: Crash
  DistroRelease: Ubuntu 12.10
  Package: apport-retrace 2.5.2-0ubuntu4
  ProcVersionSignature: Ubuntu 3.5.0-15.22-generic 3.5.4
  Uname: Linux 3.5.0-15-generic x86_64
  ApportLog:
   
  ApportVersion: 2.5.2-0ubuntu4
  Architecture: amd64
  CrashCounter: 1
  Date: Sun Sep 23 11:57:27 2012
  ExecutablePath: /usr/bin/apport-retrace
  ExecutableTimestamp: 1348122314
  InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 
(20120823.1)
  InterpreterPath: /usr/bin/python2.7
  PackageArchitecture: all
  ProcCmdline: /usr/bin/python /usr/bin/apport-retrace -o 
nautilus_crash_retrace.txt /var/crash/_usr_bin_nautilus.1000.crash
  ProcCwd: /home/jrogers
  ProcEnviron:
   TERM=xterm
   SHELL=/bin/bash
   PATH=(custom, no user)
   LANG=en_US.UTF-8
  PythonArgs: ['/usr/bin/apport-retrace', '-o', 'nautilus_crash_retrace.txt', 
'/var/crash/_usr_bin_nautilus.1000.crash']
  SourcePackage: apport
  Title: apport-retrace crashed with AttributeError in join(): 'NoneType' 
object has no attribute 'endswith'
  UpgradeStatus: Upgraded to quantal on 2012-09-15 (8 days ago)
  UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1055110/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to