Red Hat Bugzilla – Bug 783080
using GtkTreeModelFilter on x86_64 causes tracebacks
Last modified: 2013-03-13 00:52:07 EDT
Created attachment 556229 [details]
Python code of the reproducer
Description of problem:
When using the GtkTreeModelFilter (see the attached reproducer), the following traceback appears for every item in the model:
Traceback (most recent call last):
File "treeview_filter.py", line 7, in match_ahoj
value = model.get_value(itr, 0)
File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 977, in get_value
return self._decode_value(treeiter, column, value)
File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 803, in _decode_value
value = value.decode('UTF-8')
AttributeError: 'NoneType' object has no attribute 'decode'
This only happens on x86_64 architecture, on i686 there are no tracebacks. It may be caused by some other point in the "Python-to-Gtk3 chain" pygobject is just the first suspected.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. run the attached reproducer on x86_64 system
No traceback would appear.
Created attachment 556230 [details]
Glade file for the reproducer
As an additional data point, this was working for me on rawhide until I upgraded just now. The previously working version of pygobject3 was pygobject3-2.90.4-1.fc17.x86_64. Sorry, I do not know the versions of the gobject-introspection-* packages. However, here's everything that was updated:
Jan 25 09:49:58 Updated: gobject-introspection-1.31.10-1.fc17.x86_64
Jan 25 09:50:00 Updated: gobject-introspection-devel-1.31.10-1.fc17.x86_64
Jan 25 09:50:02 Updated: pygobject3-3.0.3-2.fc17.x86_64
Jan 25 09:50:03 Updated: pygobject3-devel-3.0.3-2.fc17.x86_64
Can you do a downgrade to see if it fixes the issue?
Downgrading to pygobject3.x86_64 0:3.0.1-1.fc16 (without downgrading anything else) fixes this issue.
Any idea? This bug blocks development of a part of the new UI for Anaconda. Since this is a regression, could you please at worse release a new version of pygobject3 with the old code?
Ah this is the bug I had asked Chris about yesterday and we couldn't quite recall it. Anyway I see the commit that caused this:
+ def _decode_value(self, treeiter, column, value):
+ type_ = self.get_column_type(column)
+ if type_ == GObject.TYPE_STRING and sys.version_info < (3, 0):
+ value = value.decode('UTF-8')
+ return value
I guess we can simply add a check for None there assuming None is a valid value for a string.
Created attachment 559376 [details]
Don't try to convert a string value that is set to None
Apply that patch to the package and see if it fixes your issues
Yes, the proposed patch fixes the issue. I don't know how can None get there, but this works for me.
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '16'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 16's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 16 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" and open it against that version of Fedora.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.