|
Boost Users : |
From: Scott (cheesy4poofs_at_[hidden])
Date: 2006-02-16 07:52:45
> Is any of this implemented in a DLL ?
>
> the program is haning up because its trying to register a class
> that is in the process of being destroyed. Try setting
> a break poin on the assertion on line 71 of exended_type_info.cpp
> and try to figure out which class is being register.
>
> Set break point on the destructor of that class.
>
> This might lead one to the point whereby a destructor
> is being called while someting is being serialized
You are correct that the class causing the problem is implemented in another
DLL and imported to my server .exe. I'm not sure how to go about placing a
breakpoint in the extended_type_info.cpp file. Boost was built on another
computer and I only have access to the header files and lib/dlls.
I did place a breakpoint in the destructor of the class being serialized (in
addition to cout messages since the server is currently a console app). The
destructor is NOT getting called during the archive process. In addition, I
changed the signature of the method to take only a const value of the class
(instead of reference) and the error still happens. Here's the problem
code:
template <typename T, typename Handler>
void asyncWrite(const T t, Handler handler)
{
// Serialize the data first so we know how large it is.
std::ostringstream archiveStream;
boost::archive::text_oarchive archive(archiveStream);
archive << t; // error occurs here, t is not referenced
anywhere after this
I also get this message in the console:
Assertion failed: lookup(eti) == m_self->m_map.end(), file C:\Documents and
Sett
ings\Scott.SMOORE\Desktop\boost_1_33_1\libs\serialization\build\../src/exten
ded_
type_info.cpp, line 71
This error is quite frustrating. As I mentioned, the above code works
flawlessly if I bypass reading in a serialized file earlier in the program.
Thanks again for any help,
Scott
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