unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Daniel Kraft <d@domob.eu>
Cc: guile-user@gnu.org
Subject: Re: Running files from command-line vs. load'ing them
Date: Sun, 28 Dec 2008 11:59:05 +0100	[thread overview]
Message-ID: <m3ocywtvk6.fsf@pobox.com> (raw)
In-Reply-To: <gj5kq2$f9k$1@ger.gmane.org> (Daniel Kraft's message of "Sat, 27 Dec 2008 17:27:17 +0100")

Hi,

On Sat 27 Dec 2008 17:27, Daniel Kraft <d@domob.eu> writes:

> $ myguile -L .. program.scm
> ERROR: In procedure string-contains:
> ERROR: Wrong type argument in position 1 (expecting string): #<winder
> b7d6e360>

I think this means that your extension missed a GC reference somewhere,
and that a SCM that you have has been freed and replaced with a
"winder".

("Winders" are part of guile's dynamic-wind implementation and are not
normally exposed to scheme -- a pretty good indication that this is the
case.)

Probably what's happening is that GC runs at different times when
running from the command line, or when running with the repl loaded; or
that it has marked but not yet swept that cell; etc.

> As I understand it, all three calls above should (more or less) do the
> same thing.

Yep. But I think you'll find you forgot a GC reference. Check your SMOB
marking functions, or scm_gc_protect_object() calls for global
variables. 

Cheers,

Andy
-- 
http://wingolog.org/




  reply	other threads:[~2008-12-28 10:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-27 16:27 Running files from command-line vs. load'ing them Daniel Kraft
2008-12-28 10:59 ` Andy Wingo [this message]
2008-12-28 11:50   ` Daniel Kraft
2009-01-05 21:20     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3ocywtvk6.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=d@domob.eu \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).