Login  Register

Re: Static method for returning CommonVars

Posted by igitur on Sep 14, 2015; 9:10pm
URL: http://quantlib.414.s1.nabble.com/Static-method-for-returning-CommonVars-tp16898p16905.html

I'm encountering this with MSVC14/Boost 1.58 as well as MSVC10/Boost 1.55 on a different machine. Are there any Windows users who can confirm this for me, please?

This branch: https://github.com/pcaspers/quantlib/tree/francois 
and this test: ./QuantLib-test-suite-vc100-mt-gd.exe -t "*/*CPI*" 


This is the output I get:
Running 6 test cases...
unknown location(0): fatal error in "QuantLib::detail::quantlib_test_case(&InflationCPIBondTest::testCleanPrice)": std::exception: empty Handle cannot be dereferenced
d:\dev\quantlib\quantlib\test-suite\utilities.hpp(74): last checkpoint

*** 1 failure detected in test suite "Master Test Suite"


thanks

Francois Botha

On 12 September 2015 at 12:03, Francois Botha <[hidden email]> wrote:
Thanks, you're right! I tried it now at home on LInux / gcc / Boost 1.57 and there is no problem. 

I got the problem on my office PC, with MSVC, Boost 1.58. I think the problem lies there somewhere.

thanks for your help.

Francois Botha

On 11 September 2015 at 22:02, Peter Caspers <[hidden email]> wrote:
Hi Francois,

I merged the commit you mention into Luigi's current master and there
does not seem to be any problem. The test case runs fine, also
memcheck does not detect any problem. I ran the tests on the branch
"francois" in my repository, if you want to cross check. The problem
on your side seems to come from another difference ?

Best regards
Peter


On 11 September 2015 at 10:50, Francois Botha <[hidden email]> wrote:
> Hi all,
>
> In preparation for some future development (including the long-awaited fix
> for the inflation reference period that Peter and I discussed a while back),
> I want to first add some tests to the inflationcpibond.cpp file. My new
> tests will be based on South African CPI bonds and I thought it would be
> good to move the CommonVars constructor to a static method for returning the
> current UK-related data and then later do a similar static method for South
> African related data.
>
> Please have a look at this commit:
> https://github.com/igitur/quantlib/commit/6dc07bcb465f632017ea037b243c691eef42fbcc
>
> What I did there was just the first part of my goal. I moved the CommonVars
> struct constructor to a static method UKVars that returns the UK-data.  This
> compiles, but for some reason the test fails. It looks like the link between
> the zero inflation index and PiecewiseZeroInflationCurve is broken. I can't
> figure out how to get the tests to work again.
>
> I suspect this is more of a C++ query than a QuantLib query, but I'd
> appreciate your help.
>
> thanks
> Francois Botha
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> QuantLib-dev mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>



------------------------------------------------------------------------------

_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev