Boost logo

Boost Users :

Subject: [Boost-users] compiler crash in signals2?
From: Noah Roberts (roberts.noah_at_[hidden])
Date: 2011-04-08 13:54:18


I get this error:
1>------ Build started: Project: barf, Configuration: Debug Win32 ------
1> main.cpp
1> using native typeof
1>d:\boost-1.42.0-msvc10\boost-1.42-msvc10\include\boost\smart_ptr\shared_ptr.hpp(231):
fatal error C1001: An internal error has occurred in the compiler.
1> (compiler file 'msc1.cpp', line 1420)
1> To work around this problem, try simplifying or changing the
program near the locations listed above.
1> Please choose the Technical Support command on the Visual C++
1> Help menu, or open the Technical Support help file for more information
1>
d:\boost-1.42.0-msvc10\boost-1.42-msvc10\include\boost\signals2\detail\signal_template.hpp(699)
: while compiling class template member function 'boost::shared_ptr<T>
boost::signals2::signal1<R,T1,Combiner,Group,GroupCompare,SlotFunction,ExtendedSlotFunction,Mutex>::lock_pimpl(void)
const'
1> with
1> [
1> T=void,
1> R=void,
1> T1=const esi::units::unit_settings &,
1> Combiner=boost::signals2::optional_last_value<void>,
1> Group=int,
1> GroupCompare=std::less<int>,
1> SlotFunction=boost::function<void (const
esi::units::unit_settings &)>,
1> ExtendedSlotFunction=boost::function<void (const
boost::signals2::connection &,const esi::units::unit_settings &)>,
1> Mutex=boost::signals2::mutex
1> ]
1>
d:\boost-1.42.0-msvc10\boost-1.42-msvc10\include\boost\signals2\preprocessed_signal.hpp(42)
: see reference to class template instantiation
'boost::signals2::signal1<R,T1,Combiner,Group,GroupCompare,SlotFunction,ExtendedSlotFunction,Mutex>'
being compiled
1> with
1> [
1> R=void,
1> T1=const esi::units::unit_settings &,
1> Combiner=boost::signals2::optional_last_value<void>,
1> Group=int,
1> GroupCompare=std::less<int>,
1> SlotFunction=boost::function<void (const
esi::units::unit_settings &)>,
1> ExtendedSlotFunction=boost::function<void (const
boost::signals2::connection &,const esi::units::unit_settings &)>,
1> Mutex=boost::signals2::mutex
1> ]
1>
d:\dev_workspace\pfp_qt\experiment\build\include\esi\units\unit_settings.hpp(284)
: see reference to class template instantiation
'boost::signals2::signal<Signature>' being compiled
1> with
1> [
1> Signature=void (const esi::units::unit_settings &)
1> ]
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

The version of boost I'm using is 1.42. I'm wondering if this problem
has turned up before and if its got a fix.

I'm not entirely convinced that it actually has anything to do with what
it's claiming the cause is. I'm working on a library that does a lot of
recursive template instantiations and behaves in a similar manner to
fusion in many respects. Previous directions I went with this library
already cause compiler crashes on a regular basis (2010 apparently
doesn't do well with recursive calls to auto->decltype template
functions). My library code could certainly use some cleaning up, but
it's all legal C++ as far as I can tell.

Also, this crash only happens when I try to use in conjunction with said
library and only happens when the construct containing the signal is in
a particular header file. If I move it to another and go ahead and
include that one...everything works just fine.

Obviously, this is VS's fault, not mine or boost's...but if there's a
workaround/fix that's been made for this problem (assuming it is related
to signals2 and comes up for other people) I'd like to be aware of it.


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