guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Namespaces for HB-Guile modules? Help. :(


From: Alejandro Forero Cuervo
Subject: Re: Namespaces for HB-Guile modules? Help. :(
Date: Fri, 23 Nov 2001 13:31:25 -0500
User-agent: Mutt/1.2.5i

Hey.  :)

    This [scm_c_use_module("ice-9 safe")] looks correct to me,
    although the space in the error message between `ice-9' and `.' is
    odd.

Oh, Ooops.  The space and the dot after ice-9 were manually added by
me to finish the sentence.  The actual error message looks like the
following (with no trailing space after "ice-9"):

ERROR: In procedure car:
ERROR: Wrong type argument in position 1: ice-9

    It might be useful to get a backtrace and include that in your
    report.

Oh, I didn't think this was an error in Guile's part, I thought I was
doing something wrong.

The following is the C stack when Guile detects the error:

#0  0x4014dea5 in exit () from /lib/libc.so.6
#1  0x400886ff in scm_handle_by_message () at throw.c:486
#2  0x40088911 in scm_ithrow (key=0x40259730, args=0x4151ef18, noreturn=1)
    at throw.c:638
#3  0x40043d79 in scm_error (key=0x40259730, subr=0x4066effc "car", 
    message=0x400a4380 "Wrong type argument in position ~A: ~S", 
    args=0x4151eee8, rest=0x2174) at error.c:91
#4  0x40044217 in scm_wrong_type_arg () at error.c:250
#5  0x4004a3b3 in scm_ceval (x=0x2974, env=0x4151eec0) at eval.c:2828
#6  0x4004a5b5 in scm_ceval (x=0x41055af8, env=0x4151eec0) at eval.c:2921
#7  0x4004a014 in scm_ceval (x=0x41055b08, env=0x4151eec0) at eval.c:2771
#8  0x40048835 in scm_ceval (x=0x41066628, env=0x4151e858) at eval.c:2161
#9  0x40048835 in scm_ceval (x=0x41513788, env=0x4151e810) at eval.c:2161
#10 0x40048835 in scm_ceval (x=0x41513598, env=0x4151e728) at eval.c:2161
#11 0x4004bae1 in scm_apply (proc=0x41513510, arg1=0x4151e6b0, args=0x4091af60)
    at eval.c:3605
#12 0x4004bf7d in scm_for_each (proc=0x4151e700, arg1=0x4151e6d8, args=0x2974)
    at eval.c:3819
#13 0x4004af10 in scm_ceval (x=0x2974, env=0x4151e6f8) at eval.c:3158
#14 0x4004bae1 in scm_apply (proc=0x4105b4d0, arg1=0x4151e6d8, args=0x4091af60)
    at eval.c:3605
#15 0x4004b0d6 in scm_call_1 (proc=0x4105b498, arg1=0x4151e6d8) at eval.c:3269
#16 0x40066534 in scm_c_use_module (name=0x806c9a0 "ice-9 safe")
#17 0x80677a3 in hb_guile_init (d=0xbfffed18) at hbguile.c:56
#18 0x804b870 in hb_init () at hb.c:108
#19 0x804a70a in hb_inner_main (argc=3, argv=0xbfffef34) at main.c:411
#20 0x400592d5 in gh_launch_pad (closure=0x804a314, argc=3, argv=0xbfffef34)
    at gh_init.c:60
#21 0x40062cea in invoke_main_func (body_data=0xbfffee6c) at init.c:636
#22 0x40062c9f in scm_boot_guile_1 (base=0xbfffee68, closure=0xbfffee6c)
    at init.c:616
#23 0x400629b0 in scm_boot_guile (argc=3, argv=0xbfffef34, 
    main_func=0x400592b4 <gh_launch_pad>, closure=0x804a314) at init.c:440
#24 0x40059308 in gh_enter (argc=3, argv=0xbfffef34, 
    c_main_prog=0x804a314 <hb_inner_main>) at gh_init.c:70
#25 0x804a30b in main (argc=3, argv=0xbfffef34) at main.c:173
#26 0x4013b64f in __libc_start_main () from /lib/libc.so.6

Functions 25, 19, 18 and 17 are of HB.  The rest is either in Guile or
in GLibC.

If there is such a thing as a Guile-level stack (like the one printed
by (backtrace)) and you'd find it useful, please let me know how to
produce it (as you can see, Guile calls quit on error, I guess I could
set up an exception handler to show the trace... Hmm).

    Also, what version are you on?

I am using guile-1.5.2 with linux-2.4.12, gcc-2.95.4 and glibc-2.2.4.

I will soon (probably tomorrow) try with the latest 1.5 release of
Guile and let you know if it works.  Hmm, I should really upgrade my
Linux version.

    [...]

    The first problem here is that scm_c_lookup returns a variable
    object, and you want the variable's value - use SCM_VARIABLE_REF.

Oh, this explains some things. :)

Thank you very much for your help, Neil.  :)

Alejo.
http://bachue.com/alejo

--
The mere formulation of a problem is far more essential than its solution.
      -- Albert Einstein.

$0='!/sfldbi!yjoV0msfQ!sfiupob!utvK'x44;print map{("\e[7m \e[0m",chr ord
(chop$0)-1)[$_].("\n")[++$i%77]}split//,unpack'B*',pack'H*',($F='F'x19).
"F0F3E0607879CC1E0F0F339F3FF399C666733333CCF87F99E6133999999E67CFFCCF3".
"219CC1CCC033E7E660198CCE4E66798303873CCE60F3387$F"#Don't you love Perl?

Attachment: pgptcB8Ekm7Al.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]