Re: Issues with C# Swig Bindings, NUnit and Settings.instance().setEvaluationDate()

Posted by Henner Heck on
URL: http://quantlib.414.s1.nabble.com/Issues-with-C-Swig-Bindings-NUnit-and-Settings-instance-setEvaluationDate-tp9517p9518.html


Hello,

i too experienced this error in Java when i did
several swap evaluations in a row yesterday.
The code runs nicely several times and then throws the
"pure virtual function call" which crashes the JVM.
It always happens on "setEvaluationDate" in the Settings class.

I would be really happy to see this fixed, since it makes
QuantLib practically unusable in my scenario.
I will try myself, but i am far from being a SWIG expert.

Software used:
Windows 7 x64
QuantLib 1.0.1
SWIG 2.0.0
Java 1.6.0_22
QuantLib compiled with Visual Studio Express 2008

Best regards,
Henner Heck




Am 29.12.2010, 08:02 Uhr, schrieb Ahmad Mahomed <[hidden email]>:

> Hi Guys,
>
> I have a similar issues as described in this (1)old
> thread<http://is.gd/jGlUb> as
> well as (2)this one <http://is.gd/jGmeM> and arises when trying to set  
> the
> evaluation date of the Settings class.
>
> My current situation is as follows
> - Using the QuantLib's C# SWIG bindings;
> - NUnit 2.5.7 is being used for unit tests
>
> The issues arises when running all the unit test from the NUnit test  
> runner.
> The error is thrown when trying to set the evaluation date of the  
> Settings
> instance using the C# 'Settings.instance().setEvaluationDate()'  
> function.
>
> I get the following error in a message box.
>
> "Runtime Error!
> Program: C:\Program Files\NUnit 2.5.7\bin\net-2.0\nuit-agent.exe
>
> R6025
> - pure virtual function call"
>
> Microsoft has KB article related to this R6025
> error<http://support.microsoft.com/kb/125749> but
> I'm not sure how to relate this to the QuantLib C++ code as well the C#  
> Swig
> bindings.
>
> The error is consistent in that I am unable to run all my unit tests.
> However, the test at which it fails is always inconsistent - sometime it  
> may
> fail at the third test while other times it may run  over half the tests
> before it fails. A point to note is that if each test is run  
> individually,
> it passes.
>
> I thought the issue may be related to how the singleton is managed via  
> Swig
> which prompted this Stackoverflow question about generating singletons in
> Swig <http://stackoverflow.com/q/4069204/268667> about using a different
> Swig declaration to set the evaluation date.This yielded no positive
> results. In the linked threads above, Nathan Abbot suggests that the  
> issue
> lies with .Net AppDomains and provides a solution and provides a solution
> which I was the foundation of the  SO question.
>
> Regards,
>


--
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev