Posted by
Ahmad Mahomed on
URL: http://quantlib.414.s1.nabble.com/Issues-with-C-Swig-Bindings-NUnit-and-Settings-instance-setEvaluationDate-tp9517.html
Hi Guys,
I have a similar issues as described in this (1)
old thread as well as (2)
this one 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"
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 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,
--
Ahmad Mahomed
------------------------------------------------------------------------------
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