[plt-scheme] scheme/foreign issues - string conversion and DrScheme crashing
On Thu, Dec 25, 2008 at 3:56 PM, Eli Barzilay <eli at barzilay.org> wrote:
> On Dec 25, Ben Simon wrote:
> > I started in on it, and I've run into two major issues:
> ...
>
> bytes->string/utf8: string not well-formed UTF-8 encoding: #"0\344\22"
> >
> > Any thoughts as to why *mysql_error* is returning back a string scheme is
> > choking on?
>
> It's probably best to change the type to _bytes, then see what the
> actual char* contents is.
Good to know. Perhaps the fact that mysql_error() is returning garbage is
related to the system crashing. Hmmm, maybe something is just massively
corrupt.
> > 2) DrScheme has been crashing nearly constantly since I started
> > working on this.
>
...
>
> The most common cause of this is a bad memory reference, usually
> because mzscheme uses a moving GC (by default). Some things that you
> can do to verify this are adding `collect-garbage' in various places
> (maybe even a thread that keeps triggering GCs), and trying to run the
> code with the CGC executables. (You can get them as part of the
> "Full" distribution from the nightly builds.)
Thanks for the tips.
> Another thing to verify is that you don't call the close function
> twice on aa handler or something similar.
I added a print statement right before close was called - and the system
crashed before it even got that far. Still, good to know.
> Other than that -- yes, life in the (unsafe!) world can be hard...
Yeah, you can say that again :-).
-Ben
--
Have an idea for software? I can make it happen -
http://www.ideas2executables.com
My Blog: http://benjisimon.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20081225/1fca8e8b/attachment.html>