Boost logo

Boost Users :

From: Bill Lear (rael_at_[hidden])
Date: 2007-08-22 12:00:38


On Wednesday, August 22, 2007 at 15:52:32 (+0100) Fletcher, Matthew (Information Technology) writes:
>Yes the stack trace seems incredibly deep for calling one line of boost
>code (over 200 depth). I was hoping someone might guess what is going
>wrong from the structure of the stack trace. I have looked through every
>frame but can't see anything unusual, but the very fact it is so deep
>feels wrong. The top-level object being serialized has some structure
>but is not particularly complicated.
>
>Yes it has worked in the past and works for small data sets now. However
>I did not write the original code and suspect there may be some subtlety
>which is leading the serializations to blow up in size and I can't find
>it. Even seemingly small examples give rise to serializations of several
>megabytes. The stack is of the order of 1Gb and cannot be easily
>increased but I suspect the stack/heap size just lets it get into such a
>deep mess before finally dying and the real problem is some conceptual
>mistake in how my class's serialization has been implemented.

I encountered a similar problem some time ago. At first
I increased my stack space (on Linux, with ulimit), and then
coded a bump in stack space in the program. Both worked, but
I discovered that the problem was in my code.

The issue was a very deeply nested graph that caused lots of calls to
the serialization methods of nested classes that would terminate after
a very long chain, and then pop the stack back. I recoded to unroll
loops of these chains "by hand" and got around it.

Bill


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