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 649730 - [guile 2.0] freecell exception
[guile 2.0] freecell exception
Status: RESOLVED FIXED
Product: aisleriot
Classification: Other
Component: games
git master
Other Linux
: High blocker
: ---
Assigned To: aisleriot-maint
aisleriot-maint
: 664911 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-05-08 12:19 UTC by Christian Persch
Modified: 2011-11-27 12:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Persch 2011-05-08 12:19:15 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
  • #0 game_scm_pre_unwind_handler
    at ../../../src/game.c line 408
  • #1 apply_catch_closure
    at throw.c line 151
  • #2 vm_regular_engine
    at vm-i-system.c line 956
  • #3 scm_c_vm_run
    at vm.c line 565
  • #4 scm_call_with_vm
    at vm.c line 857
  • #5 scm_apply
    at eval.c line 812
  • #6 scm_apply_1
    at eval.c line 512
  • #7 scm_throw
    at throw.c line 104
  • #8 scm_ithrow
    at throw.c line 441
  • #9 scm_error_scm
    at error.c line 94
  • #10 scm_error
    at error.c line 60
  • #11 error_unbound_variable
    at memoize.c line 778
  • #12 scm_memoize_variable_access_x
    at memoize.c line 799
  • #13 vm_regular_engine
    at vm-i-system.c line 891
  • #14 scm_c_vm_run
    at vm.c line 565
  • #15 scm_call_n
    at eval.c line 497
  • #16 game_scm_call_lambda
    at ../../../src/game.c line 438
  • #17 apply_catch_closure
    at throw.c line 146
  • #18 vm_regular_engine
    at vm-i-system.c line 956
  • #19 scm_c_vm_run
    at vm.c line 565
  • #20 scm_call_4
    at eval.c line 476
  • #21 scm_catch_with_pre_unwind_handler
    at throw.c line 86
  • #22 scm_c_catch
    at throw.c line 213
  • #23 game_scm_call
    at ../../../src/game.c line 466
  • #24 aisleriot_game_drop_valid
    at ../../../src/game.c line 1958
  • #25 cards_are_droppable
    at ../../../src/board-noclutter.c line 1008
  • #26 find_drop_target
    at ../../../src/board-noclutter.c line 1042
  • #27 aisleriot_board_motion_notify
    at ../../../src/board-noclutter.c line 2825

Comment 1 Christian Persch 2011-05-29 20:01:32 UTC
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.)
Comment 2 Jim Sublette 2011-11-24 16:11:27 UTC
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.
Comment 3 Christian Persch 2011-11-24 22:17:13 UTC
Indeed that does fix the problem. Many thanks! Committed to master and gnome-3-2 branch.
Comment 4 Christian Persch 2011-11-24 22:26:24 UTC
I've also reported the missing $expt to the guile developers.
Comment 5 Christian Persch 2011-11-25 15:03:57 UTC
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10131
Comment 6 Christian Persch 2011-11-27 12:45:13 UTC
*** Bug 664911 has been marked as a duplicate of this bug. ***