Bug 106478 - Editing TUI created printer in GUI causes crash
Summary: Editing TUI created printer in GUI causes crash
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: redhat-config-printer
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-07 16:07 UTC by Adam H. Pendleton
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: 0.6.78-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-10-09 10:48:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Output from printconf-tui (1.74 KB, text/plain)
2003-10-07 16:40 UTC, Adam H. Pendleton
no flags Details
printconf_tui.py (65.88 KB, text/plain)
2003-10-08 13:43 UTC, Tim Waugh
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:071 0 normal SHIPPED_LIVE Updated printer configuration tool fixes sharing problems 2004-05-12 04:00:00 UTC

Description Adam H. Pendleton 2003-10-07 16:07:04 UTC
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 16:33:39 UTC
Please attach the output of 'printconf-tui --Xexport', taking care to censor any
passwords it contains.

Comment 2 Adam H. Pendleton 2003-10-07 16:40:41 UTC
Created attachment 94990 [details]
Output from printconf-tui

Comment 3 Tim Waugh 2003-10-07 16:57:00 UTC
I can't reproduce this problem here.

Comment 4 Adam H. Pendleton 2003-10-07 17:14:05 UTC
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 11:18:10 UTC
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 12:55:57 UTC
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 13:43:56 UTC
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 14:03:53 UTC
That fixed it!

Comment 9 John Flanagan 2004-05-12 04:42:13 UTC
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.