guile-user
[Top][All Lists]
Advanced

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

Re: very obscure problem, help needed


From: Neil Jerram
Subject: Re: very obscure problem, help needed
Date: Sun, 8 Oct 2000 23:46:54 +0100

David Pirotte writes:

   I just hope that some folks will take few minutes to see if they woud
   have encounterred the same problem in the past and help me.

No solution, I'm afraid, just a question for clarification and a
suggestion for how to proceed further.

           ===> I get several "Content-Type: text/html" written as the beginning
                of my html pages, just as if the guile script was called several
                times:

                   exactly 1 "Content-Type: text/html"  
                   per call to date-in-future           

Does the rest of the script generate any HTML output?  How exactly do
the multiple Content-Types look - do you mean

--------start----------
Content-Type: text/html
Content-Type: text/html
--------stop----------

or

--------start----------
Content-Type: text/html

Content-Type: text/html

--------stop----------

or

--------start----------
Content-Type: text/html

<HTML>
...
</HTML>
Content-Type: text/html

<HTML>
...
</HTML>
--------stop----------

   NOW: if I momentaraly define date-in-future to always reply the same integer,
           just to try to understand what is going on, everything is fine!

   [...]

                   its too complicated to pass the all date engine software,
                   but I checked that the function 'open-day?' itself refering
                   to a 'binary-search' function are not involved (forcing them
                   to temporarily always return #t)

In a weird case like this, I think this is a good approach.  You know
that `(define (date-in-future . args) 98)' does not produce multiple
Content-Types, but that the real code for date-in-future, but with
`(define (open-day? . args) #t)', does.  So I would suggest
progressively simplifying date-in-future, from the real code to a
fixed integer, until the problem disappears.

One other idea - are you by any chance doing anything with strings
that you got back from Postgres?  I found that it is dangerous to
treat such strings as shareable.  Specifically, I found that

(use-modules (database postgres))
(use-modules (ice-9 string-fun))
...
(sans-surrounding-whitespace (pg-getvalue dataset row col))

would cause mysterious errors later in the program.

But if I use a private copy of sans-surrounding-whitespace, in which
`make-shared-substring' is replaced by `substring', the program
behaves correctly.

Good luck!

     Neil



reply via email to

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