{"action":"opened","issue":{"url":"https://api.github.com/repos/synergy/synergy/issues/4888","labels_url":"https://api.github.com/repos/synergy/synergy/issues/4888/labels{/name}","comments_url":"https://api.github.com/repos/synergy/synergy/issues/4888/comments","events_url":"https://api.github.com/repos/synergy/synergy/issues/4888/events","html_url":"https://github.com/synergy/synergy/issues/4888","id":96491001,"number":4888,"title":"Occasional crash","user":{"login":"Maeyanie","id":206142,"avatar_url":"https://avatars.githubusercontent.com/u/206142?v=3","gravatar_id":"","url":"https://api.github.com/users/Maeyanie","html_url":"https://github.com/Maeyanie","followers_url":"https://api.github.com/users/Maeyanie/followers","following_url":"https://api.github.com/users/Maeyanie/following{/other_user}","gists_url":"https://api.github.com/users/Maeyanie/gists{/gist_id}","starred_url":"https://api.github.com/users/Maeyanie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maeyanie/subscriptions","organizations_url":"https://api.github.com/users/Maeyanie/orgs","repos_url":"https://api.github.com/users/Maeyanie/repos","events_url":"https://api.github.com/users/Maeyanie/events{/privacy}","received_events_url":"https://api.github.com/users/Maeyanie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-22T07:09:17Z","updated_at":"2015-07-22T07:09:17Z","closed_at":null,"body":"It doesn't happen very often, but I managed to catch what triggered a random crash I'd been having.\r\n\r\n````\r\n==28719== Process terminating with default action of signal 11 (SIGSEGV)\r\n==28719==  Access not within mapped region at address 0x10\r\n==28719==    at 0x4F8489: ServerProxy::onClipboardChanged(unsigned char, IClipboard const*) (ServerProxy.cpp:364)\r\n==28719==    by 0x4F4C4E: Client::sendClipboard(unsigned char) (Client.cpp:419)\r\n==28719==    by 0x4F67D2: Client::sendClipboardThread(void*) (Client.cpp:775)\r\n==28719==    by 0x4F719F: TMethodJob<Client>::run() (TMethodJob.h:66)\r\n==28719==    by 0x54E0DC: Thread::threadFunc(void*) (Thread.cpp:157)\r\n==28719==    by 0x4C3309: ArchMultithreadPosix::doThreadFunc(ArchThreadImpl*) (ArchMultithreadPosix.cpp:726)\r\n==28719==    by 0x4C3270: ArchMultithreadPosix::threadFunc(void*) (ArchMultithreadPosix.cpp:707)\r\n==28719==    by 0x3C1D807554: start_thread (in /usr/lib64/libpthread-2.21.so)\r\n==28719==    by 0x3C1D501F3C: clone (in /usr/lib64/libc-2.21.so)\r\n````\r\nFrom what gdb tells me, it looks like somehow the Client::m_server field is null, which means \"this\" in onClipboardChanged is null, which results in a crash.\r\n\r\nThe odd thing is, there is an assert(m_server != NULL) at the top of Client::sendClipboard, which would indicate a race condition somewhere. There's a note at the top of it that \"m_mutex must be locked on entry\" but I couldn't find where that lock was happening, so perhaps that's the cause, or perhaps I'm just missing it.\r\n\r\nAnyhow, I'm nowhere near familiar enough with this code to figure it out myself, so just posting this here and hopefully some of this rambling helps you guys."}}