GNOME Bugzilla – Bug 436230
Crash during printing: TypeError
Last modified: 2010-04-07 23:03:23 UTC
What were you doing when the application crashed? I was trying to print multiples sudokus. Hang out happened when clicked "print preview" button. Distribution: Ubuntu 7.04 (feisty) Gnome Release: 2.18.1 2007-04-10 (Ubuntu) BugBuddy Version: 2.18.1 System: Linux 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 X Vendor: The X.Org Foundation X Vendor Release: 70200000 Selinux: No Accessibility: Disabled GTK+ Theme: Human Icon Theme: Human Memory status: size: 0 vsize: 0 resident: 0 share: 0 rss: 0 rss_rlim: 0 CPU usage: start_time: 0 rtime: 0 utime: 0 stime: 0 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 0 ----------- .xsession-errors (10 sec old) --------------------- (gnome-sudoku:5967): GnomePrint-CRITICAL **: gnome_print_filter_reset: assertion `GNOME_IS_PRINT_FILTER (f)' failed (gnome-sudoku:5967): GnomePrint-CRITICAL **: gnome_print_filter_flush: assertion `GNOME_IS_PRINT_FILTER (f)' failed /usr/lib/python2.5/site-packages/gnome_sudoku/gnome_sudoku.py:988: Warning: g_object_set: assertion `G_IS_OBJECT (object)' failed gtk.main() ** (gnome-sudoku:5967): WARNING **: could not set the value of Settings.Document.Filter, node not found Traceback (most recent call last):
+ Trace 132631
if not self.drawn: self.draw_sudokus()
dimensions,square_size = fit_squares_in_rectangle(width,height,self.sudokus_per_page,self.margin)
-------------------------------------------------- Traceback (most recent call last):
Are you able to reliably reproduce this? I tried but it works for me
*** Bug 470814 has been marked as a duplicate of this bug. ***
*** Bug 475687 has been marked as a duplicate of this bug. ***
No, I'm not able to reproduce the error now ...
did you upgrade gnome-games since you experienced the bug?
Probably I did, because I use to accept every automatic update warning. The problem has disappeared, if it comes back I will provide better information. Thank you for the time dedicated to this issue.
*** Bug 514824 has been marked as a duplicate of this bug. ***
*** Bug 518412 has been marked as a duplicate of this bug. ***
*** Bug 522635 has been marked as a duplicate of this bug. ***
*** Bug 522788 has been marked as a duplicate of this bug. ***
*** Bug 544981 has been marked as a duplicate of this bug. ***
This bug can be easily and always reproduced on my gnome (gnome-dev-kit, with newest gnome-games). Just try to
I am so sorry, I promise I didn't click the 'save changes'.. Just try to print multiple sudokus, no matter when I haven't choose a game or already in one. Here are some points I find about the printing issue. 1. in printing.py==SudokuDrawer==draw_sudokus(), self.sudokus_per_per_page is not updated. It remains -1 (in each condition, print one or multiple). 1). main.py:print_game() should offer an argument of 1 to sudokus_per_page (of printing.print_sudokus), not using default (-1). 2). In game_selector.GamePrinter.response_cb, self.sudokusPerPageSpinButton.get_adjustment().get_value() returns -1.0, not the right value from the dialog. 2. In printing.py :draw_sudokus : "if not self.sudokus_per_page" is not proper, since "if -1" evaluates to True. Changing the test to 'if self.sudokus_per_page <=0" will no longer crash Sudoku when trying to print multiple games. But it will ignore the setting of sudokus_per_page, because of the first point. 3. other apps use the same printer among them, firefox, eye of gnome, evolution, gedit. What's the one sudoku uses? Are they different? And it seems to be the gnomeprint.Job in printing.py==SudokuPrinter.__init__ that generates all the never-stopped warnings: ** (gnome-sudoku.in.in:8147): WARNING **: IPP request failed with status 1030 With other applications, their printers don't generate one error. ** (gnome-sudoku.in.in:8147): WARNING **: could not set the value of Settings.Document.Filter, node not found
Seems "sudokusPerPageSpinButton.get_adjustment().get_value()" always return -1, and the up/down doesn't work however you press the arrow buttons. It, together with the "if not self.sudokus_per_page" test, result in sudokus_per_page staying at -1 and so fit_squares_in_rectangle returning None, and so the exception "'NoneType' object is not iterable" ( which is now updated to unpack non-sequence ). To prove the sudokusPerPageSpinButton behaves bad, I connected a callback to each of sudokusPerPageSpinButton and sudokusToPrintSpinButton, answering to 'value_changed' signal. The later works well but the first's callback is never called, i.e. the value stays -1. I think fixing the sudokusPerPageSpinButton will do the work, but I can't find the code to modify.
I changed back from gnome-dev-kit to foresight, so from bleeding edge back to stable. I am disappointed (or delighted?) to find that the sudokusPerPageSpinButton works perfect.. It no longer crashes.. (but the error msg 'IPP request failed with status 1030 still appears' ( because I have no real printer?)) Sorry for these many comments without fixing the problem. Maybe it has something to do with gtk.
There has been a change in gtk to gtkadjustment that might have caused some of the problems here. I'm attaching a patch that should fix the problem. Could you test that one Zhang? Gnome-sudoku currently uses and old soon-to-be-deprecated method for printing. We should port to use gtkprint instead. That should hopefully fix all our current printing problems. If the patch fixes the problems with the spinbutton I suggest we put that in 2.24.1 and port over to gtkprint in 2.25.1.
Created attachment 119119 [details] [review] set page_size to 0
Sorry Thomas, but I now have no current-version gnome, now it's 2.22.3 on foresight linux (2.24 should come soon?). Spinbutton already works well, and also no problem after your patch. But these errors still appears: ** (gnome-sudoku.in.in:5106): WARNING **: IPP request failed with status 1030 ** (gnome-sudoku.in.in:5106): WARNING **: could not set the value of Settings.Document.Filter, node not found You mean porting to gtkprint could possibly fix these errors? Maybe I should again set up Developers Kit.
*** Bug 549013 has been marked as a duplicate of this bug. ***
I committed the patch to fix the spin buttons in the print dialog. We should definitely port to using gtkprint in 2.25.
*** Bug 572378 has been marked as a duplicate of this bug. ***
sudoku was ported to gtk-print in trunk (will be 2.27.1). Could someone test if the problem is still there?
*** Bug 581170 has been marked as a duplicate of this bug. ***
Closing as there have been no noise here since the port to gtk-print.