Re: [Boost-users] [boost][msm] std::vector<MyStateMachine> generate stack overflow
It's not the vector, it's the copy constructor. You can see the same problem with :
RealStateMachine sma; RealStateMachine smb( sma );
At the moment I'm not sure exactly what makes it a recursive call. Was the generated state machine not thought to be copied, or did I made a mistake?
Yes, a state machine can be copied and no you didn't make any mistake. I think it's a compiler bug because: - it works fine with g++ 4.5 - the debugger doesn't even make it to the copy-constructor. I remember I had in the past problems when inheriting from a state machine with VC. The only solutions I see is to use a typedef instead or using aggregation instead of inheritance. This works: typedef boost::msm::back::state_machine< StateMachine > RealStateMachine; Unfortunately, I cannot help on this. Maybe Stephan is aware of this problem? Christophe
[Christophe Henry]
Maybe Stephan is aware of this problem?
I haven't heard of this problem before. (Is a templated constructor involved? They can be squirrely.) If you can provide a self-contained test case in the form of a preprocessed file, I can file a compiler bug - but it would be better if you filed one through Microsoft Connect, since that way you can directly get feedback (and they can ask you for more info if necessary). Stephan T. Lavavej Visual C++ Libraries Developer
On Fri, May 20, 2011 at 06:51, Stephan T. Lavavej < stl@exchange.microsoft.com> wrote:
[Christophe Henry]
Maybe Stephan is aware of this problem?
I haven't heard of this problem before. (Is a templated constructor involved? They can be squirrely.)
I didn't write one, here is the state machine declaration (from my previous email): class StateMachine : public boost::msm::front::state_machine_def< StateMachine > { public: typedef State_HelloWorld initial_state; struct transition_table : public boost::mpl::vector < _row< State_HelloWorld, event::exit, State_Exit > > {}; StateMachine(); ~StateMachine(); }; class RealStateMachine : public boost::msm::back::state_machine< StateMachine > { public: }; A link to the email, there is a link to the full test project zip: http://permalink.gmane.org/gmane.comp.lib.boost.user/67960
If you can provide a self-contained test case in the form of a preprocessed file, I can file a compiler bug - but it would be better if you filed one through Microsoft Connect, since that way you can directly get feedback (and they can ask you for more info if necessary).
Ok, I will create provide that project to MS Connect then. Joël Lamotte
I made a report to Microsoft : https://connect.microsoft.com/VisualStudio/feedback/details/669609/boost-msm... I'm not sure it is clear enough... Joël Lamotte
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 5/20/2011 9:16 PM, Klaim - Joël Lamotte wrote:
I made a report to Microsoft : https://connect.microsoft.com/VisualStudio/feedback/details/669609/boost-msm...
I'm not sure it is clear enough...
It's not what Steven asked for. You should attach to the bug a self-contained, *preprocessed* source file that reproduces the error. The MS engineers shouldn't have to install boost to begin their investigation. They probably won't. - -- Eric Niebler BoostPro Computing http://www.boostpro.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJN1pRKAAoJEAeJsEDfjLbXv+AIAID47CXkL512HBLkOk8Rdqc9 pHMke8zFwuFXPkns/NhpS53gpSIyyx/buX9OjVLNdT7/DgXc9ZNeu2cMKByDs2r+ kGM1Hqf5jt8JXyHyRkLGislGzm4+y6uMrO6yNVKB4w8ITeEdsy/wKMIbEUgauJBu PUf9pDO0pao4L7fqZlv87oEWRN5bMVsZOqyHTZAWTcjkKXDUkxBatqxDnXxUkT44 tp2UpbQJcWEnN0k+u//0IBEIdYkvr/MIa8EeHj5MRI5A/hLu1/x2185bDbSoKvQH zXlCW9Ct9pPAa10e2cBAysUBl6bRe8nP84VvxZhMbgWJuB9l2129FFkFEuU83HA= =FSxE -----END PGP SIGNATURE-----
2011/5/20 Eric Niebler
It's not what Steven asked for. You should attach to the bug a self-contained, *preprocessed* source file that reproduces the error. The MS engineers shouldn't have to install boost to begin their investigation. They probably won't.
Sorry, I missed that part and couldn't get back to it yet. However I received an answer from the VC++ team and it seems that it will not be fixed : Hello Joel, Thank you for reporting this issue. We believe that this is the
same issue as the one reported here: https://connect.microsoft.com/VisualStudio/feedback/details/522094/warning-c... and here: http://connect.microsoft.com/VisualStudio/feedback/details/423737/default-co... Unfortunately, we cannot address this issue in the upcoming VS release as it could potentially result in a silent change in behavior. Please let us know if you believe this issue is different than the above. thanks, Marian Luparu Visual C++
I still have to check the preprocessed file to make sure it's the same problems. Joël Lamotte
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 5/25/2011 2:39 PM, Klaim - Joël Lamotte wrote:
However I received an answer from the VC++ team and it seems that it will not be fixed :
Hello Joel, Thank you for reporting this issue. We believe that this is the same issue as the one reported here: https://connect.microsoft.com/VisualStudio/feedback/details/522094/warning-c... and here: http://connect.microsoft.com/VisualStudio/feedback/details/423737/default-co... Unfortunately, we cannot address this issue in the upcoming VS release as it could potentially result in a silent change in behavior. Please let us know if you believe this issue is different than the above. thanks, Marian Luparu Visual C++
One of these days, Microsoft is actually going to fix one of the bugs we report to them and I'm going to fall over dead from shock. ;-) Thanks, - -- Eric Niebler BoostPro Computing http://www.boostpro.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJN3LOkAAoJEAeJsEDfjLbXEfoH/22QdiGYmBl1OWyDrBK+KHl4 UVrZUaHYorUtaxRHcSv7mAWrj3S2Pqggps8eDTTJmq8jNeIVCbxc1adfqg51L/LT 3kEQWQp/ImAoZPOR73XhlNc7IKX8qc0+lDlNIzud280aY+YfpwGx5DVQPJw7ZpwI ZEC0IuIIzYAh560VQ0PE8rw+4nf3DCNDd+lhRc1zVSyy1IZtM4pg84tQyQNpWSxo 6lSIeLJqI+U6eEaRm7GH4mX/yCasXg5Kok8oi3EWmjJJKF/TQbnU8VQoNn0BzNTs PdL8MVIK15ylSG1L6gpEA1NEvTlazuNL8dXlailgx0UT9Jtcn7nLd0BhPMJHtMI= =SEdW -----END PGP SIGNATURE-----
participants (4)
-
Christophe Henry
-
Eric Niebler
-
Klaim - Joël Lamotte
-
Stephan T. Lavavej