{"action":"opened","issue":{"url":"https://api.github.com/repos/01org/wysiwidi/issues/45","labels_url":"https://api.github.com/repos/01org/wysiwidi/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/01org/wysiwidi/issues/45/comments","events_url":"https://api.github.com/repos/01org/wysiwidi/issues/45/events","html_url":"https://github.com/01org/wysiwidi/issues/45","id":54807034,"number":45,"title":"badly handled disconnection in wfd","user":{"login":"jku","id":31889,"avatar_url":"https://avatars.githubusercontent.com/u/31889?v=3","gravatar_id":"","url":"https://api.github.com/users/jku","html_url":"https://github.com/jku","followers_url":"https://api.github.com/users/jku/followers","following_url":"https://api.github.com/users/jku/following{/other_user}","gists_url":"https://api.github.com/users/jku/gists{/gist_id}","starred_url":"https://api.github.com/users/jku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jku/subscriptions","organizations_url":"https://api.github.com/users/jku/orgs","repos_url":"https://api.github.com/users/jku/repos","events_url":"https://api.github.com/users/jku/events{/privacy}","received_events_url":"https://api.github.com/users/jku/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-19T20:12:23Z","updated_at":"2015-01-19T20:12:23Z","closed_at":null,"body":"Disconnecting from the source (android) side makes the sink go belly up:\r\n\r\nThis is definitely _not_ a pristine source clone from master but I don't think the changes are relevant to this.\r\n\r\n(gdb) r\r\nStarting program: /home/wysiwidi/src/wysiwidi/sink/sink-test \r\n[Thread debugging using libthread_db enabled]\r\nUsing host libthread_db library \"/lib/x86_64-linux-gnu/libthread_db.so.1\".\r\n* Registering Wifi Display with IE 00000600111C440032\r\n[New Thread 0x7ffff5275700 (LWP 12223)]\r\n[New Thread 0x7ffff4a74700 (LWP 12224)]\r\n[New Thread 0x7fffeffff700 (LWP 12225)]\r\n[New Thread 0x7fffef7fe700 (LWP 12226)]\r\n* New peer: Nexus 5 (jku)\r\n[Thread 0x7ffff5275700 (LWP 12223) exited]\r\n[Thread 0x7ffff4a74700 (LWP 12224) exited]\r\n* Connecting to source at 192.168.3.2:7236\r\n** Message: Trying to connect...\r\n** Message: connection success to: 192.168.3.2\r\nterminate called after throwing an instance of 'std::bad_weak_ptr'\r\n  what():  bad_weak_ptr\r\n\r\nProgram received signal SIGABRT, Aborted.\r\n0x00007ffff6180107 in __GI_raise (sig=sig@entry=6)\r\n    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56\r\n56\t../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.\r\n(gdb) bt\r\n#0  0x00007ffff6180107 in __GI_raise (sig=sig@entry=6)\r\n    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56\r\n#1  0x00007ffff61814e8 in __GI_abort () at abort.c:89\r\n#2  0x00007ffff6c88b3d in __gnu_cxx::__verbose_terminate_handler() ()\r\n   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6\r\n#3  0x00007ffff6c86bb6 in ?? ()\r\n   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6\r\n#4  0x00007ffff6c86c01 in std::terminate() ()\r\n   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6\r\n#5  0x00007ffff6c86e19 in __cxa_throw ()\r\n   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6\r\n#6  0x00007ffff7b8993f in std::__throw_bad_weak_ptr ()\r\n    at /usr/include/c++/4.9/bits/shared_ptr_base.h:78\r\n#7  0x00007ffff7b8b7f2 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count (this=0x7fffffffdb98, __r=...)\r\n    at /usr/include/c++/4.9/bits/shared_ptr_base.h:822\r\n#8  0x00007ffff7b8b3f7 in std::__shared_ptr<wfd::MessageHandler, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<wfd::MessageHandler> (\r\n    this=0x7fffffffdb90, __r=...)\r\n    at /usr/include/c++/4.9/bits/shared_ptr_base.h:940\r\n#9  0x00007ffff7b8ac35 in std::shared_ptr<wfd::MessageHandler>::shared_ptr<wfd::MessageHandler> (this=0x7fffffffdb90, \r\n    __r=std::weak_ptr (empty) 0x0)\r\n    at /usr/include/c++/4.9/bits/shared_ptr.h:249\r\n#10 0x00007ffff7b8a2e9 in std::enable_shared_from_this<wfd::MessageHandler>::shared_from_this (this=0x7fe1e8)\r\n    at /usr/include/c++/4.9/bits/shared_ptr.h:547\r\n#11 0x00007ffff7b87d63 in wfd::MessageSequenceHandler::OnCompleted (\r\n    this=0x7fe1e0, handler=std::shared_ptr (count 3, weak 1) 0x805e50)\r\n    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:90\r\n#12 0x00007ffff7b87d77 in wfd::MessageSequenceHandler::OnCompleted (\r\n    this=0x805e50, handler=std::shared_ptr (count 3, weak 1) 0x805ed0)\r\n    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:90\r\n#13 0x00007ffff7b88a76 in wfd::MessageSequenceWithOptionalSetHandler::OnCo---Type <return> to continue, or q <return> to quit---\r\nmpleted (this=0x805e50, \r\n    handler=std::shared_ptr (count 3, weak 1) 0x805ed0)\r\n    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:199\r\n#14 0x00007ffff7b87d77 in wfd::MessageSequenceHandler::OnCompleted (\r\n    this=0x805ed0, handler=std::shared_ptr (count 2, weak 1) 0x805fc0)\r\n    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:90\r\n#15 0x00007ffff7b895f9 in wfd::MessageSenderBase::Handle (this=0x805fc0, \r\n    message=std::unique_ptr<wfd::Message> containing 0x80b500)\r\n    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:295\r\n#16 0x00007ffff7b87ab1 in wfd::MessageSequenceHandler::Handle (\r\n    this=0x805ed0, message=std::unique_ptr<wfd::Message> containing 0x0)\r\n    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:71\r\n#17 0x00007ffff7b87ab1 in wfd::MessageSequenceHandler::Handle (\r\n    this=0x805e50, message=std::unique_ptr<wfd::Message> containing 0x0)\r\n    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:71\r\n#18 0x00007ffff7b886ac in wfd::MessageSequenceWithOptionalSetHandler::Handle (this=0x805e50, message=std::unique_ptr<wfd::Message> containing 0x0)\r\n    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:168\r\n#19 0x00007ffff7b87ab1 in wfd::MessageSequenceHandler::Handle (\r\n    this=0x7fe1e0, message=std::unique_ptr<wfd::Message> containing 0x0)\r\n    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:71\r\n#20 0x00007ffff7b8c7d0 in wfd::SinkImpl::MessageParsed (this=0x7fef90, \r\n    message=std::unique_ptr<wfd::Message> containing 0x0)\r\n    at /home/wysiwidi/src/wysiwidi/wfd/sink/sink.cpp:167\r\n#21 0x00007ffff7b8bf57 in wfd::RTSPInputHandler::ParsePayload (\r\n    this=0x7fef98)\r\n    at /home/wysiwidi/src/wysiwidi/wfd/common/rtsp_input_handler.cpp:66\r\n#22 0x00007ffff7b8bd54 in wfd::RTSPInputHandler::InputReceived (\r\n    this=0x7fef98, \r\n    input=\"RTSP/1.0 200 OK\\r\\nDate: Mon, 19 Jan 2015 20:04:44 +0000\\r\\nServer: stagefright/1.2 (Linux;Android 5.0.1)\\r\\nCSeq: 4\\r\\nSession: 1745858788;timeout=30\\r\\nConnection: close\\r\\n\\r\\n\")\r\n    at /home/wysiwidi/src/wysiwidi/wfd/common/rtsp_input_handler.cpp:40\r\n#23 0x00007ffff7b8c423 in wfd::SinkImpl::RTSPDataReceived (\r\n    this=0x7fef90, \r\n    message=\"RTSP/1.0 200 OK\\r\\nDate: Mon, 19 Jan 2015 20:04:44 +0000\\r\\nServer: stagefright/1.2 (Linux;Android 5.0.1)\\r\\nCSeq: 4\\r\\nSession: 1745858788;timeout=30\\r\\nConnection: close\\r\\n\\r\\n\")\r\n    at /home/wysiwidi/src/wysiwidi/wfd/sink/sink.cpp:129\r\n#24 0x000000000042744c in Sink::got_message (this=0x802b10, \r\n    message=\"RTSP/1.0 200 OK\\r\\nDate: Mon, 19 Jan 2015 20:04:44 +0000\\r\\nServer: stagefright/1.2 (Linux;Android 5.0.1)\\r\\nCSeq: 4\\r\\nSession: 1745858788;timeout=30\\r\\nConnection: close\\r\\n\\r\\n\")\r\n    at /home/wysiwidi/src/wysiwidi/sink/sink.cpp:33\r\n#25 0x00000000004290cb in MiracBroker::receive_cb (this=0x802b10, fd=7, \r\n    condition=G_IO_IN)\r\n    at /home/wysiwidi/src/wysiwidi/mirac_network/mirac-broker.cpp:85\r\n#26 0x0000000000428ee6 in MiracBroker::receive_cb (fd=7, \r\n    condition=G_IO_IN, data_ptr=0x802b10)\r\n    at /home/wysiwidi/src/wysiwidi/mirac_network/mirac-broker.cpp:45\r\n#27 0x00007ffff728db6d in g_main_context_dispatch ()\r\n   from /lib/x86_64-linux-gnu/libglib-2.0.so.0\r\n#28 0x00007ffff728df48 in ?? ()\r\n   from /lib/x86_64-linux-gnu/libglib-2.0.so.0\r\n#29 0x00007ffff728e272 in g_main_loop_run ()\r\n   from /lib/x86_64-linux-gnu/libglib-2.0.so.0\r\n#30 0x0000000000425dc4 in main (argc=1, argv=0x7fffffffe358)\r\n    at /home/wysiwidi/src/wysiwidi/sink/main.cpp:123\r\n"}}