Bug 106478 - Editing TUI created printer in GUI causes crash
Editing TUI created printer in GUI causes crash
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: redhat-config-printer (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-07 12:07 EDT by Adam H. Pendleton
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 0.6.78-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-10-09 06:48:03 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)
Output from printconf-tui (1.74 KB, text/plain)
2003-10-07 12:40 EDT, Adam H. Pendleton
no flags Details
printconf_tui.py (65.88 KB, text/plain)
2003-10-08 09:43 EDT, Tim Waugh
no flags Details

  None (edit)
Description Adam H. Pendleton 2003-10-07 12:07:04 EDT
Description of problem:

After adding a SMB printer via redhat-config-printer-tui, running
redhat-config-printer, selecting that printer, and clicking Edit causes
redhat-config-printer to crash.

Version-Release number of selected component (if applicable):

redhat-config-printer-0.6.76-1

How reproducible:

always

Steps to Reproduce:
1. Attach to SMB printer with redhat-config-printer-tui.
2. Run redhat-config-printer (the GUI).
3. Select printer created in #1.
4. Click edit.
    
Actual results:

redhat-config-printer crashes.

Expected results:

printer edit dialog

Additional info:

Traceback from crash:

Traceback (most recent call last):
  File "/usr/share/printconf/util/queueTree.py", line 558, in edit_button_clicked
    if self.editQueue.editQueueDialog (iter):
  File "/usr/share/printconf/util/editQueue.py", line 425, in editQueueDialog
    self.select_printer_iter (iter)
  File "/usr/share/printconf/util/editQueue.py", line 498, in select_printer_iter
    self.printer_view.get_selection ().select_iter (iter)
TypeError: iter should be a GtkTreeIter
Comment 1 Tim Waugh 2003-10-07 12:33:39 EDT
Please attach the output of 'printconf-tui --Xexport', taking care to censor any
passwords it contains.
Comment 2 Adam H. Pendleton 2003-10-07 12:40:41 EDT
Created attachment 94990 [details]
Output from printconf-tui
Comment 3 Tim Waugh 2003-10-07 12:57:00 EDT
I can't reproduce this problem here.
Comment 4 Adam H. Pendleton 2003-10-07 13:14:05 EDT
Hmmm.  Still happens to me, even after reebot.  I assume you're trying to edit a
SMB printer, so it's probably not related to that.  Could it be related to Bug
#106395 (my other redhat-config-printer bug)?  Is there any other information I
can provide to help (e.g. strace, etc.)?
Comment 5 Tim Waugh 2003-10-08 07:18:10 EDT
Could you try editing /usr/share/printconf/util/queueTree.py and adding this
line at 558:

        ...
        self.use_foomatic ()
        print iter
        if self.editQueue.editQueueDialog (iter):
        ...

Then run 'printconf-gui' from the command line and let me know what it says
before the traceback.
Comment 6 Adam H. Pendleton 2003-10-08 08:55:57 EDT
The result from redhat-config-printer now looks like:

<GtkTreeIter at 0x848ed90>
Traceback (most recent call last):
  File "/usr/share/printconf/util/queueTree.py", line 559, in edit_button_clicked
    if self.editQueue.editQueueDialog (iter):
  File "/usr/share/printconf/util/editQueue.py", line 425, in editQueueDialog
    self.select_printer_iter (iter)
  File "/usr/share/printconf/util/editQueue.py", line 498, in select_printer_iter
    self.printer_view.get_selection ().select_iter (iter)
TypeError: iter should be a GtkTreeIter

If I add "print iter" calls on editQueue.py lines 498 and 425, before the calls
in the above traceback, I get:

<GtkTreeIter at 0x8490d18>
None
None
Traceback (most recent call last):
  File "/usr/share/printconf/util/queueTree.py", line 559, in edit_button_clicked
    if self.editQueue.editQueueDialog (iter):
  File "/usr/share/printconf/util/editQueue.py", line 426, in editQueueDialog
    self.select_printer_iter (iter)
  File "/usr/share/printconf/util/editQueue.py", line 500, in select_printer_iter
    self.printer_view.get_selection ().select_iter (iter)
TypeError: iter should be a GtkTreeIter

Line 421 of editQueue.py is:

iter = self.parent.populate_model_store (self.printer_store,
                                                 self.queue,
                                                 id_dict = self.id_to_iter,
                                                 window = self.window.window)

It would appear that functions is returning a NULL value.
Comment 7 Tim Waugh 2003-10-08 09:43:56 EDT
Created attachment 95018 [details]
printconf_tui.py

Please put this file in /usr/share/printconf/util/printconf_tui.py.  Then run
printconf-tui, and exit, then printconf-gui.  I think this is the fix.
Comment 8 Adam H. Pendleton 2003-10-08 10:03:53 EDT
That fixed it!
Comment 9 John Flanagan 2004-05-12 00:42:13 EDT
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-071.html

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