[Haskell-cafe] Re: Haskell DLL crashes Excel

Cyril Schmidt cschmidt at deds.nl
Mon Sep 25 17:47:27 EDT 2006


The symptoms that you describe hint at some incorrect pointer handling.
I believe the culprit is that pesky BSTR. I will try to dig up the code 
I wrote a while ago to pass a BSTR to Haskell.

Meanwhile, another hint. The GHC FAQ 1.4.1 says:
"For utterly horrible reasons, programs that use more than 128Mb of heap
won't work when compiled dynamically on Windows
(they should be fine statically compiled)."

I have no clue what those horrible reasons might be, but you can limit the
heap  used by the Haskell DLL  by setting the environment variable



> | From: Gupta, Nikunj (London) [mailto:Nikunj_Gupta at ml.com]
> | Sent: 25 September 2006 10:31
> | To: Simon Peyton-Jones
> | Subject: RE: [Haskell-cafe] Haskell DLL crashes Excel
> | 
> | Hello Simon,
> | 
> | Nice to hear from you. I haven't really been working with Haskell but
> I
> | posted the message to that list since that was the only list I was
> able
> | to locate even remotely referring to the problem I was facing.
> | I have a c++ code which I try to compile as a dll. When debugging the
> | code works fine but as soon as I compile it for release and launch an
> | independent process not attached to VC++ it crashes. Do you have any
> | suggestions with regards to the project settings that might be causing
> | the same.
> | 
> | Any sort of help would be much appreciated
> | Regards
> | Nikunj

More information about the Haskell-Cafe mailing list