-
Notifications
You must be signed in to change notification settings - Fork 761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VS2015 unittests and sandbox_vs throw exception #291
Comments
Same issue with VS2013, probably have an export problem with the new polymorphic casting stuff. |
Investigated this a bit more, I believe thie issue is the I'll keep looking into this but would appreciate input form anyone more adept at dealing with DLLs on Windows. Everything else is ready to go for the next release once we can get this sorted out. |
I'm not a DLL expert but I seem to recall running into the same problem with Boost.Serialization several years ago. I'll check to see if it was resolved there. Is it possible to use some kind of compile flag that creates the static object in the DLL and only references it outside the DLL when DLLs are being used? |
Here's the link to the similar problem I discovered with Boost Serialization. It doesn't appear to be resolved there: https://svn.boost.org/trac/boost/ticket/10084 |
I've run into a similar issue, I had to put the definition of the registry into a CPP file and I had to make sure the registry was exported correctly. |
Well I finally found time to look at this on a Windows machine. I think this is actually just a (trivial) bug in the way the code is written - normally we would bail via an exception before dereferencing the invalid iterator if we couldn't find something in a lookup, but in my attempts to re-purpose the function, I had a call to it that didn't actually throw an exception. I'll be checking in what seems to be a fix shortly, will still need to test on other platforms. |
Copied the VS2013 solution and upgraded it to VS2015. Built sandbox_vs.exe. Ran sandbox_vs.exe in a command prompt window. It immediately threw an exception:
Opening the debugger, it appears that the failure occurs in polymorphic_impl.hpp, line 136 because derivedIter == derivedMap.end(). The call stack shows that this occurs in the creation of cereal::detail::StaticObject via calls to PolymorphicVirtualCaster. The call stack is:
The other sandbox exes ran fine. Unittests.exe has the same problem. performance.exe runs fine. Is this an example of the static initialization order fiasco?
The text was updated successfully, but these errors were encountered: