Posted by
Ahmad Mahomed on
URL: http://quantlib.414.s1.nabble.com/Issues-with-C-Swig-Bindings-NUnit-and-Settings-instance-setEvaluationDate-tp9517p9521.html
Hi Luigi,
I have a similar call stack which also seems to error at notifyObservers(Line119). I truncated the C# bits.
msvcr90d.dll!1023c355()
[Frames below may be incorrect and/or missing, no symbols loaded for msvcr90d.dll]
msvcr90d.dll!1023e1fa()
msvcr90d.dll!102dccd7()
>> NQuantLibc.dll!QuantLib::Observable::notifyObservers() Line 119 + 0x31 bytes C++
NQuantLibc.dll!QuantLib::ObservableValue<QuantLib::Date>::operator=(const QuantLib::Date & t) Line 81 C++
NQuantLibc.dll!QuantLib::Settings::DateProxy::operator=(const QuantLib::Date & d) Line 37 C++
NQuantLibc.dll!Settings_setEvaluationDate(QuantLib::Settings * self, const QuantLib::Date & d) Line 5944 C++
NQuantLibc.dll!CSharp_Settings_setEvaluationDate(void * jarg1, void * jarg2) Line 25380 + 0xd bytes C++
[External Code]
NQuantLib.DLL!QuantLib.Settings.setEvaluationDate(QuantLib.Date d) Line 57 + 0x2d bytes C#
XXXX.SetDates(System.DateTime settlementDate, System.DateTime todaysDate) Line 155 + 0x10 bytes C#
On 30 December 2010 22:45, Henner Heck
<[hidden email]> wrote:
Hello Luigi,
here are some call stacks i managed to get.
I ran the program several times and attached the Visual Studio debugger to
the Java process.
I had tried manual calls to the Java garbage collector before, to see if
they might solve the problem, which they didn't.
But the sets of possible call stacks seem to differ, depending on whether
the gc was run manually or not,
though it could also be, that i just didn't try often enough.
One of these call stacks were presented when the program got the "pure
virtual function call" error:
With the Java garbage collection run manually before each swap evaluation:
QuantLibJNI.dll!_purecall() Line 54 + 0x7 bytes C
> QuantLibJNI.dll!QuantLib::Observable::notifyObservers() Line 119 +
> 0x31 bytes C++
QuantLibJNI.dll!QuantLib::BootstrapHelper<QuantLib::YieldTermStructure>::update()
Line 153 C++
QuantLibJNI.dll!QuantLib::RelativeDateBootstrapHelper<QuantLib::YieldTermStructure>::update()
Line 114 C++
QuantLibJNI.dll!QuantLib::Observable::notifyObservers() Line 119 + 0x31
bytes C++
QuantLibJNI.dll!QuantLib::ObservableValue<QuantLib::Date>::operator=(const
QuantLib::Date & t={...}) Line 81 C++
QuantLibJNI.dll!QuantLib::Settings::DateProxy::operator=(const
QuantLib::Date & d={...}) Line 37 C++
QuantLibJNI.dll!Settings_setEvaluationDate(QuantLib::Settings *
self=0x0582d970, const QuantLib::Date & d={...}) Line 4384 C++
QuantLibJNI.dll!Java_org_quantlib_QuantLibJNI_Settings_1setEvaluationDate(JNIEnv_
* jenv=0x023b4518, _jclass * jcls=0x0229fa4c, __int64 jarg1=92461424,
_jobject * jarg1_=0x0229fa60, __int64 jarg2=92545208, _jobject *
jarg2_=0x0229fa54) Line 24282 + 0xd bytes C++
02499f47()
jvm.dll!6d8e3a9c()
[Frames below may be incorrect and/or missing, no symbols loaded for
jvm.dll]
jvm.dll!6d976591()
jvm.dll!6d8e3b1d()
jvm.dll!6d8ed365()
msvcr71.dll!7c3416b3()
ntdll.dll!776f9d15()
Without the manual garbage collection:
QuantLibJNI.dll!_purecall() Line 54 + 0x7 bytes C
> QuantLibJNI.dll!QuantLib::Observable::notifyObservers() Line 119 +
> 0x31 bytes C++
QuantLibJNI.dll!QuantLib::InterestRateIndex::update() Line 94 C++
QuantLibJNI.dll!QuantLib::Observable::notifyObservers() Line 119 + 0x31
bytes C++
QuantLibJNI.dll!QuantLib::ObservableValue<QuantLib::Date>::operator=(const
QuantLib::Date & t={...}) Line 81 C++
QuantLibJNI.dll!QuantLib::Settings::DateProxy::operator=(const
QuantLib::Date & d={...}) Line 37 C++
QuantLibJNI.dll!Settings_setEvaluationDate(QuantLib::Settings *
self=0x057fd970, const QuantLib::Date & d={...}) Line 4384 C++
QuantLibJNI.dll!Java_org_quantlib_QuantLibJNI_Settings_1setEvaluationDate(JNIEnv_
* jenv=0x00454518, _jclass * jcls=0x0024fa4c, __int64 jarg1=92264816,
_jobject * jarg1_=0x0024fa60, __int64 jarg2=95332160, _jobject *
jarg2_=0x0024fa54) Line 24282 + 0xd bytes C++
02509f47()
jvm.dll!6d8e3a9c()
[Frames below may be incorrect and/or missing, no symbols loaded for
jvm.dll]
jvm.dll!6d976591()
jvm.dll!6d8e3b1d()
jvm.dll!6d8ed365()
msvcr71.dll!7c3416b3()
ntdll.dll!776f9d15()
Appeared in both cases:
QuantLibJNI.dll!_purecall() Line 54 + 0x7 bytes C
> QuantLibJNI.dll!QuantLib::Observable::notifyObservers() Line 119 +
> 0x31 bytes C++
QuantLibJNI.dll!QuantLib::FloatingRateCoupon::update() Line 96 + 0x19
bytes C++
QuantLibJNI.dll!QuantLib::Observable::notifyObservers() Line 119 + 0x31
bytes C++
QuantLibJNI.dll!QuantLib::InterestRateIndex::update() Line 94 C++
QuantLibJNI.dll!QuantLib::Observable::notifyObservers() Line 119 + 0x31
bytes C++
QuantLibJNI.dll!QuantLib::ObservableValue<QuantLib::Date>::operator=(const
QuantLib::Date & t={...}) Line 81 C++
QuantLibJNI.dll!QuantLib::Settings::DateProxy::operator=(const
QuantLib::Date & d={...}) Line 37 C++
QuantLibJNI.dll!Settings_setEvaluationDate(QuantLib::Settings *
self=0x057fd970, const QuantLib::Date & d={...}) Line 4384 C++
QuantLibJNI.dll!Java_org_quantlib_QuantLibJNI_Settings_1setEvaluationDate(JNIEnv_
* jenv=0x02334518, _jclass * jcls=0x01c9fa4c, __int64 jarg1=92264816,
_jobject * jarg1_=0x01c9fa60, __int64 jarg2=95531456, _jobject *
jarg2_=0x01c9fa54) Line 24282 + 0xd bytes C++
02419f47()
jvm.dll!6d8e3a9c()
[Frames below may be incorrect and/or missing, no symbols loaded for
jvm.dll]
jvm.dll!6d976591()
jvm.dll!6d8e3b1d()
jvm.dll!6d8ed365()
msvcr71.dll!7c3416b3()
ntdll.dll!776f9d15()
I hope it helps.
Best regards,
Henner Heck
> On Wed, 2010-12-29 at 19:05 +0100, Henner Heck wrote:
>> 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.
>
> Do you happen to have a traceback? (setEvaluationDate triggers the
> update() method of its observers. It owuld be useful to know which one
> is responsible, if any.)
>
> Luigi
>
>
>
--
Erstellt mit Operas revolutionärem E-Mail-Modul:
http://www.opera.com/mail/
------------------------------------------------------------------------------
--
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