GNOME Bugzilla – Bug 649730
[guile 2.0] freecell exception
Last modified: 2011-11-27 12:45:13 UTC
When building --with-guile=2.0, trying to make the first move in a freecell game generates an exception: Backtrace: In ice-9/boot-9.scm: 170: 11 [catch #t #<catch-closure 82967a0> ...] In unknown file: ?: 10 [catch-closure] In ice-9/boot-9.scm: 170: 9 [catch #t #<catch-closure 8a09ec0> ...] In unknown file: ?: 8 [catch-closure] In ice-9/eval.scm: 362: 7 [eval # #] 350: 6 [eval # #] 350: 5 [eval # #] 349: 4 [eval # #] 356: 3 [eval #<memoized $expt> (10 (#) 11 . #<directory # 81fb828>)] In unknown file: ?: 2 [memoize-variable-access! #<memoized $expt> #<directory # 81fb828>] In ice-9/boot-9.scm: 115: 1 [#<procedure 898bb90 at ice-9/boot-9.scm:110:6 (thrown-k . args)> unbound-variable ...] In unknown file: ?: 0 [catch-closure unbound-variable #f "Unbound variable: ~S" ($expt) #f] (gdb) where
+ Trace 227043
I thought that maybe this was a GC problem with the game->lambdas[] for that call being already GC'd, but adding scm_gc_protect_object's to game->lambdas[] in game.c:scm_set_lambdas didn't change anything. (Doing that might still be the right thing, however.)
diff freecell.scm /root/freecell.scm 218c218 < (expt 2 (max (- (empty-field-number) --- > ($expt 2 (max (- (empty-field-number) I have tested the above and it fixes the issue.
Indeed that does fix the problem. Many thanks! Committed to master and gnome-3-2 branch.
I've also reported the missing $expt to the guile developers.
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10131
*** Bug 664911 has been marked as a duplicate of this bug. ***