After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 401411 - Ctrl-C in gnome-terminal crashes the game
Ctrl-C in gnome-terminal crashes the game
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: gnome-sudoku
2.19.x
Other All
: High major
: gnome-2-20
Assigned To: GNOME Games maintainers
GNOME Games maintainers
: 412480 439698 460426 523321 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-01-27 18:29 UTC by Andreas Røsdal
Modified: 2008-03-19 12:28 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20



Description Andreas Røsdal 2007-01-27 18:29:14 UTC
What were you doing when the application crashed?
1. Run gnome-sudoku from gnome-terminal
2. In the terminal, press Ctrl-C.
3. Gnome-sudoku crashes.


Distribution: openSUSE 10.2 (i586)
Gnome Release: 2.16.1 2006-11-28 (SUSE)
BugBuddy Version: 2.17.3

System: Linux 2.6.18.2-34-default #1 SMP Mon Nov 27 11:46:27 UTC 2006 i686
X Vendor: The X.Org Foundation
X Vendor Release: 70199902
Selinux: No
Accessibility: Disabled
GTK+ Theme: Gilouche
Icon Theme: Industrial

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 (1126 sec old) ---------------------
Initializing nautilus-share extension
Initializing nautilus-open-terminal extension
Initializing gnome-mount extension
(gnome-panel:4174): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -15 and height 24
** Message: drive = 0
** Message: volume = 0
** Message: drive = 0
** Message: volume = 0
** Message: drive = 0
** Message: volume = 0
(gnome-terminal:4263): Vte-WARNING **: Ingen håndterer definert for kontrollsekvens «device-control-string».
(gnome-terminal:4263): Vte-WARNING **: Ingen håndterer definert for kontrollsekvens «device-control-string».
--------------------------------------------------
Traceback (most recent call last):
  • File "/usr/local/bin/gnome-sudoku", line 22 in <module>
    start_game()
  • File "/usr/local/lib/python2.5/site-packages/gnome_sudoku/gnome_sudoku.py", line 969 in start_game
    u.quit_cb()
  • File "/usr/local/lib/python2.5/site-packages/gnome_sudoku/gnome_sudoku.py", line 528 in quit_cb
    gtk.main_quit()
RuntimeError: called outside of a mainloop

Comment 1 Iestyn Pryce 2007-02-20 19:24:25 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.


*** This bug has been marked as a duplicate of 401372 ***
Comment 2 Andreas Røsdal 2007-02-27 17:04:27 UTC
*** Bug 412480 has been marked as a duplicate of this bug. ***
Comment 3 Susana 2007-05-20 11:13:37 UTC
*** Bug 439698 has been marked as a duplicate of this bug. ***
Comment 4 Thomas Andersen 2007-07-26 10:37:36 UTC
*** Bug 460426 has been marked as a duplicate of this bug. ***
Comment 5 Quentin Neill 2007-07-27 19:22:55 UTC
This fix prevents the traceback.  Not sure if there is a more elegant way to shutdown on a KeyboardInterrupt; I tried emitting a GTK destroy event but then you need to reenter the main loop which causes tricky logic when quitting normally:


--- gnome_sudoku.py     2006-06-18 10:03:30.000000000 -0500
+++ gnome_sudoku_fix.py 2007-07-27 14:15:54.000000000 -0500
@@ -492,7 +492,12 @@
                 self.gconf['current_game']=self.sudoku_tracker.save_game(self)
         self.stop_worker_thread()
         self.sudoku_tracker.save()
-        gtk.main_quit()
+        # allow KeyboardInterrupts, which calls quit_cb outside the main loop
+        try:
+            gtk.main_quit()
+        except RuntimeError, e:
+            #print "ignoring RunTimeError raised by main_quit(): %s" % str(e)
+            pass
 
     @simple_debug
     def enter_game_by_hand (self, *args):
Comment 6 Andreas Røsdal 2007-07-27 20:49:04 UTC
Thanks for the patch, Quentin. I applied it to SVN:

http://svn.gnome.org/viewcvs/gnome-games?view=revision&revision=6557
Comment 7 Damien Durand 2008-03-19 12:28:41 UTC
*** Bug 523321 has been marked as a duplicate of this bug. ***