** Changed in: unity-scopes-api (Ubuntu)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity-scopes-api in
Ubuntu.
https://bugs.launchpad.net/bugs/1442164

Title:
  Segfault in tests when calling subsearch() with MockScope

Status in unity-scopes-api package in Ubuntu:
  Fix Released

Bug description:
  Getting crash with the below stacktrace. After a quick look I think
  this is because the method that checks for loops does this:

          auto scope_impl = dynamic_pointer_cast<ScopeImpl>(scope);
          auto logger = scope_impl->runtime()->logger();

  without checking if scope_impl is not null (which is the case for
  MockScope according to the comment in the code above). And I remember
  myself commenting about this is the MP for this change ;)

  Program received signal SIGSEGV, Segmentation fault.
  unity::scopes::internal::ScopeImpl::runtime (this=0x0) at 
/src/unity-scopes-api/unity-scopes-api/src/scopes/internal/ScopeImpl.cpp:60
  60          return runtime_;
  (gdb) bt
  #0  unity::scopes::internal::ScopeImpl::runtime (this=0x0) at 
/src/unity-scopes-api/unity-scopes-api/src/scopes/internal/ScopeImpl.cpp:60
  #1  0x00007ffff7acbe17 in 
unity::scopes::internal::SearchQueryBaseImpl::check_for_query_loop 
(this=0x7fffffffbd20, scope=warning: RTTI symbol not found for class 
'std::_Sp_counted_ptr<unity::scopes::testing::MockScope*, 
(__gnu_cxx::_Lock_policy)2>'
  warning: RTTI symbol not found for class 
'std::_Sp_counted_ptr<unity::scopes::testing::MockScope*, 
(__gnu_cxx::_Lock_policy)2>'
  std::shared_ptr (count 5, weak 0) 0x8aeb20, reply=
      std::shared_ptr (count 9133936, weak -1) 0x862d10 <vtable for 
BufferedResultForwarder+16>) at 
/src/unity-scopes-api/unity-scopes-api/src/scopes/internal/SearchQueryBaseImpl.cpp:186
  #2  0x00007ffff7ace00f in 
unity::scopes::internal::SearchQueryBaseImpl::subsearch (this=0x8affd0, 
scope=warning: RTTI symbol not found for class 
'std::_Sp_counted_ptr<unity::scopes::testing::MockScope*, 
(__gnu_cxx::_Lock_policy)2>'
  warning: RTTI symbol not found for class 
'std::_Sp_counted_ptr<unity::scopes::testing::MockScope*, 
(__gnu_cxx::_Lock_policy)2>'
  Python Exception <class 'ValueError'> Cannot find type const 
std::set<std::basic_string<char, std::char_traits<char>, std::allocator<char> 
>, std::less<std::basic_string<char, std::char_traits<char>, 
std::allocator<char> > >, std::allocator<std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > > >::_Rep_type: 
  std::shared_ptr (count 5, weak 0) 0x8aeb20, keywords=std::set with 0 
elements, query_string="test", 
      department_id="aggregated:musicaggregator", filter_state=..., 
metadata=..., reply=warning: RTTI symbol not found for class 
'std::_Sp_counted_ptr_inplace<BufferedResultForwarder, 
std::allocator<BufferedResultForwarder>, (__gnu_cxx::_Lock_policy)2>'
  warning: RTTI symbol not found for class 
'std::_Sp_counted_ptr_inplace<BufferedResultForwarder, 
std::allocator<BufferedResultForwarder>, (__gnu_cxx::_Lock_policy)2>'
  std::shared_ptr (count 3, weak 0) 0x8b1f70)
      at 
/src/unity-scopes-api/unity-scopes-api/src/scopes/internal/SearchQueryBaseImpl.cpp:79
  #3  0x00007ffff7b1c872 in unity::scopes::SearchQueryBase::subsearch 
(this=0x7fffffffd670, scope=..., query_string="test", 
department_id="aggregated:musicaggregator", filter_state=..., hints=..., 
reply=warning: RTTI symbol not found for class 
'std::_Sp_counted_ptr_inplace<BufferedResultForwarder, 
std::allocator<BufferedResultForwarder>, (__gnu_cxx::_Lock_policy)2>'
  warning: RTTI symbol not found for class 
'std::_Sp_counted_ptr_inplace<BufferedResultForwarder, 
std::allocator<BufferedResultForwarder>, (__gnu_cxx::_Lock_policy)2>'

  std::shared_ptr (count 3, weak 0) 0x8b1f70) at 
/src/unity-scopes-api/unity-scopes-api/src/scopes/SearchQueryBase.cpp:117
  #4  0x00000000005b4e9b in 
MusicAggregatorQuery::run(std::shared_ptr<unity::scopes::SearchReply> const&) ()
  #5  0x0000000000564e4e in 
TestMusicAgregator_TestSpecificSearch_Test::TestBody() ()
  #6  0x00000000005e8500 in void 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, 
void>(testing::Test*, void (testing::Test::*)(), char const*) ()
  #7  0x00000000005e3a3f in void 
testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, 
void>(testing::Test*, void (testing::Test::*)(), char const*) ()
  #8  0x00000000005ca52b in testing::Test::Run() ()
  #9  0x00000000005cad35 in testing::TestInfo::Run() ()
  #10 0x00000000005cb382 in testing::TestCase::Run() ()
  #11 0x00000000005d1dc4 in testing::internal::UnitTestImpl::RunAllTests() ()
  #12 0x00000000005e9411 in bool 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
 bool>(testing::internal::UnitTestImpl*, bool 
(testing::internal::UnitTestImpl::*)(), char const*) ()
  #13 0x00000000005e48c9 in bool 
testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
 bool>(testing::internal::UnitTestImpl*, bool 
(testing::internal::UnitTestImpl::*)(), char const*) ()
  #14 0x00000000005d0a54 in testing::UnitTest::Run() ()
  #15 0x0000000000567986 in RUN_ALL_TESTS() ()
  #16 0x00000000005662ff in main ()

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unity-scopes-api/+bug/1442164/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to