-
Notifications
You must be signed in to change notification settings - Fork 4
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
virtual serialization: "Error, could not find corresponding entry in derived for base" when serializing non constructible classes #143
Comments
@lifflander @PhilMiller can you please have a look at this? |
I'm seeing the exact same issue in some code I'm working on |
I just checked that this is not the result of the changes in #133 - checking out its predecessor and running the test on that (modified to use the older-style macros with more arguments) still fails |
It actually still fails for me even when commenting out the templating on the classes in question! |
It seems that the intermediate class in the inheritance hierarchy plays some role in the problem - when I skip that, the test passes. |
also, when the - virtual ObjT* get() = 0;
+ virtual ObjT* get() { return nullptr; }; |
ok, so clearly it's not a template issue, seems like an abstract class in the middle is not ok |
I think that potentially is the hint that we need to unravel this - there's maybe an instantiation failure around the constructor functor, which the compiler doesn't complain about because it finds something less specialized to instantiate instead (SFINAE) |
Perhaps |
Nope, looks like that's designed to always instantiate, and fail an assertion if it's ever called |
I have a fix in place now on #144 |
renaming after the fix, since templates were not the source of the issue here |
Scenario based on serialization of
vt::objgroup::holder::HolderBase
(required forvt::objgroup::ObjGroupManager
component).Given following class hierarchy:
When virtual serialization is attempted:
Test crashes with following error:
Backtrace after crash:
The text was updated successfully, but these errors were encountered: