Bug 521591 - ibus: check if the icon filename is a real file before trying to open it
ibus: check if the icon filename is a real file before trying to open it
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: ibus (Show other bugs)
11
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peng Huang
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-07 03:31 EDT by Harshula Jayasuriya
Modified: 2009-09-15 02:19 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-15 02:19:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Check if the icon member variable is an empty string and whether it maps to a real file. (1.05 KB, patch)
2009-09-07 03:33 EDT, Harshula Jayasuriya
no flags Details | Diff

  None (edit)
Description Harshula Jayasuriya 2009-09-07 03:31:21 EDT
Description of problem:
* In ui/gtk/engineabout.py, the existing code assumes self.__engine_desc.icon contains a valid path to the icon file. However, some engines may not have an icon file, hence the variable can be empty. We need to check the variable before using it.

Version-Release number of selected component (if applicable):
* ibus-1.1.0.20090612-3.fc11.x86_64

How reproducible:
* Always

Steps to Reproduce:
1. Run ibus-setup
2. Click on the "Input Methods" tab and select an input method without its own icon
3. Press the "About" button
  
Actual results:
------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hjayasur/ibus-root/share/ibus/setup/main.py", line 201, in __button_engine_about_cb
    about = EngineAbout(engine)
  File "/home/hjayasur/ibus-root/share/ibus/setup/engineabout.py", line 36, in __init__
    self.__init_ui()
  File "/home/hjayasur/ibus-root/share/ibus/setup/engineabout.py", line 50, in __init_ui
    self.__fill_text_view()
  File "/home/hjayasur/ibus-root/share/ibus/setup/engineabout.py", line 59, in __fill_text_view
    text_buffer.insert_pixbuf(iter, self.__load_icon(self.__engine_desc.icon))
  File "/home/hjayasur/ibus-root/share/ibus/setup/engineabout.py", line 92, in __load_icon
    pixbuf = gdk.pixbuf_new_from_file(icon)
glib.GError: Failed to open file '': No such file or directory
------------------------------------------------------------

Expected results:
* Display the "About" window
Comment 1 Harshula Jayasuriya 2009-09-07 03:33:11 EDT
Created attachment 359957 [details]
Check if the icon member variable is an empty string and whether it maps to a real file.
Comment 2 Peng Huang 2009-09-09 02:53:45 EDT
This problem has been fixed in upstream. I will build it for rawhide soon.
Comment 3 Peng Huang 2009-09-15 02:19:42 EDT
Fixed in ibus-1_2_0_20090915-1_fc12

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