Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when playing a scenario with a set trigger #3

Closed
jcelerier opened this issue Oct 28, 2015 · 3 comments
Closed

Crash when playing a scenario with a set trigger #3

jcelerier opened this issue Oct 28, 2015 · 3 comments
Assignees
Labels

Comments

@jcelerier
Copy link
Member

crash

Trace :

0   std::__cxx11::list<std::function<void (bool)>>::erase(std::_List_const_iterator<std::function<void (bool)>>)    list.tcc    155 0x7fffe4c7ef0c  
1   OSSIA::CallbackContainer<std::function<void (bool)>>::removeCallback(std::_List_const_iterator<std::function<void (bool)>>) CallbackContainer.h 52  0x7fffe4c7e5c4  
2   JamomaExpressionAtom::removeCallback(std::_List_const_iterator<std::function<void (bool)>>) ExpressionAtom.cpp  123 0x7fffe4c93e85  
3   JamomaTimeNode::observeExpressionResult TimeNode.cpp    236 0x7fffe4ca8b3a  
4   JamomaTimeNode::process TimeNode.cpp    211 0x7fffe4ca88aa  
5   JamomaTimeNode::process TimeNode.cpp    147 0x7fffe4ca82a3  
6   JamomaScenario::state   Scenario.cpp    74  0x7fffe4c64d1a  
7   JamomaTimeConstraint::state TimeConstraint.cpp  130 0x7fffe4c77b4e  
8   JamomaTimeConstraint::ClockCallback TimeConstraint.cpp  228 0x7fffe4c76c4c  
9   std::_Mem_fn_base<void (JamomaTimeConstraint:: *)(OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char), true>::operator()<OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char, void>(JamomaTimeConstraint *, OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char&&) const   functional  600 0x7fffe4c7b6fb  
10  std::_Bind<std::_Mem_fn<void (JamomaTimeConstraint:: *)(OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char)> (JamomaTimeConstraint *, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>)>::__call<void, OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char&&, 0ul, 1ul, 2ul, 3ul>(std::tuple<OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char&&>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul>)  functional  1073    0x7fffe4c7b5c5  
11  std::_Bind<std::_Mem_fn<void (JamomaTimeConstraint:: *)(OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char)> (JamomaTimeConstraint *, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>)>::operator()<OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char, void>(OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char&&) functional  1131    0x7fffe4c7b4c7  
12  std::_Function_handler<void (OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char), std::_Bind<std::_Mem_fn<void (JamomaTimeConstraint:: *)(OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char)> (JamomaTimeConstraint *, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>)>>::_M_invoke(std::_Any_data const&, OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char&&)  functional  1871    0x7fffe4c7b16c  
13  std::function<void (OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char)>::operator()(OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char) const    functional  2271    0x7fffe4c9a656  
14  JamomaClock::tick   Clock.cpp   186 0x7fffe4c99b08  
15  virtual thunk to JamomaClock::tick()    Clock.cpp   112 0x7fffe4c99c32  
16  JamomaScenario::state   Scenario.cpp    87  0x7fffe4c64f9c  
17  JamomaTimeConstraint::state TimeConstraint.cpp  130 0x7fffe4c77b4e  
18  JamomaTimeConstraint::ClockCallback TimeConstraint.cpp  228 0x7fffe4c76c4c  
19  std::_Mem_fn_base<void (JamomaTimeConstraint:: *)(OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char), true>::operator()<OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char, void>(JamomaTimeConstraint *, OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char&&) const   functional  600 0x7fffe4c7b6fb  
20  std::_Bind<std::_Mem_fn<void (JamomaTimeConstraint:: *)(OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char)> (JamomaTimeConstraint *, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>)>::__call<void, OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char&&, 0ul, 1ul, 2ul, 3ul>(std::tuple<OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char&&>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul>)  functional  1073    0x7fffe4c7b5c5  
21  std::_Bind<std::_Mem_fn<void (JamomaTimeConstraint:: *)(OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char)> (JamomaTimeConstraint *, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>)>::operator()<OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char, void>(OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char&&) functional  1131    0x7fffe4c7b4c7  
22  std::_Function_handler<void (OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char), std::_Bind<std::_Mem_fn<void (JamomaTimeConstraint:: *)(OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char)> (JamomaTimeConstraint *, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>)>>::_M_invoke(std::_Any_data const&, OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char&&)  functional  1871    0x7fffe4c7b16c  
23  std::function<void (OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char)>::operator()(OSSIA::TimeValue const&, OSSIA::TimeValue const&, unsigned char) const    functional  2271    0x7fffe4c9a656  
24  JamomaClock::tick   Clock.cpp   186 0x7fffe4c99b08  
25  JamomaClock::threadCallback Clock.cpp   294 0x7fffe4c99457  
26  std::_Mem_fn_base<void (JamomaClock:: *)(), true>::operator()<, void>(JamomaClock *) const  functional  600 0x7fffe4c9cca9  
27  std::_Bind_simple<std::_Mem_fn<void (JamomaClock:: *)()> (JamomaClock *)>::_M_invoke<0ul>(std::_Index_tuple<0ul>)   functional  1530    0x7fffe4c9cc12  
28  std::_Bind_simple<std::_Mem_fn<void (JamomaClock:: *)()> (JamomaClock *)>::operator()() functional  1520    0x7fffe4c9cbc5  
29  std::thread::_Impl<std::_Bind_simple<std::_Mem_fn<void (JamomaClock:: *)()> (JamomaClock *)>>::_M_run() thread  115 0x7fffe4c9c8d9  
30  ??          0x7ffff5ade5c0  
31  start_thread    /usr/lib/debug/lib/x86_64-linux-gnu/libpthread-2.19.so  309 0x7ffff4f520a4  
32  clone   /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.19.so    111 0x7ffff524d06d  

From the looks of it it happens because on TimeNode.cpp:236, the argument of removeCallback is bogus.

@jcelerier jcelerier changed the title Crash when a trigger is set Crash when playing a scenario with a set trigger Oct 28, 2015
@theod
Copy link
Member

theod commented Nov 6, 2015

do you have a scenario to reproduce this crash ?
because I tried to do the same (with 1 == 2 expression) and it never crashes

@theod theod added the bug label Nov 6, 2015
@theod theod self-assigned this Nov 6, 2015
@theod
Copy link
Member

theod commented Nov 19, 2015

I've never encountered such a bug and it seems you have made some work to check the existence of the callback before to erase it so I close the issue

@theod theod closed this as completed Nov 19, 2015
@jcelerier
Copy link
Member Author

Yes, it occured because the value was not initialized, hence 90% of the
time it would be initialized to 0 which would work and sometimes it would
randomly crash.


Jean-Michaël Celerier
http://www.jcelerier.name

On Fri, Nov 20, 2015 at 12:24 AM, theod [email protected] wrote:

Closed #3 #3.


Reply to this email directly or view it on GitHub
#3 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants