Re: Settings::instance().evaluationDate() produces exception in managed code
Posted by
Boris Skorodumov on
URL: http://quantlib.414.s1.nabble.com/Settings-instance-evaluationDate-produces-exception-in-managed-code-tp7848p7850.html
Thank you Nathan and Luigi for comments and link.
This is what I see. As long as in unmanaged code i have implementation of function test (which call Settings::instance().evaluationDate()) inside of the class TestSettings or as inline function in the same hpp file - no problems. it works with current singleton.hpp implementation. If I have implementation of test in separated cpp file then exeption occures. It occurs in either way with commented line 70 and substituted by #if defined(QL_PATCH_MSVC) or as it is right now in singleton.hpp. Also, when debuging from managed code, i cannot step into unmanaged code. VC2008 says for ptr below that "childrens cannot be evaluated" and just skip line ptr->test(); . I can step into unmanaged library in the first case when exeption is not produced.
void
TestSettingsManaged::testManaged() {
ptr->test();
}
Thank you,
Boris.
On Mon, Sep 21, 2009 at 11:14 AM, Luigi Ballabio
<[hidden email]> wrote:
On Wed, 2009-09-16 at 16:15 -0400, Boris Skorodumov wrote:
> I came across strange problem with
> Settings::instance().evaluationDate() when I am exposing it to .NET
> environment. (QuantLib - > Managed C++ - > C#).
>
> In this case, I am catching exception such as "The exception unknown
> software exception (0x0020001) occurred in the application".
No idea why that should happen. Did you try debugging the program?
Also, you can try following the advice in
<http://sourceforge.net/mailarchive/forum.php?thread_name=9b004f5c0803031142r5822aeb9ne49e9790230ad741%40mail.gmail.com&forum_name=quantlib-users>.
Let me know if that helps.
Later,
Luigi
--
Age is an issue of mind over matter. If you don't mind, it doesn't
matter.
-- Mark Twain
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users