colonelnugget / pychess

Automatically exported from code.google.com/p/pychess
GNU General Public License v3.0
0 stars 0 forks source link

Fatal Python error: Segmentation fault #932

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When my partner started to run out of time, the Infobar message seems failed to 
show.

/mnt/uhu2.2/home/tamas/pychess/lib/pychess/widgets/InfoBar.py:186: Warning: 
g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed
  for container in (self.get_action_area(), self.get_content_area()):
Fatal Python error: Segmentation fault

Thread 0xa83bcb40:
  File "/usr/lib/python2.7/threading.py", line 339 in wait
  File "/usr/lib/python2.7/Queue.py", line 168 in get
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/Players/ICPlayer.py", line 151 in makeMove
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/Utils/GameModel.py", line 576 in run
  File "/usr/lib/python2.7/threading.py", line 810 in __bootstrap_inner
  File "/usr/lib/python2.7/threading.py", line 783 in __bootstrap

Thread 0xadaffb40:
  File "/usr/lib/python2.7/threading.py", line 339 in wait
  File "/usr/lib/python2.7/Queue.py", line 168 in get
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/System/GtkWorker.py", line 29 in run
  File "/usr/lib/python2.7/threading.py", line 810 in __bootstrap_inner
  File "/usr/lib/python2.7/threading.py", line 783 in __bootstrap

Thread 0xae4ffb40:
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/ic/FICSConnection.py", line 225 in keep_alive
  File "/usr/lib/python2.7/threading.py", line 763 in run
  File "/usr/lib/python2.7/threading.py", line 810 in __bootstrap_inner
  File "/usr/lib/python2.7/threading.py", line 783 in __bootstrap

Thread 0xaeeffb40:
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/ic/FICSConnection.py", line 225 in keep_alive
  File "/usr/lib/python2.7/threading.py", line 763 in run
  File "/usr/lib/python2.7/threading.py", line 810 in __bootstrap_inner
  File "/usr/lib/python2.7/threading.py", line 783 in __bootstrap

Thread 0xaf8ffb40:
  File "/usr/lib/python2.7/threading.py", line 173 in acquire
  File "/usr/lib/python2.7/logging/__init__.py", line 706 in acquire
  File "/usr/lib/python2.7/logging/__init__.py", line 755 in handle
  File "/usr/lib/python2.7/logging/__init__.py", line 1329 in callHandlers
  File "/usr/lib/python2.7/logging/__init__.py", line 1289 in handle
  File "/usr/lib/python2.7/logging/__init__.py", line 1279 in _log
  File "/usr/lib/python2.7/logging/__init__.py", line 1148 in debug
  File "/usr/lib/python2.7/logging/__init__.py", line 1433 in debug
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/System/idle_add.py", line 11in _debug
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/System/idle_add.py", line 17in new_func
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/widgets/gamewidget.py", line536 in opp_not_out_of_time
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/ic/managers/BoardManager.py", line 815 in opp_not_out_of_time
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/ic/VerboseTelnet.py", line 49 in handle
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/ic/VerboseTelnet.py", line 222 in test_prediction
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/ic/VerboseTelnet.py", line 213 in parse
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/ic/FICSConnection.py", line 242 in run
  File "/usr/lib/python2.7/threading.py", line 810 in __bootstrap_inner
  File "/usr/lib/python2.7/threading.py", line 783 in __bootstrap

Thread 0xb14ffb40:
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/ic/TimeSeal.py", line 170 incook_some
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/ic/TimeSeal.py", line 167 inreaduntil
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/ic/TimeSeal.py", line 155 inreadline
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/ic/VerboseTelnet.py", line 161 in _get_lines
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/ic/VerboseTelnet.py", line 156 in popleft
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/ic/VerboseTelnet.py", line 206 in parse
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/ic/FICSConnection.py", line 242 in run
  File "/usr/lib/python2.7/threading.py", line 810 in __bootstrap_inner
  File "/usr/lib/python2.7/threading.py", line 783 in __bootstrap

Thread 0xb0affb40:
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/System/debug.py", line 29 inthread_dumper
  File "/usr/lib/python2.7/threading.py", line 763 in run
  File "/usr/lib/python2.7/threading.py", line 810 in __bootstrap_inner
  File "/usr/lib/python2.7/threading.py", line 783 in __bootstrap

Current thread 0xb73d5980:
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/widgets/InfoBar.py", line 186 in _load_message
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/widgets/InfoBar.py", line 215 in push_message
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/widgets/gamewidget.py", line677 in showMessage
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/widgets/gamewidget.py", line535 in do
  File "/mnt/uhu2.2/home/tamas/pychess/lib/pychess/Main.py", line 499 in run
  File "./pychess", line 138 in <module>
Szegmentálási hiba (core készült)
tamas@tami:/mnt/uhu2.2/home/tamas/pychess$

Original issue reported on code.google.com by gbtami on 10 Dec 2014 at 10:11

Attachments:

GoogleCodeExporter commented 9 years ago
This happened in the idle-add branch!

Original comment by gbtami on 10 Dec 2014 at 10:14

GoogleCodeExporter commented 9 years ago
The idle_add's should probably be threads_idle_add. But we need to convert
to pygi to use that.

Original comment by mattgatto on 10 Dec 2014 at 3:58

GoogleCodeExporter commented 9 years ago

Original comment by gbtami on 10 Dec 2014 at 8:22

GoogleCodeExporter commented 9 years ago
This and 925 are different bugs with different code paths, although they're 
occurring for the same reason, I'd bet: the crashing thread doesn't have the 
gdk lock when it's trying to update the GUI. After reading 
https://wiki.gnome.org/Projects/PyGObject/Threading again, specifically 
https://wiki.gnome.org/Projects/PyGObject/Threading#line-227 , it would seem we 
need to finish removing glock.py/threads_enter so we can remove 
Gdk.threads_init() and use GLib.idle_add() instead of Gobject.idle_add().

Original comment by mattgatto on 10 Dec 2014 at 8:58

GoogleCodeExporter commented 9 years ago
Or we do what I said in comment 2, use threads_add_idle instead of idle_add, 
but the fix in comment 4 is the better solution.

Original comment by mattgatto on 10 Dec 2014 at 9:10

GoogleCodeExporter commented 9 years ago
Either solution requires pygi being merged.

Original comment by mattgatto on 10 Dec 2014 at 9:11