Bug 336791 - Pirut crashes when double clicking item
Pirut crashes when double clicking item
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: pirut (Show other bugs)
rawhide
x86_64 Linux
medium Severity high
: ---
: ---
Assigned To: Jeremy Katz
Fedora Extras Quality Assurance
:
: 327141 354751 354761 360481 365481 368201 374211 376381 425793 427139 428659 436231 441422 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-17 18:11 EDT by Christian Anthon
Modified: 2008-04-07 23:16 EDT (History)
16 users (show)

See Also:
Fixed In Version: 1.3.28
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-12-31 09:52:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Dump Created when trying to install webmin (124.24 KB, application/x-rpm)
2007-11-19 02:53 EST, Craig Lindley
no flags Details
Dump Created when trying to install webmin (124.24 KB, text/plain)
2007-11-19 03:00 EST, Craig Lindley
no flags Details

  None (edit)
Description Christian Anthon 2007-10-17 18:11:04 EDT
Description of problem:

Pirut crashes when double clicking an item in optional packages.

Steps to Reproduce:
1. Open optional packages for any group
2. Double click
3.
  
Actual results:

Component: pirut
Summary: TB91835f44 GroupSelector.py:211:_pkgToggled:TypeError:
GtkTreeModel.get_iter_from_string() argument 1 must be string, not tuple

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/pirut/GroupSelector.py", line 208, in
_rowToggle
    self._pkgToggled(None, path)
  File "/usr/lib/python2.5/site-packages/pirut/GroupSelector.py", line 211, in
_pkgToggled
    i = self.pkgstore.get_iter_from_string(path)
TypeError: GtkTreeModel.get_iter_from_string() argument 1 must be string, not tuple

Local variables in innermost frame:
path: (3,)
widget: None
self: <pirut.GroupSelector.OptionalPackageSelector instance at 0x3e4f7e8>
Comment 1 Christian Anthon 2007-10-17 18:33:54 EDT
Proposed patch:

211c211,214
<         i = self.pkgstore.get_iter_from_string(path)
---
>         if type(path) == type(str):
>             i = self.pkgstore.get_iter_from_string(path)
>         else:
>             i = self.pkgstore.get_iter(path)
Comment 2 Jeremy Katz 2007-10-17 21:19:55 EDT
Thanks for the patch.  Applied in git and will be in 1.3.26
Comment 3 Jeremy Katz 2007-10-28 14:13:58 EDT
*** Bug 354751 has been marked as a duplicate of this bug. ***
Comment 4 Jeremy Katz 2007-10-28 14:14:23 EDT
*** Bug 354761 has been marked as a duplicate of this bug. ***
Comment 5 Jeremy Katz 2007-10-31 13:14:50 EDT
*** Bug 360481 has been marked as a duplicate of this bug. ***
Comment 6 Jeremy Katz 2007-11-05 10:44:30 EST
*** Bug 365481 has been marked as a duplicate of this bug. ***
Comment 7 Flávio Martins 2007-11-09 15:47:38 EST
Just fixed this in another way before searching in bugzilla.
Posting here for reference.

--- GroupSelector.py    2007-11-09 20:35:38.000000000 +0000
+++ /usr/lib/python2.5/site-packages/pirut/GroupSelector.py     2007-11-09
20:36:21.000000000 +0000
@@ -205,7 +205,7 @@
         self.pkgstore.set_sort_column_id(1, gtk.SORT_ASCENDING)
 
     def _rowToggle(self, tree, path, col):
-        self._pkgToggled(None, path)
+        self._pkgToggled(None, str(path[0]))
 
     def _pkgToggled(self, widget, path):
         i = self.pkgstore.get_iter_from_string(path)
Comment 8 Flávio Martins 2007-11-09 15:54:58 EST
Would something like this be a better option?

--- GroupSelector.py    2007-11-09 20:35:38.000000000 +0000
+++ /usr/lib/python2.5/site-packages/pirut/GroupSelector.py     2007-11-09
20:52:18.000000000 +0000
@@ -208,7 +208,10 @@
         self._pkgToggled(None, path)
 
     def _pkgToggled(self, widget, path):
