Here's the valgrind output of the error from earlier in the day when I could reproduce it (on mako):
==8894== Invalid read of size 4
==8894== at 0x4867B78: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_weak_release() (shared_ptr_base.h:190)
==8894== by 0x4866B39: std::__weak_count<(__gnu_cxx::_Lock_policy)2>::~__weak_count() (shared_ptr_base.h:755)
==8894== by 0x4866279: std::__weak_ptr<mir::client::ClientPlatformFactory, (__gnu_cxx::_Lock_policy)2>::~__weak_ptr() (shared_ptr_base.h:1350)
==8894== by 0x4866293: std::weak_ptr<mir::client::ClientPlatformFactory>::~weak_ptr() (shared_ptr.h:467)
==8894== by 0x48662D3: mir::CachedPtr<mir::client::ClientPlatformFactory>::~CachedPtr() (cached_ptr.h:28)
==8894== by 0x486E3F7: mir::client::DefaultConnectionConfiguration::~DefaultConnectionConfiguration() (in /home/phablet/mir/boom/lib/libmirclient.so.8)
==8894== by 0x486E441: mir::client::DefaultConnectionConfiguration::~DefaultConnectionConfiguration() (default_connection_configuration.h:46)
==8894== by 0x4855E8F: std::default_delete<mir::client::ConnectionConfiguration>::operator()(mir::client::ConnectionConfiguration*) const (unique_ptr.h:76)
==8894== by 0x4855941: std::unique_ptr<mir::client::ConnectionConfiguration, std::default_delete<mir::client::ConnectionConfiguration> >::~unique_ptr() (unique_ptr.h:236)
==8894== by 0x4855071: (anonymous namespace)::DefaultMirConnectionAPI::connect(char const*, char const*, void (*)(MirConnection*, void*), void*) (mir_connection_api.cpp:75)
==8894== by 0x48552AB: mir_connect (mir_connection_api.cpp:140)
==8894== by 0x485530D: mir_connect_sync (mir_connection_api.cpp:156)
==8894== Address 0x5a92bf4 is not stack'd, malloc'd or (recently) free'd
==8894==
==8894==
==8894== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==8894== Access not within mapped region at address 0x5A92BF4
==8894== at 0x4867B78: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_weak_release() (shared_ptr_base.h:190)
==8894== by 0x4866B39: std::__weak_count<(__gnu_cxx::_Lock_policy)2>::~__weak_count() (shared_ptr_base.h:755)
==8894== by 0x4866279: std::__weak_ptr<mir::client::ClientPlatformFactory, (__gnu_cxx::_Lock_policy)2>::~__weak_ptr() (shared_ptr_base.h:1350)
==8894== by 0x4866293: std::weak_ptr<mir::client::ClientPlatformFactory>::~weak_ptr() (shared_ptr.h:467)
==8894== by 0x48662D3: mir::CachedPtr<mir::client::ClientPlatformFactory>::~CachedPtr() (cached_ptr.h:28)
==8894== by 0x486E3F7: mir::client::DefaultConnectionConfiguration::~DefaultConnectionConfiguration() (in /home/phablet/mir/boom/lib/libmirclient.so.8)
==8894== by 0x486E441: mir::client::DefaultConnectionConfiguration::~DefaultConnectionConfiguration() (default_connection_configuration.h:46)
==8894== by 0x4855E8F: std::default_delete<mir::client::ConnectionConfiguration>::operator()(mir::client::ConnectionConfiguration*) const (unique_ptr.h:76)
==8894== by 0x4855941: std::unique_ptr<mir::client::ConnectionConfiguration, std::default_delete<mir::client::ConnectionConfiguration> >::~unique_ptr() (unique_ptr.h:236)
==8894== by 0x4855071: (anonymous namespace)::DefaultMirConnectionAPI::connect(char const*, char const*, void (*)(MirConnection*, void*), void*) (mir_connection_api.cpp:75)
==8894== by 0x48552AB: mir_connect (mir_connection_api.cpp:140)
==8894== by 0x485530D: mir_connect_sync (mir_connection_api.cpp:156)
Here's the valgrind output of the error from earlier in the day when I could reproduce it (on mako):
==8894== Invalid read of size 4 counted_ base<(_ _gnu_cxx: :_Lock_ policy) 2>::_M_ weak_release( ) (shared_ ptr_base. h:190) weak_count< (__gnu_ cxx::_Lock_ policy) 2>::~__ weak_count( ) (shared_ ptr_base. h:755) weak_ptr< mir::client: :ClientPlatform Factory, (__gnu_ cxx::_Lock_ policy) 2>::~__ weak_ptr( ) (shared_ ptr_base. h:1350) ptr<mir: :client: :ClientPlatform Factory> ::~weak_ ptr() (shared_ptr.h:467) mir::client: :ClientPlatform Factory> ::~CachedPtr( ) (cached_ptr.h:28) :DefaultConnect ionConfiguratio n::~DefaultConn ectionConfigura tion() (in /home/phablet/ mir/boom/ lib/libmirclien t.so.8) :DefaultConnect ionConfiguratio n::~DefaultConn ectionConfigura tion() (default_ connection_ configuration. h:46) delete< mir::client: :ConnectionConf iguration> ::operator( )(mir:: client: :ConnectionConf iguration* ) const (unique_ptr.h:76) ptr<mir: :client: :ConnectionConf iguration, std::default_ delete< mir::client: :ConnectionConf iguration> >::~unique_ptr() (unique_ptr.h:236) ::DefaultMirCon nectionAPI: :connect( char const*, char const*, void (*)(MirConnection*, void*), void*) (mir_connection _api.cpp: 75) _api.cpp: 140) _api.cpp: 156) counted_ base<(_ _gnu_cxx: :_Lock_ policy) 2>::_M_ weak_release( ) (shared_ ptr_base. h:190) weak_count< (__gnu_ cxx::_Lock_ policy) 2>::~__ weak_count( ) (shared_ ptr_base. h:755) weak_ptr< mir::client: :ClientPlatform Factory, (__gnu_ cxx::_Lock_ policy) 2>::~__ weak_ptr( ) (shared_ ptr_base. h:1350) ptr<mir: :client: :ClientPlatform Factory> ::~weak_ ptr() (shared_ptr.h:467) mir::client: :ClientPlatform Factory> ::~CachedPtr( ) (cached_ptr.h:28) :DefaultConnect ionConfiguratio n::~DefaultConn ectionConfigura tion() (in /home/phablet/ mir/boom/ lib/libmirclien t.so.8) :DefaultConnect ionConfiguratio n::~DefaultConn ectionConfigura tion() (default_ connection_ configuration. h:46) delete< mir::client: :ConnectionConf iguration> ::operator( )(mir:: client: :ConnectionConf iguration* ) const (unique_ptr.h:76) ptr<mir: :client: :ConnectionConf iguration, std::default_ delete< mir::client: :ConnectionConf iguration> >::~unique_ptr() (unique_ptr.h:236) ::DefaultMirCon nectionAPI: :connect( char const*, char const*, void (*)(MirConnection*, void*), void*) (mir_connection _api.cpp: 75) _api.cpp: 140) _api.cpp: 156)
==8894== at 0x4867B78: std::_Sp_
==8894== by 0x4866B39: std::__
==8894== by 0x4866279: std::__
==8894== by 0x4866293: std::weak_
==8894== by 0x48662D3: mir::CachedPtr<
==8894== by 0x486E3F7: mir::client:
==8894== by 0x486E441: mir::client:
==8894== by 0x4855E8F: std::default_
==8894== by 0x4855941: std::unique_
==8894== by 0x4855071: (anonymous namespace)
==8894== by 0x48552AB: mir_connect (mir_connection
==8894== by 0x485530D: mir_connect_sync (mir_connection
==8894== Address 0x5a92bf4 is not stack'd, malloc'd or (recently) free'd
==8894==
==8894==
==8894== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==8894== Access not within mapped region at address 0x5A92BF4
==8894== at 0x4867B78: std::_Sp_
==8894== by 0x4866B39: std::__
==8894== by 0x4866279: std::__
==8894== by 0x4866293: std::weak_
==8894== by 0x48662D3: mir::CachedPtr<
==8894== by 0x486E3F7: mir::client:
==8894== by 0x486E441: mir::client:
==8894== by 0x4855E8F: std::default_
==8894== by 0x4855941: std::unique_
==8894== by 0x4855071: (anonymous namespace)
==8894== by 0x48552AB: mir_connect (mir_connection
==8894== by 0x485530D: mir_connect_sync (mir_connection