|
Boost Users : |
Subject: Re: [Boost-users] [Variant] Assertion fails at variant/detail/visitation_impl.hpp:207
From: Attila Rajmund Nohl (attila.r.nohl_at_[hidden])
Date: 2015-02-02 09:45:44
2015-01-30 19:23 GMT+01:00 Antony Polukhin <antoshkka_at_[hidden]>:
[...]
> Could you please provide a full source code reproducing the error.
> Otherwise it's extremely hard to examine the issue.
>
>
>> "should never be here at runtime"
> It means that internal state of variant was broken and the variant variable
> does not know any more what type does it hold. Usually this means that
> something really wrong was done with the variant variable:
>
> # 1
> boost::variant<int, std::string, float> v;
> std::memset(&v, 120, sizeof(v)); // corrupting data
> boost::get<int>(v); // assertion "should never be here at runtime"
>
> # 2
> boost::variant<int, std::string, float>* v; // uninitialized pointer
> boost::get<int>(*v); // assertion "should never be here at runtime"
Unfortunately the full source code is over 135K lines and I don't have
a minimal example. Other strange bugs happen, so it is perfectly
possible that there's some memory corruption :-( Thanks for the hint.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net