-        i = self.pkgstore.get_iter_from_string(path)
+        try:
+            i = self.pkgstore.get_iter_from_string(path)
+        except TypeError:
+            i = self.pkgstore.get_iter(path)
         sel = self.pkgstore.get_value(i, 0)
         pkg = self.pkgstore.get_value(i, 2).returnSimple('name')
         if sel and not self.ayum.simpleDBInstalled(name = pkg):
Comment 9 Steven Bakker 2007-11-10 12:34:57 EST
My €0.014
Not sure whether this bug should be marked with priority "Low", since it also
shows up in the installer on the F8 DVD. It consistently crashes the installer
and requires a reboot and running through the whole process again.

This is even worse if you don't have (or want to use) your mouse, as I was
scrolling through the package list with the cursor list and hitting "space".
Depending on whether the checkbox in front of the package name has the focus or
the package name, you either (de-)select the package or crash the installer.
Comment 10 Jeremy Katz 2007-11-12 11:03:13 EST
*** Bug 374211 has been marked as a duplicate of this bug. ***
Comment 11 Jeremy Katz 2007-11-12 11:27:33 EST
*** Bug 376381 has been marked as a duplicate of this bug. ***
Comment 12 Jeremy Katz 2007-11-12 13:37:13 EST
*** Bug 368201 has been marked as a duplicate of this bug. ***
Comment 13 Cristian Ciupitu 2007-11-13 16:14:51 EST
  Flávio, how about this? In
"/usr/lib/python2.5/site-packages/pirut/GroupSelector.py":

    def _pkgToggled(self, widget, path):
        i = self.pkgstore.get_iter_from_string(path)

should be replaced with:

    def _pkgToggled(self, widget, path):
        i = self.pkgstore.get_iter(path)

because the "row-activated" signal of GtkTree returns a path not a string
representation of a path. See
http://www.pygtk.org/docs/pygtk/class-gtktreeview.html#signal-gtktreeview--row-activated
and
http://pygtk.org/pygtk2reference/class-gtktreemodel.html#method-gtktreemodel--get-iter.
Comment 14 Chris Lumens 2007-11-14 14:53:28 EST
*** Bug 327141 has been marked as a duplicate of this bug. ***
Comment 15 Craig Lindley 2007-11-19 02:53:43 EST
Created attachment 263321 [details]
Dump Created when trying to install webmin
Comment 16 Craig Lindley 2007-11-19 03:00:23 EST
Created attachment 263331 [details]
Dump Created when trying to install webmin
Comment 17 Cristian Ciupitu 2007-11-19 17:11:55 EST
Craig Lindley, just my 2 cents,

I think that while your report bug is a pirut bug, it has nothing to do with the
current bug.  If this is true, you should add your comments to the proper bug
(one with a "maximum recursion depth exceeded" error message) if it already
exists or report a new bug.

Comment 18 Fedora Update System 2007-11-20 12:49:55 EST
pirut-1.3.26-1.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update pirut'
Comment 19 Cristian Ciupitu 2007-11-22 09:35:45 EST
This version seems to be working fine.
Comment 20 Rohan Dhruva 2007-11-22 16:05:58 EST
Yes, this version - pirut-1.3.26-1.fc8 - works fine for me too. Double click on
an item checks/unchecks it.
Comment 21 Fedora Update System 2007-11-28 20:33:52 EST
pirut-1.3.27-1.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update pirut'
Comment 22 Fedora Update System 2007-12-06 15:45:19 EST
pirut-1.3.28-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 23 Fedora Update System 2007-12-06 15:54:58 EST
pirut-1.3.28-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 24 Jeremy Katz 2007-12-15 16:59:40 EST
*** Bug 425793 has been marked as a duplicate of this bug. ***
Comment 25 Jeremy Katz 2007-12-31 09:52:04 EST
New versions of pirut have been released that should address these issues
Comment 26 Jeremy Katz 2008-01-01 10:22:25 EST
*** Bug 427139 has been marked as a duplicate of this bug. ***
Comment 27 Jeremy Katz 2008-01-14 10:46:57 EST
*** Bug 428659 has been marked as a duplicate of this bug. ***
Comment 28 Jeremy Katz 2008-03-05 20:46:22 EST
*** Bug 436231 has been marked as a duplicate of this bug. ***
Comment 29 Jeremy Katz 2008-04-07 23:16:18 EDT
*** Bug 441422 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.