From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Greg Smolyn Newsgroups: gmane.emacs.bugs Subject: bug#17171: crash in ns_read_socket Date: Sun, 4 Jan 2015 23:04:29 -0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c3c9663a94ae050be24d48 X-Trace: ger.gmane.org 1420441524 24165 80.91.229.3 (5 Jan 2015 07:05:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Jan 2015 07:05:24 +0000 (UTC) To: 17171@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 05 08:05:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y81j0-0007ck-3Y for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jan 2015 08:05:14 +0100 Original-Received: from localhost ([::1]:59209 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y81iz-0003Pu-85 for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jan 2015 02:05:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y81iv-0003Jl-NA for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 02:05:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y81ip-00043n-8E for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 02:05:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y81ip-00043h-4q for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 02:05:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y81io-0007nS-GG for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 02:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Greg Smolyn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Jan 2015 07:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17171 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17171-submit@debbugs.gnu.org id=B17171.142044147429921 (code B ref 17171); Mon, 05 Jan 2015 07:05:02 +0000 Original-Received: (at 17171) by debbugs.gnu.org; 5 Jan 2015 07:04:34 +0000 Original-Received: from localhost ([127.0.0.1]:36902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y81iL-0007mW-RR for submit@debbugs.gnu.org; Mon, 05 Jan 2015 02:04:34 -0500 Original-Received: from mail-la0-f54.google.com ([209.85.215.54]:33884) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y81iI-0007mN-U9 for 17171@debbugs.gnu.org; Mon, 05 Jan 2015 02:04:31 -0500 Original-Received: by mail-la0-f54.google.com with SMTP id pv20so17648666lab.27 for <17171@debbugs.gnu.org>; Sun, 04 Jan 2015 23:04:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=IiDiSS70C+YbTXe7HUWWQOrcCH0eA1/SMdyiJHQ+BWA=; b=ehuHEu3Ei1UfppmWc9RIH2qRprY1G1QLX1zVzY8gTNhY7TEEzbDbpTXkaxmZU7yA1r phhegNxzCK/UyvD9vv3I4exA2jySrlHaDsapyzlOepyC1ZI4HEle9R6cCuahRhZ8egYM 3ZOCgYtc4WeNByfsOZ9Q/qDlhm70amX/DV9EM+82r/0NsfFvmsVpnKn6rRUd0V+qF02V RE1PIWMVAoVB/8wGFVOOvMQ1N9CuxUbxBTJKn5RE/+XKZD/iUcElGSLOWG0dHKIWZQRI Fff5hPfZ4QteLLh5g0GObyHTrGgLJbA9AAYXQi6jsPAqqzJjDv78h3EdvzjvOCgDd8Fg DnlQ== X-Gm-Message-State: ALoCoQnca4a1JJ0xq2QJrL+I5b6J7h2meD0f8SHqNCp/t3YDmwiB9aI91vOsQ9hPuHY/u4hCHM9M X-Received: by 10.112.159.195 with SMTP id xe3mr74438773lbb.64.1420441469746; Sun, 04 Jan 2015 23:04:29 -0800 (PST) Original-Received: by 10.112.101.101 with HTTP; Sun, 4 Jan 2015 23:04:29 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:98027 Archived-At: --001a11c3c9663a94ae050be24d48 Content-Type: text/plain; charset=UTF-8 So I thought it might be a race condition of some sort, so I enclosed the apploopnr checks with an @synchronize, like so: 3636 @synchronized([NSApp class]) { 3637 if (++apploopnr != 1) 3638 { 3639 emacs_abort (); 3640 } 3641 [NSApp run]; 3642 --apploopnr; 3643 } Sadly, still crashes. I may have done the synchronize incorrectly, I am not really a cocoa / objc programmer. --001a11c3c9663a94ae050be24d48 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
So I thought it might be a race condition of some sort, so= I enclosed the apploopnr checks with an @synchronize, like so:

3636 =C2=A0 =C2=A0 =C2=A0@synchronized([NSApp class]) {=
3637 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (++= apploopnr !=3D 1)
3638= =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0{
3639 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0emacs_abort ();<= /div>
3640 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= }
3641 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[NSAp= p run];
3642 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0--apploopnr;
3643 =C2=A0 =C2=A0 =C2=A0}

Sadly, still crashes.
I may have don= e the synchronize incorrectly, I am not really a cocoa / objc programmer.
--001a11c3c9663a94ae050be24d48--