Login  Register

Re: .NET Framework 4.0 Application Runtime Exceptions Problem

Posted by kcross on Mar 10, 2012; 10:57pm
URL: http://quantlib.414.s1.nabble.com/NET-Framework-4-0-Application-Runtime-Exceptions-Problem-tp8685p8690.html

Hi All,

Glad my fix for .NET (the cdecl thing...) worked for you guys too.  I'm encountered a bit of a stumbling block though... Everything works fine when I create a new instance of everything, but if I try and update an object (ie update a yield curve) I get a bunch of AccessViolationExceptions (whatever they mean...)

I was wondering if you guys have experienced the same thing etc?  I have a feeling that its something to do with multi-threading, and some garbage collector is acting out of line somewhere, but its been a bit of a nightmare to track...

-kcross

sergvil wrote
Yes, the second one.

> 2)       In the resulting C++ SWIG files, somewhere in there is one that
> says  “# define SWIGSTDCALL __stdcall”  Replace __stdcall with __cdecl (note
> that’s two underscores)

I forgot to change this code line the first time. After changing it, All worked perfectly.


Ahmad Mahomed wrote
Hi  Sergio,

Can you please clarify which step  resolved your issue?

Ahmad

On 8 February 2012 04:06, sergvil <sergvil@hotmail.com> wrote:

>
>
> Thank you very much!!
>
> The fix works!!
>
> I sent you a previous message saying that it didn't work but I forgot to
> apply one of the changes described on Ahmad's post.
>
> Now it works perfectly. You can add this fix to QuantLib, it will be very
> usefull for Framework 4.0 developers.
>
> Thank you again!!
>
> Best Regards.
>
> Sergio
> --
> View this message in context:
> http://old.nabble.com/.NET-Framework-4.0-Application-Runtime-Exceptions-Problem-tp33276539p33283236.html
> Sent from the quantlib-users mailing list archive at Nabble.com.

--
Ahmad Mahomed