Closed drbenmorgan closed 5 years ago
Very strange issue! I have inspected the code and I cannot figure what is the problem. Guillaume recently faced a problem with unsupported serialization of uninitialized boolean class attributes but we are not in this case AFAICS.
@fmauger I've now had some time to look at your checks, with result:
Do you have at least some partial output of the "test_handle_1.txt" file or nothing at all ? Maybe we could find a hint of some mess with the serialization of the underlying shared_ptr. The "memory tracking" algorithm could be broken by some memory optimization...
The file is created, but is zero length
What happens if you serialize only the hits collection ?
Trying to (de)serialise only the hits2
object results in success. Trying to (de)serialize only the hits
object fails as before.
if you comment lines 195 to 208 ?
No change, still segfaults at "Serialize..." step
What happens if you serialize only through the xml archive ?
No change, still segfaults at the "Serialize..." step.
So looks like the hits
instance is where things are going wrong somehow.
ok. I will try to think about it.
Seemingly resolved in Boost 1.68/69, so fixed as of 681b7f31a06d527b78321e2fd79f0b320603cd78 in develop, which supports 1.69.
Builtin Bayeux 3.1.2 tag, and current
develop
branch on macOS is working bar an odd failure of thedatatools-test_handle_1
test is failing in all barDebug
builds. Stripping the build back to justdatatools
and tests, with Boost 1.63, C++11, running the test in aDebug
build succeeds without error. InRelWithDebInfo
orRelease
builds, runs result in:Running in `lldb' yields:
and a backtrace yields a whole chain of output that is in the attached file: datatools_test_handle_1.bt.txt
My guess would be that something related to
hit::serialize
is getting optimised out, but it's not obvious why give that the very similar testdatatools_test_handle_2
doesn't have any of these issues. Linux builds with gcc5 do not show issues, so I guess this is related to theclang
compiler (should be reproducible on Linux/clang).Not a critical issue, but wanted to report as I'm preparing a PR to add some functionality to
datatools::handle
. As this will only add to the user interface and has no affect on serialisation, it shouldn't affect or be affected the failure of the above test.