REGRESSION: crash in cell renderer

Bug #1002271 reported by Michael Vogt on 2012-05-21
42
This bug affects 5 people
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Medium
Unassigned
Precise
Undecided
Unassigned

Bug Description

NOTE: This fix was actually released in software-center 5.2.2.1, but due to a copy error the changelog entry appears for this release too.

SRU TEST CASE:
1. Update to the version of software-center in precise-proposed.
2. Launch Ubuntu Software Center from a terminal window as shown:

  $ software-center

3. Navigate and view the details page for a few different packages. Choose packages from different categories, etc.
4. Verify that crash stacktrace shown below never appears in the terminal window.

SRU REGRESSION POTENTIAL:
Regression risk is negligible. This is a single line fix that checks for a zero-length string before calling capitalize() on it, and this prevents the crash reported in this bug.

NOTE also that since this fix has been released in Precise, the number of occurrances has dropped dramatically on errors.ubuntu.com.

---

From errors.ubuntu.com , this looks like a regression in the new capitalize code:

Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/ui/gtk3/widgets/cellrenderers.py", line 390, in do_render
    is_rtl)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/widgets/cellrenderers.py", line 165, in _render_summary
    layout.set_markup(self.model.get_markup(app), -1)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/models/appstore2.py", line 192, in get_markup
    summary = capitalize_first_word(self.db.get_summary(doc))
  File "/usr/share/software-center/softwarecenter/utils.py", line 128, in capitalize_first_word
    if string[0].isalpha() and not string[0].isupper():
IndexError: string index out of range

Related branches

Michael Vogt (mvo) wrote :

See:
 software-center 5.2.2

Changed in software-center (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
milestone: none → precise-updates

Hello Michael, or anyone else affected,

Accepted software-center into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Cedara (cedara2) wrote :

I was told that my recently submitted bug at https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/1004697 is a duplicate of this one.

Mine occured while I was browsing the software center in the category multimedia. No idea if that helps any way.

Dimitri John Ledkov (xnox) wrote :

How to test this on quantal?

I have installed the deb directly from precise-proposed.
Run software-centre from command line.
I get a different trace back, which is probably a separate bug, but I cannot verify a fix for this bug...

$ software-center
2012-05-29 08:45:10,336 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2012-05-29 08:45:10,340 - softwarecenter.db.database - INFO - open() database: path=None use_axi=True use_agent=True
2012-05-29 08:45:10,615 - softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file
2012-05-29 08:45:11,149 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open()
Traceback (most recent call last):
  File "/usr/bin/software-center", line 176, in <module>
    app.run(args)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1358, in run
    self.show_available_packages(args)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1288, in show_available_packages
    self.view_manager.set_active_view(ViewPages.AVAILABLE)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/session/viewmanager.py", line 149, in set_active_view
    view_widget.init_view()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/availablepane.py", line 133, in init_view
    SoftwarePane.init_view(self)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/softwarepane.py", line 234, in init_view
    self.datadir)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/appdetailsview.py", line 886, in __init__
    self._layout_page()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/appdetailsview.py", line 1185, in _layout_page
    self.pkg_statusbar = PackageStatusBar(self)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/appdetailsview.py", line 176, in __init__
    self.progress.set_data("transparent-bg-hint", True)
AttributeError: 'ProgressBar' object has no attribute 'set_data'

Marc Deslauriers (mdeslaur) wrote :

I have tested 5.2.2.1 in precise-proposed, and I can browse through categories fine.

Sebastien Bacher (seb128) wrote :

the update lacks a testcase to reproduce the issue but 5.2.2.1 works fine here (i.e no visible regression)

@Dmitrijs: the quantal issue is bug #1000238

C de-Avillez (hggdh2) wrote :

I do not see the issue anymore. Marking verification-done.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-center - 5.2.2.1

---------------
software-center (5.2.2.1) precise-proposed; urgency=low

  [ Gary Lasker ]
  * lp:~gary-lasker/software-center/toolbar-buttons-insensitive-during-startup:
    - re-enable the fix for LP: #999486, LP: #994341 that was inadvertently
      disabled in the 5.2.2 release

  [ Michael Vogt }
  * lp:~mvo/software-center/lp1002271:
    - fix regression in 5.2.2 (LP: #1002271) for empty descriptions
 -- Michael Vogt <email address hidden> Thu, 24 May 2012 09:30:16 +0200

Changed in software-center (Ubuntu):
status: In Progress → Fix Released
Gary Lasker (gary-lasker) wrote :

Thanks all for the comments and the verification!

Chris Halse Rogers (raof) wrote :

Hello Michael, or anyone else affected,

Accepted software-center into precise-proposed. The package will build now and be available in a few hours. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case details of your testing will help us make a better decision. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in software-center (Ubuntu Precise):
status: New → Fix Committed
tags: removed: verification-done
tags: added: verification-needed
description: updated
description: updated
Gary Lasker (gary-lasker) wrote :

NOTE: This fix was actually released in software-center 5.2.2.1, but due to a copy error the changelog entry appears for this release too.

Note also that since this fix has appeared in precise-updates, the number of occurances of this bug on errors.ubuntu.com has dropped dramatically and should go to zero as more people update to the fixed version.

Based on this I'll mark this as verification-done, for the purposes of the current SRU.

Thanks!

tags: added: verification-done
removed: verification-needed
Download full text (5.0 KiB)

Sure thank you.

On 6/20/12, Gary Lasker <email address hidden> wrote:
> NOTE: This fix was actually released in software-center 5.2.2.1, but due
> to a copy error the changelog entry appears for this release too.
>
> Note also that since this fix has appeared in precise-updates, the
> number of occurances of this bug on errors.ubuntu.com has dropped
> dramatically and should go to zero as more people update to the fixed
> version.
>
> Based on this I'll mark this as verification-done, for the purposes of
> the current SRU.
>
> Thanks!
>
> ** Description changed:
>
> + SRU TEST CASE:
> + 1. Update to the version of software-center in precise-proposed.
> + 2. Launch Ubuntu Software Center from a terminal window as shown:
>
> - From errors.ubuntu.com , this looks like a regression in the new
> capitalize code:
> + $ software-center
> +
> + 3. Navigate and view the details page for a few different packages. Choose
> packages from different categories, etc.
> + 4. Verify that crash stacktrace shown below never appears in the terminal
> window.
> +
> + SRU REGRESSION POTENTIAL:
> + Regression risk is negligible. This is a single line fix that checks for a
> zero-length string before calling capitalize() on it, and this prevents the
> crash reported in this bug.
> +
> + ---
> +
> + From errors.ubuntu.com , this looks like a regression in the new
> + capitalize code:
>
> Traceback (most recent call last):
> - File
> "/usr/share/software-center/softwarecenter/ui/gtk3/widgets/cellrenderers.py",
> line 390, in do_render
> - is_rtl)
> - File
> "/usr/share/software-center/softwarecenter/ui/gtk3/widgets/cellrenderers.py",
> line 165, in _render_summary
> - layout.set_markup(self.model.get_markup(app), -1)
> - File
> "/usr/share/software-center/softwarecenter/ui/gtk3/models/appstore2.py",
> line 192, in get_markup
> - summary = capitalize_first_word(self.db.get_summary(doc))
> - File "/usr/share/software-center/softwarecenter/utils.py", line 128, in
> capitalize_first_word
> - if string[0].isalpha() and not string[0].isupper():
> +   File
> "/usr/share/software-center/softwarecenter/ui/gtk3/widgets/cellrenderers.py",
> line 390, in do_render
> +     is_rtl)
> +   File
> "/usr/share/software-center/softwarecenter/ui/gtk3/widgets/cellrenderers.py",
> line 165, in _render_summary
> +     layout.set_markup(self.model.get_markup(app), -1)
> +   File
> "/usr/share/software-center/softwarecenter/ui/gtk3/models/appstore2.py",
> line 192, in get_markup
> +     summary = capitalize_first_word(self.db.get_summary(doc))
> +   File "/usr/share/software-center/softwarecenter/utils.py", line 128, in
> capitalize_first_word
> +     if string[0].isalpha() and not string[0].isupper():
> IndexError: string index out of range
>
> ** Description changed:
>
> +
> + NOTE: This fix was actually released in software-center 5.2.2.1, but due
> to a copy error the changelog entry appears for this release too.
> +
> SRU TEST CASE:
> 1. Update to the version of software-center in precise-proposed.
> 2. Launch Ubuntu Software Center from a terminal window as shown:
>
> - $ software-center
> +   $ software-center
>
> 3. Navigate and view the d...

Read more...

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-center - 5.2.3

---------------
software-center (5.2.3) precise-proposed; urgency=low

  [ Robert Roth ]
  * lp:~evfool/software-center/lp987801:
    - Only show the version label once for each version in
      reviews (LP: #987801)
  * lp:~evfool/software-center/lp874430:
    - display tooltips for package titles in the application
      tiles of the lobby view (LP: #874430)
  * lp:~evfool/software-center/lp983831:
    - Avoid merging two words while normalizing description (LP: #983831)
  * lp:~evfool/software-center/lp822625:
    - Set default value for reviewstats histogram (LP: #822625)
  * lp:~evfool/software-center/lp875874:
    - Set word wrap with fallback to char wrapping for the review
      text label (LP: #875874)

  [ Gabor Kelemen ]
  * lp:~kelemeng/software-center/bug1001746:
    - merge i18n fix (LP: #1001746)

  [ Michael Vogt ]
  * lp:~mvo/software-center/lp872760-for-5.2:
    - fix translations for certain category names (LP: #872760)
  * lp:~mvo/software-center/lp987321:
    - fix dependency to ensure that we have humanity-icon-theme
      as we need it for the history view icons (LP: #987321)
  * lp:~mvo/software-center/test-catview-cleanup:
    - refactor unit tests for the catview
  * lp:~mvo/software-center/lp1002271:
    - fix regresion in 5.2.2 (LP: #1002271) for empty descriptions
  * lp:~mvo/software-center/lp1005104:
    - fix regression in 5.2.2 (LP: #1005104) in initial navigation
      history
  * lp:~mvo/software-center/client-lp1004417:
    - client side fix for when exhibit package names contain
      extra whitespace (LP: #1004417)

  [ Gary Lasker ]
  * lp:~gary-lasker/software-center/fix-crash-lp1000238:
    - remove obsolete workaround for an old bug that has long since
      been fixed, this fixes a hard crash on Quantal (LP: #1000238)
  * lp:~gary-lasker/software-center/toolbar-buttons-insensitive-during-startup:
    - re-enable the fix for LP: #999486, LP: #994341 that was inadvertently
      disabled in the 5.2.2 release

  [ Natalia Bidart ]
  * lp:~nataliabidart/software-center/fix-977931:
    - Unified package string parsing into a single method that will be
      used from either the command line arguments, or from the dbus method
      'bringToFront'. This way, search will be consistent between all
      entry points. LP: #977931
    - Also added proper test suites for the above.
  * lp:~nataliabidart/software-center/fix-965093:
    - Fixed the SpinnerNtebook show_spinner method so the spinner page is
      not shown until the configured threshold is reached (250ms since
      this branch). Plus proper test suite was added.
  * lp:~nataliabidart/software-center/fix-986563:
    - Filtered out those exhibits that do not their packages available
      in the db (LP: #986563)
 -- Michael Vogt <email address hidden> Mon, 04 Jun 2012 08:53:25 +0200

Changed in software-center (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers