Upon further investigation, the crash is inside the software center launcher icon. I get a segfault about 50% of the time when running the autopilot test. Here's the stack trace:
#0 0x00007fffe4f02ca2 in unity::launcher::SoftwareCenterLauncherIcon::Animate (this=0x0, launcher=..., icon_x=100, icon_y=100, icon_size=32)
at /home/thomi/code/canonical/unity/sc-integration-phase2/plugins/unityshell/src/SoftwareCenterLauncherIcon.cpp:92
#1 0x00007fffe509ecd7 in unity::launcher::Controller::Impl::OnLauncherAddRequestSpecial (this=0x903c90, path=..., before=..., aptdaemon_trans_id=..., icon_path=...,
icon_x=100, icon_y=100, icon_size=32) at /home/thomi/code/canonical/unity/sc-integration-phase2/plugins/unityshell/src/LauncherController.cpp:406
#2 0x00007fffe50aa989 in sigc::bound_mem_functor7<void, unity::launcher::Controller::Impl, std::string const&, nux::ObjectPtr<unity::launcher::AbstractLauncherIcon>, std::string const&, std::string const&, int, int, int>::operator() (this=0xd24498, _A_a1=..., _A_a2=..., _A_a3=..., _A_a4=..., _A_a5=@0x7fffffffe0f0: 100,
_A_a6=@0x7fffffffe0f4: 100, _A_a7=@0x7fffffffe0f8: 32) at /usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:2277
#3 0x00007fffe50a9d5f in sigc::adaptor_functor<sigc::bound_mem_functor7<void, unity::launcher::Controller::Impl, std::string const&, nux::ObjectPtr<unity::launcher::AbstractLauncherIcon>, std::string const&, std::string const&, int, int, int> >::operator()<std::string const&, nux::ObjectPtr<unity::launcher::AbstractLauncherIcon> const&, std::string const&, std::string const&, int const&, int const&, int const&> (this=0xd24490, _A_arg1=..., _A_arg2=..., _A_arg3=..., _A_arg4=...,
_A_arg5=@0x7fffffffe0f0: 100, _A_arg6=@0x7fffffffe0f4: 100, _A_arg7=@0x7fffffffe0f8: 32) at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:213
#4 0x00007fffe50a89b2 in sigc::internal::slot_call7<sigc::bound_mem_functor7<void, unity::launcher::Controller::Impl, std::string const&, nux::ObjectPtr<unity::launcher::AbstractLauncherIcon>, std::string const&, std::string const&, int, int, int>, void, std::string const&, nux::ObjectPtr<unity::launcher::AbstractLauncherIcon>, std::string const&, std::string const&, int, int, int>::call_it (rep=0xd24460, a_1=..., a_2=..., a_3=..., a_4=..., a_5=@0x7fffffffe0f0: 100, a_6=@0x7fffffffe0f4: 100,
a_7=@0x7fffffffe0f8: 32) at /usr/include/sigc++-2.0/sigc++/functors/slot.h:383
#5 0x00007fffe508b1e9 in sigc::internal::signal_emit7<void, std::string const&, nux::ObjectPtr<unity::launcher::AbstractLauncherIcon>, std::string const&, std::string const&, int, int, int, sigc::nil>::emit (impl=0xd24410, _A_a1=..., _A_a2=..., _A_a3=..., _A_a4=..., _A_a5=@0x7fffffffe0f0: 100, _A_a6=@0x7fffffffe0f4: 100,
_A_a7=@0x7fffffffe0f8: 32) at /usr/include/sigc++-2.0/sigc++/signal.h:2567
#6 0x00007fffe508995d in sigc::signal7<void, std::string const&, nux::ObjectPtr<unity::launcher::AbstractLauncherIcon>, std::string const&, std::string const&, int, int, int, sigc::nil>::emit (this=0xca1690, _A_a1=..., _A_a2=..., _A_a3=..., _A_a4=..., _A_a5=@0x7fffffffe0f0: 100, _A_a6=@0x7fffffffe0f4: 100, _A_a7=@0x7fffffffe0f8: 32)
at /usr/include/sigc++-2.0/sigc++/signal.h:3471
#7 0x00007fffe508737e in unity::launcher::Launcher::handle_dbus_method_call (connection=0x7fffd4006810, sender=0x7fffcc01d0f0 ":1.420",
object_path=0x7fffcc011c20 "/com/canonical/Unity/Launcher", interface_name=0x7fffcc024a20 "com.canonical.Unity.Launcher",
method_name=0x7fffcc027af0 "AddLauncherItemFromPosition", parameters=0x7fffcc02e0a0, invocation=0x2688ea0, user_data=0xca1240)
at /home/thomi/code/canonical/unity/sc-integration-phase2/plugins/unityshell/src/Launcher.cpp:2856
#8 0x00007ffff1bd6b5d in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#9 0x00007ffff5bacdda in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007ffff5bad1a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007ffff5bad59a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00000000004029ae in main ()
This seems to be caused by the fact that in /plugins/unityshell/src/LauncherController.cpp line 406 you do this:
without checking that the result from "result.GetPOinter()" is valid. The CreateSCLauncherIcon method that creates the icon you're calling looks like this - I've added some notes to show what's wrong:
727 icon->SetSortPriority(sort_priority_++);
728
729 result = icon;
...and finally assign it to 'result'.
730 return result;
731 }
Only if all those if statements pass will this do what you want. Inf act, what's happening is that the second time I run the AP test, this if statement:
I am still working on why the autopilot test gives you an error on cleanup, but this needs to be fixed before I can run the autopilot tests repeatedly. Please ping me on IRC if you have any questions.
Hi,
Upon further investigation, the crash is inside the software center launcher icon. I get a segfault about 50% of the time when running the autopilot test. Here's the stack trace:
#0 0x00007fffe4f02ca2 in unity:: launcher: :SoftwareCenter LauncherIcon: :Animate (this=0x0, launcher=..., icon_x=100, icon_y=100, icon_size=32) code/canonical/ unity/sc- integration- phase2/ plugins/ unityshell/ src/SoftwareCen terLauncherIcon .cpp:92 launcher: :Controller: :Impl:: OnLauncherAddRe questSpecial (this=0x903c90, path=..., before=..., aptdaemon_ trans_id= ..., icon_path=..., code/canonical/ unity/sc- integration- phase2/ plugins/ unityshell/ src/LauncherCon troller. cpp:406 mem_functor7< void, unity:: launcher: :Controller: :Impl, std::string const&, nux::ObjectPtr< unity:: launcher: :AbstractLaunch erIcon> , std::string const&, std::string const&, int, int, int>::operator() (this=0xd24498, _A_a1=..., _A_a2=..., _A_a3=..., _A_a4=..., _A_a5=@ 0x7fffffffe0f0: 100, a6=@0x7fffffffe 0f4: 100, _A_a7=@ 0x7fffffffe0f8: 32) at /usr/include/ sigc++- 2.0/sigc+ +/functors/ mem_fun. h:2277 functor< sigc::bound_ mem_functor7< void, unity:: launcher: :Controller: :Impl, std::string const&, nux::ObjectPtr< unity:: launcher: :AbstractLaunch erIcon> , std::string const&, std::string const&, int, int, int> >::operator( )<std:: string const&, nux::ObjectPtr< unity:: launcher: :AbstractLaunch erIcon> const&, std::string const&, std::string const&, int const&, int const&, int const&> (this=0xd24490, _A_arg1=..., _A_arg2=..., _A_arg3=..., _A_arg4=..., arg5=@0x7ffffff fe0f0: 100, _A_arg6= @0x7fffffffe0f4 : 100, _A_arg7= @0x7fffffffe0f8 : 32) at /usr/include/ sigc++- 2.0/sigc+ +/adaptors/ adaptor_ trait.h: 213 :slot_call7< sigc::bound_ mem_functor7< void, unity:: launcher: :Controller: :Impl, std::string const&, nux::ObjectPtr< unity:: launcher: :AbstractLaunch erIcon> , std::string const&, std::string const&, int, int, int>, void, std::string const&, nux::ObjectPtr< unity:: launcher: :AbstractLaunch erIcon> , std::string const&, std::string const&, int, int, int>::call_it (rep=0xd24460, a_1=..., a_2=..., a_3=..., a_4=..., a_5=@0x7fffffff e0f0: 100, a_6=@0x7fffffff e0f4: 100, @0x7fffffffe0f8 : 32) at /usr/include/ sigc++- 2.0/sigc+ +/functors/ slot.h: 383 :signal_ emit7<void, std::string const&, nux::ObjectPtr< unity:: launcher: :AbstractLaunch erIcon> , std::string const&, std::string const&, int, int, int, sigc::nil>::emit (impl=0xd24410, _A_a1=..., _A_a2=..., _A_a3=..., _A_a4=..., _A_a5=@ 0x7fffffffe0f0: 100, _A_a6=@ 0x7fffffffe0f4: 100, a7=@0x7fffffffe 0f8: 32) at /usr/include/ sigc++- 2.0/sigc+ +/signal. h:2567 unity:: launcher: :AbstractLaunch erIcon> , std::string const&, std::string const&, int, int, int, sigc::nil>::emit (this=0xca1690, _A_a1=..., _A_a2=..., _A_a3=..., _A_a4=..., _A_a5=@ 0x7fffffffe0f0: 100, _A_a6=@ 0x7fffffffe0f4: 100, _A_a7=@ 0x7fffffffe0f8: 32) sigc++- 2.0/sigc+ +/signal. h:3471 launcher: :Launcher: :handle_ dbus_method_ call (connection= 0x7fffd4006810, sender= 0x7fffcc01d0f0 ":1.420", path=0x7fffcc01 1c20 "/com/canonical /Unity/ Launcher" , interface_ name=0x7fffcc02 4a20 "com.canonical. Unity.Launcher" , name=0x7fffcc02 7af0 "AddLauncherIte mFromPosition" , parameters= 0x7fffcc02e0a0, invocation= 0x2688ea0, user_data=0xca1240) code/canonical/ unity/sc- integration- phase2/ plugins/ unityshell/ src/Launcher. cpp:2856 x86_64- linux-gnu/ libgio- 2.0.so. 0 context_ dispatch () from /lib/x86_ 64-linux- gnu/libglib- 2.0.so. 0 64-linux- gnu/libglib- 2.0.so. 0 64-linux- gnu/libglib- 2.0.so. 0
at /home/thomi/
#1 0x00007fffe509ecd7 in unity::
icon_x=100, icon_y=100, icon_size=32) at /home/thomi/
#2 0x00007fffe50aa989 in sigc::bound_
_A_
#3 0x00007fffe50a9d5f in sigc::adaptor_
_A_
#4 0x00007fffe50a89b2 in sigc::internal:
a_7=
#5 0x00007fffe508b1e9 in sigc::internal:
_A_
#6 0x00007fffe508995d in sigc::signal7<void, std::string const&, nux::ObjectPtr<
at /usr/include/
#7 0x00007fffe508737e in unity::
object_
method_
at /home/thomi/
#8 0x00007ffff1bd6b5d in ?? () from /usr/lib/
#9 0x00007ffff5bacdda in g_main_
#10 0x00007ffff5bad1a0 in ?? () from /lib/x86_
#11 0x00007ffff5bad59a in g_main_loop_run () from /lib/x86_
#12 0x00000000004029ae in main ()
This seems to be caused by the fact that in /plugins/ unityshell/ src/LauncherCon troller. cpp line 406 you do this:
static_ cast<SoftwareCe nterLauncherIco n*>(result. GetPointer( ))->Animate( launcher_ , icon_x, icon_y, icon_size);
without checking that the result from "result. GetPOinter( )" is valid. The CreateSCLaunche rIcon method that creates the icon you're calling looks like this - I've added some notes to show what's wrong:
706 Controller: :Impl:: CreateSCLaunche rIcon(std: :string const& file_path, rIcon:: Ptr result;
707 std::string const& aptdaemon_trans_id,
708 std::string const& icon_path)
709 {
710 BamfApplication* app;
711 AbstractLaunche
Here, 'result' is a null ptr.
712 get_application _for_desktop_ file(matcher_ , file_path.c_str(), true); IS_APPLICATION( app))
713 app = bamf_matcher_
714 if (!BAMF_
715 return result;
Here, you're returning a null ptr.
716 get_qdata( G_OBJECT( app), g_quark_ from_static_ string( "unity- seen")) ) set_sticky( BAMF_VIEW( app), true);
717 if (g_object_
718 {
719 bamf_view_
720 return result;
... and same here too.
721 } set_qdata( G_OBJECT( app), g_quark_ from_static_ string( "unity- seen"), GINT_TO_ POINTER( 1)); set_sticky( BAMF_VIEW( app), true); rIcon:: Ptr icon(new SoftwareCenterL auncherIcon( app, aptdaemon_trans_id, icon_path));
722
723 g_object_
724
725 bamf_view_
726 AbstractLaunche
Here you create the icon...
727 icon->SetSortPr iority( sort_priority_ ++);
728
729 result = icon;
...and finally assign it to 'result'.
730 return result;
731 }
Only if all those if statements pass will this do what you want. Inf act, what's happening is that the second time I run the AP test, this if statement:
717 if (g_object_ get_qdata( G_OBJECT( app), g_quark_ from_static_ string( "unity- seen")) ) set_sticky( BAMF_VIEW( app), true);
718 {
719 bamf_view_
720 return result;
721 }
...evaluates to true, and you return null.
I am still working on why the autopilot test gives you an error on cleanup, but this needs to be fixed before I can run the autopilot tests repeatedly. Please ping me on IRC if you have any questions.
Cheers,