|
Boost Users : |
Subject: Re: [Boost-users] boost::serialization trouble
From: Sebastian Weber (sebastian.weber_at_[hidden])
Date: 2010-07-16 04:44:43
Hi!
Appears to be difficult to make a short example, working on that right now.
In the meanwhile here is the backtrace of the crash:
#0 0x0000000100004777 in H5::DataType::DataType () at singleton.hpp:149
#1 0x00000001000049d3 in H5::AtomType::AtomType () at singleton.hpp:149
#2 0x0000000100004a53 in H5::PredType::PredType () at singleton.hpp:149
#3 0x0000000100002a83 in __static_initialization_and_
destruction_0 (__initialize_p=1, __priority=65535) at hdf5_types.cpp:17
#4 0x0000000100002f4a in global constructors keyed to hdf5_types.cpp () at
hdf5_types.cpp:40
#5 0x00007fff5fc0d500 in
__dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
()
#6 0x00007fff5fc0bcec in
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj ()
#7 0x00007fff5fc0bda6 in
__dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextE ()
#8 0x00007fff5fc0210e in __dyld__ZN4dyld24initializeMainExecutableEv ()
#9 0x00007fff5fc06981 in __dyld__ZN4dyld5_mainEPK12macho_headermiPPKcS5_S5_
()
#10 0x00007fff5fc016d2 in
__dyld__ZN13dyldbootstrap5startEPK12macho_headeriPPKcl ()
#11 0x00007fff5fc01052 in __dyld__dyld_start ()
the file hdf5_types.cpp does nothin special besides setting static const
variables of some classes and there is no reference to the singleton.hpp
code.
So, hold on a moment for a small code snippet demonstrating the error. In
any case I read somewhere that apple chaintool is for some reason not
ideally suited to handle such constants with ease. Did not get why, but
well...
Seebastian
On Thu, Jul 15, 2010 at 7:52 PM, Robert Ramey <ramey_at_[hidden]> wrote:
> Sebastian Weber wrote:
> > Hi!
> >
> > I am experiencing quite odd errors with the serialization library: My
> > program compiles fine, but crashes when static constants are
> > declared, i.e. before the program even starts with main(). The
> > debugger tells me that some singleton declared in the seralization
> > library conflicts:
> >
> > Program received signal EXC_BAD_ACCESS, Could not access memory.
> > Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
> > 0x0000000100003aaf in H5::DataType::DataType () at singleton.hpp:149
> > 149 BOOST_DLLEXPORT T & singleton<T>::instance =
> > singleton<T>::get_instance();
> >
> > Any suggestions would be great here.
>
> How about including the smallest example you can make which demostrates the
> problem?
>
>
> >What makes it even harder to
> > understand is the fact that the exact same code runs perferctly on a
> > Linux machine, whereas the crash is on MacOS 10.6. My setup here is a
> > boost 1.43.0 compiled with gcc 4.5 from pacports (or apples gcc 4.2,
> > no difference).
> >
> > It seems that the singleton does things which are not allowed on a
> > 10.6 MacOS machine...
> >
> > Many thanks for help,
>
> You're welcome.
>
> Robert Ramey
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
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