From: skaller <skaller@users.sourceforge.net>
To: Angela Zhu <angela.zhu@cs.rice.edu>
Cc: caml <caml-list@yquem.inria.fr>
Subject: Re: Re:Re: [Caml-list] How to prevent program from crashing
Date: Wed, 31 Oct 2007 17:54:07 +1100 [thread overview]
Message-ID: <1193813647.8355.57.camel@rosella.wigram> (raw)
In-Reply-To: <ED53732F-0753-4F6C-B424-A24714CBC8F7@cs.rice.edu>
On Wed, 2007-10-31 at 00:52 -0500, Angela Zhu wrote:
> And I am sure the whole program and GUI crashes when function
> "resetState2_4openFile"
> is called.
> I tried to catch the exception, but seems that it doesn't work.
>
> Following is the message I got after the crashing:
>
>
> ************************************************************************
> ************************
> (acumen:4063): Gtk-CRITICAL **: _gtk_text_line_char_locate: assertion
> `char_offs
> et >= 0' failed
>
> Gtk-ERROR **: Char offset -1 is off the end of the line
> aborting...
> Abort trap
Yeah, this is an abort from a failed assertion in C,
so it isn't an Ocaml exception.
I don't know how GTK handles this, that is, whether there is
a way to register an error handler. You should ask
Jacques Garrigue that.. hmmm. no I'll post this to the list
because this is quite an interesting issue.
It would appear that this line in your code, which calls the
GTK binding:
let appp = program2#buffer#get_text()
is the source of the problem, and that would be a bug in the Ocaml
library, not your code. Even if the buffer is empty, at least Ocaml
the library should handle this.
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
next prev parent reply other threads:[~2007-10-31 6:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-31 4:29 Angela Zhu
2007-10-31 5:08 ` [Caml-list] " skaller
[not found] ` <ED53732F-0753-4F6C-B424-A24714CBC8F7@cs.rice.edu>
2007-10-31 6:54 ` skaller [this message]
2007-10-31 7:13 ` Re: " Angela Zhu
2007-10-31 7:47 ` Jacques Garrigue
2007-10-31 9:31 ` skaller
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1193813647.8355.57.camel@rosella.wigram \
--to=skaller@users.sourceforge.net \
--cc=angela.zhu@cs.rice.edu \
--cc=caml-list@yquem.inria.fr \
/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