Boost logo

Boost Users :

From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2006-05-07 08:36:21

----- Mensaje original -----
De: Julien Pervillé <julien.perville_at_[hidden]>
Fecha: Sábado, Mayo 6, 2006 9:15 pm
Asunto: [Boost-users] [multi_index] const mem_fun serialization bug.

> Hello boost-users.
> I am writing to report an annoying serialization bug encountered
> while developing a project with Boost.multi_index, which is a
> wonderfully useful data structure. Thank you Joaquín!
> First a fast overview of my project:


> After hunting through the headers, I located the triggered
> exception to line 1080 of boost/multi_index/ordered_index.hpp
> (line number from boost 1.33)
> Here is the context from the "rearranger" method where the
> exception is thrown:
> > 1080 if(position!=x){

In Boost 1.33, tis is actually line 1088. Maybe a typo in your
post? Anyway, I don't think this is important.


> I am looking forward to test patches and offer my help testing,
> so that this little quirk gets solved.

Hello Julien, thank you very much for using Boost.MultiIndex
and for providing such a detailed bug report, with reproducible
test case and all --actually, having the test case has made it
easy to spot the problem.

This is a bug in B.MI, but it has nothing to do with
const_mem_fun. Rather it lies in the serialization loading
algorithm. I'd like you to make the following changes in your
local copy of B.MI (I'm assuming you've got 1.33 as per what
you say in the post):

1. Replace line 80 in boost/multi_index/detail/duplicates_iterator.hpp:


with the following:


This bug was previously spotted by Toby Smith, and it's
currently fixed in the CVS version of B.MI, soon to be
shipped with Boost 1.34. More details at:

2. Replace the beginning of rearranger() at line 1076 of

  void rearranger(node_type* position,node_type *x)
    node_type* before;

with the following:

  void rearranger(node_type* position,node_type *x)
    node_type* before;

3. Undo your previous hack which bypassed the archive_exception

That's it. I can confirm this makes seri-bug.cpp work OK. Could
you please verify whether it also solves the problems in your
real project? I'll devote some days to carefully study the
issue and, if nothing weird shows, will commit the fix in
the CVS HEAD and 1_33_4 branches next week.

Please comment your results back. Thanks for reporting,
best regards,

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at