[serialization] no RTTI data error

I'm hoping someone can help me narrow down what I might be looking for. Already spent a lot of time trying to get somewhere and still trying to step through but using VS2010 and it's slower than ANYTHING ELSE THAT EXISTS!! The problem is that when I load my file I get an, "Access violation - no RTTI data," error. Yes, RTTI is turned on and the application actually relies upon it very heavily throughout its operation (acyclic visitor is a major component). The problem seems to have just cropped up and is within code that has previously passed tests. Best I can do at this point is describe the problem and hope someone has an idea of what to look for because I've been inch by inch stepping through serialization template code with a debugger that takes 30 seconds each damn step. I won't be done for hours. (anyone know how to speed this bitch up?) The problem seems to involve a type that I'm using save/load_construct_data on. There is a collection of these objects that is stored and loaded previously in the file and then I try to load a vector of objects that have shared pointers to these previously loaded objects on an individual basis. It was working fine and then I attached more data after the vector. Now it throws this exception when I try to load the pointer; before it reaches the new code that is otherwise entirely unrelated (it's just an object that happens to be stored in the same parent). If and when I get more information I'll post but for now I'm hoping someone can save me some time and frustration. This debugger is the slowest damn thing I've ever seen in my life. -- http://crazyeddiecpp.blogspot.com/

In article
I'm hoping someone can help me narrow down what I might be looking for. Already spent a lot of time trying to get somewhere and still trying to step through but using VS2010 and it's slower than ANYTHING ELSE THAT EXISTS!!
The problem is that when I load my file I get an, "Access violation - no RTTI data," error. Yes, RTTI is turned on and the application actually relies upon it very heavily throughout its operation (acyclic visitor is a major component). The problem seems to have just cropped up and is within code that has previously passed tests.
Best I can do at this point is describe the problem and hope someone has an idea of what to look for because I've been inch by inch stepping through serialization template code with a debugger that takes 30 seconds each damn step. I won't be done for hours. (anyone know how to speed this bitch up?)
The problem seems to involve a type that I'm using save/load_construct_data on. There is a collection of these objects that is stored and loaded previously in the file and then I try to load a vector of objects that have shared pointers to these previously loaded objects on an individual basis.
It was working fine and then I attached more data after the vector. Now it throws this exception when I try to load the pointer; before it reaches the new code that is otherwise entirely unrelated (it's just an object that happens to be stored in the same parent).
If and when I get more information I'll post but for now I'm hoping someone can save me some time and frustration. This debugger is the slowest damn thing I've ever seen in my life.
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. 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? -- http://crazyeddiecpp.blogspot.com/

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.
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. 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. Robert Ramey

In article
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/
participants (2)
-
Noah Roberts
-
Robert Ramey