I\'ve seen a few questions that refer to the std::bad_function_call exception, but haven\'t been able to find out any by Googling about what causes this exception.
W
in my case was the problem was in capture list. i have a recursive lambda function.
//decl std::function f_build; f_build = [&f_build](const SBone* bone, const core::vector3df& pos, const core::quaternion& rot) { ... }
missing & from f_build in capture list generate a bad call.