* Elusive String.blit exception
@ 2005-03-03 4:18 Mike Hamburg
2005-03-03 9:52 ` [Caml-list] " Richard Jones
0 siblings, 1 reply; 3+ messages in thread
From: Mike Hamburg @ 2005-03-03 4:18 UTC (permalink / raw)
To: caml-list
I have a program which does not use the String module directly, which
very occasionally fails on Invalid_argument(String.blit). I have been
unable to track down the cause of this bug, and really don't know what
to make of it given that I'm not using the String module. The only
module that's used anywhere in that code which uses String (as far as I
can tell) is Printf. It seems very unlikely that Printf is failing,
given that it's tested more often than just about any other module in
the standard basis other than List.
Where could this exception be coming from? Is there any way to
automatically get a backtrace when my program dies on an exception?
Are there any other functions which use String.blit?
Mike Hamburg
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Elusive String.blit exception
2005-03-03 4:18 Elusive String.blit exception Mike Hamburg
@ 2005-03-03 9:52 ` Richard Jones
2005-03-03 10:15 ` Virgile Prevosto
0 siblings, 1 reply; 3+ messages in thread
From: Richard Jones @ 2005-03-03 9:52 UTC (permalink / raw)
To: Mike Hamburg; +Cc: caml-list
On Wed, Mar 02, 2005 at 11:18:35PM -0500, Mike Hamburg wrote:
> Where could this exception be coming from? Is there any way to
> automatically get a backtrace when my program dies on an exception?
Yes. Compile your whole program as bytecode and then export the
following environment variable before you run it:
OCAMLRUNPARAM=b
Rich.
--
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Elusive String.blit exception
2005-03-03 9:52 ` [Caml-list] " Richard Jones
@ 2005-03-03 10:15 ` Virgile Prevosto
0 siblings, 0 replies; 3+ messages in thread
From: Virgile Prevosto @ 2005-03-03 10:15 UTC (permalink / raw)
To: caml-list
Le 03/03/2005, à 09:52:29 AM, Richard Jones a écrit:
> On Wed, Mar 02, 2005 at 11:18:35PM -0500, Mike Hamburg wrote:
> > Where could this exception be coming from? Is there any way to
> > automatically get a backtrace when my program dies on an exception?
> >
>
> Yes. Compile your whole program as bytecode and then export the
Just a small addition: when compiling and linking the program, don't
forget to add the -g option to ocamlc, so that the generated bytecode
contains the necessary debugging informations.
--
E tutto per oggi, a la prossima volta
Virgile
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-03-03 10:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-03 4:18 Elusive String.blit exception Mike Hamburg
2005-03-03 9:52 ` [Caml-list] " Richard Jones
2005-03-03 10:15 ` Virgile Prevosto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox