Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] no RTTI data error
From: Noah Roberts (roberts.noah_at_[hidden])
Date: 2010-06-22 17:41:05


In article <hvr8us$ivt$1_at_[hidden]>, ramey_at_[hidden] says...
>
> Noah Roberts wrote:
>
> > I "fixed" this problem (and it was the use of typeid deep inside of
> > the shared_helper reset() function) by changing the order that I saved
> > things in a containing object.
>
> I don't see any typeid inside of that function in the current version.

It calls polymorphic::get_object_identifier, which calls
extended_type_info_typeid::get_derived_extended_type_info, which calls
typeid.
>
> >The two types are completely unrelated
> > except that they are both contained by the same thing. The only
> > thing I can think of is that the object I added after these broken
> > ones used BOOST_CLASS_EXPORT to register and the broken objects are
> > registered at the beginning with ar.template register<type>(). Is
> > there some weird way that these two methods can poorly interact or
> > something?
>
> I don't know if we explicitly test this - by maybe we do. I'm sure that
> I would have expected a user to use one or the other of the two methods
> rather than both.

I'm not using both for any given class, but both methods are used within
the program for different classes.

>
> Some previous versions of the library were very slow when doing
> some operations related to exported types. I believe this problem
> no longer exists. Of course, without knowing which version you're using
> I can't say if this is a problem.

I don't know if serialization is slow. What's slow is the visual studio
when attempting to step through serialization code. It took me three
hours to find the point of failure because each step takes 30 seconds to
a minute. I'm talking about steping from "i = 0;" to the next line of
code...not stepping past a function. Very frustrating but not anything
to do with boost.

What has me super confused about this whole thing is that, like I said,
I fixed it by moving an unrelated line of code....but weirder than that,
this line of code USED to be AFTER the one that ended up reaching into
shared_ptr_helper and exploding on typeid. Moving the line to be before
it fixed the problem. It could be something to do with being the last
line in the function. I have the distinct feeling that something
undefined is taking place but it's difficult to discover what that might
be because serialization routines are DEEP and each and every step takes
near a minute to move forward in the debugger.

-- 
http://crazyeddiecpp.blogspot.com/

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