[serialization]problem with tree-structure

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[serialization]problem with tree-structure

heinz meier
Hello!
I want to serialize a self made tree-data-structure. It consists of nodes
which are conected via pointers to other nodes.
I can serialize an object that contains only one of these nodes. But when i
connect other nodes via pointers to that node i get a segmentation fault
when i try to serialize that. I read the "Serializable Concept" in the
Reference that says that it should work and i assume that i implemented the
serialization-libary correct, because it works for a single node...
I have no idea what can be wrong. So can someone help me please?
I'm using the "libboost_serialization-gcc-1_33_1" libary and gcc 3.3.5

--
E-Mails und Internet immer und überall!
1&1 PocketWeb, perfekt mit GMX: http://www.gmx.net/de/go/pocketweb

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [serialization]problem with tree-structure

Robert Ramey
Without a failing test it would be hard to help.  Note that one of the
tests explicitly tests that serialization works for cycles of pointers so
I'm fairly confident that what you want to do should work.

Robert Ramey

heinz meier wrote:

>> Hello!
>> I want to serialize a self made tree-data-structure. It consists of
>> nodes which are conected via pointers to other nodes.
>> I can serialize an object that contains only one of these nodes. But
>> when i connect other nodes via pointers to that node i get a
>> segmentation fault when i try to serialize that. I read the
>> "Serializable Concept" in the Reference that says that it should
>> work and i assume that i implemented the serialization-libary
>> correct, because it works for a single node...
>> I have no idea what can be wrong. So can someone help me please?
>> I'm using the "libboost_serialization-gcc-1_33_1" libary and gcc
>> 3.3.5
>>
>> --
>> E-Mails und Internet immer und überall!
>> 1&1 PocketWeb, perfekt mit GMX: http://www.gmx.net/de/go/pocketweb
>>
>
>
>
>> _______________________________________________
>> Boost-users mailing list
>> [hidden email]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users 



_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [serialization]problem with tree-structure

heinz meier
Hello Robert
Thanks for your attention. I read all about the test-library, but i'm not
sure how this can help finding the bug. What do you mean with failing test
exactly?

--
E-Mails und Internet immer und überall!
1&1 PocketWeb, perfekt mit GMX: http://www.gmx.net/de/go/pocketweb

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [serialization]problem with tree-structure

Oni Vagrant
It's my understanding, and I could be wrong, that a failing test case is one
where you expect failure.  Testing only correct values or operations doesn't
tell you that the test succeeded, if you also don't test values or
operations you do not want to succeed.

In your situation, you might want to test a single node serialization that
should not work, and make sure that the test actually goes the way you
expect it too.

My apologies for butting in here, I'm rather new to this list and this was
the first thing I felt confidant enough in answering.

Al Bechard

----- Original Message -----
From: "heinz meier" <[hidden email]>
To: <[hidden email]>
Sent: Friday, March 31, 2006 7:51 AM
Subject: Re: [Boost-users] [serialization]problem with tree-structure


> Hello Robert
> Thanks for your attention. I read all about the test-library, but i'm not
> sure how this can help finding the bug. What do you mean with failing test
> exactly?
>
> --
> E-Mails und Internet immer und überall!
> 1&1 PocketWeb, perfekt mit GMX: http://www.gmx.net/de/go/pocketweb
>


--------------------------------------------------------------------------------


> _______________________________________________
> Boost-users mailing list
> [hidden email]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users 



_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users