From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.bugs Subject: bug#6414: f->output_data.w32->menubar_widget uninitialized? Date: Mon, 4 Jul 2011 01:42:50 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1309736672 4592 80.91.229.12 (3 Jul 2011 23:44:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 3 Jul 2011 23:44:32 +0000 (UTC) Cc: 6414@debbugs.gnu.org To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 04 01:44:28 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QdWKy-0005HE-5v for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Jul 2011 01:44:28 +0200 Original-Received: from localhost ([::1]:47662 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdWKw-00077Q-Pa for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Jul 2011 19:44:27 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdWKb-00076h-1l for bug-gnu-emacs@gnu.org; Sun, 03 Jul 2011 19:44:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QdWKY-0002cN-Th for bug-gnu-emacs@gnu.org; Sun, 03 Jul 2011 19:44:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42071) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdWKY-0002cG-F9 for bug-gnu-emacs@gnu.org; Sun, 03 Jul 2011 19:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QdWKX-0007vP-Ix; Sun, 03 Jul 2011 19:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lennart Borgman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Jul 2011 23:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6414 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: Original-Received: via spool by 6414-submit@debbugs.gnu.org id=B6414.130973659830410 (code B ref 6414); Sun, 03 Jul 2011 23:44:01 +0000 Original-Received: (at 6414) by debbugs.gnu.org; 3 Jul 2011 23:43:18 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QdWJq-0007uR-F6 for submit@debbugs.gnu.org; Sun, 03 Jul 2011 19:43:18 -0400 Original-Received: from mail-ey0-f172.google.com ([209.85.215.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QdWJo-0007uE-IK for 6414@debbugs.gnu.org; Sun, 03 Jul 2011 19:43:17 -0400 Original-Received: by eye13 with SMTP id 13so1928195eye.3 for <6414@debbugs.gnu.org>; Sun, 03 Jul 2011 16:43:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=gltwCGMtRngw3Ueru5GenFyscbNGeBMEs7ca1clp+dI=; b=YcuHilnvCzpPkm8M5tq+Q2qqmuH5wF1wVbpy7dodkY+yFBg9Ztum4FZ2YPj8D+hWzx dWjOlzOhXYhkGFjBsX6VgmeJavpbUxMNBZi4IAAiz5n6dP7J6hwu80KTcX0XBYP97+km VGKfWuP8lFAw5NNLXYDy1YdPpJOLmMooRt//g= Original-Received: by 10.213.20.200 with SMTP id g8mr1655135ebb.140.1309736590510; Sun, 03 Jul 2011 16:43:10 -0700 (PDT) Original-Received: by 10.213.7.84 with HTTP; Sun, 3 Jul 2011 16:42:50 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 03 Jul 2011 19:44:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:47893 Archived-At: On Mon, Jul 4, 2011 at 01:21, Juanma Barranquero wrote: > On Mon, Jul 4, 2011 at 01:11, Lennart Borgman = wrote: > >> This is a complement to them. We agreed to file bug report for code >> changes we should not forget. This is one of those. > > A bug report called " f->output_data.w32->menubar_widget > uninitialized?" and suggesting to check some system calls return > values as part of some non-very-specific hypothetical bug is not a > "code change we should not forget", IMHO. That there is (was) a bug in the menus is not hypothetical. The reason I am seeing those bugs and not so many other people is probably that I am using the menus. (Since I do not use Alt as META I can use them more easily. And I do.) > As I've said in the previous > message, I think you're talking about your suggestion of checking > every system call. If so, please create a wishlist bug report called > "All system calls' return values should be checked", or somesuch, so > at the very least people perusing bug reports can know at a glance > that it is a wishlist and what it is about. I promise I won't close > that bug (though I won't likely do much about it, either). OK. >> Yes. The problem with race conditions was one of the main reasons for >> my suggestion to add error checking to all system calls. I thought >> that you might have overlooked this since you suggested that I should >> send a clear recipe for how to reproduce the bug. But maybe you did >> not do that? Please explain if I am misunderstanding you. > > Your "problems with race conditions" do only happen to *you*, on > *your* patched Emacs. So, if you want to help tracking them, you > shouldn't "suggest" anything (IMO, I hasten to add). Patch your Emacs > with debug macros to you heart's content, and when you do find > something wrong, reproduce it with the stock Emacs and file a > (detailed, step-by-step recipe'd) bug report about it. I think you misunderstand the logic here. The race condition shows up because of system messages. In your case you probably see much, much less of those since (I believe) you use menus much less often. This has nothing to do with my patched build. In fact I started to patch Emacs because of those problems. And I have had much less problems in this area with my patched version. As I have explained quite a few times the refusal to add things like error checking puts a lot of burden on me. I therefore do not have time any more to work with Emacs (except for some libraries I use myself). >> Yes, I have a lot of changes in that area. Complicated, unfortunately. >> I think I have lost control of the details there now. And I never felt >> I had complete control of it. The code is complex and I am not even >> sure that we are always doing things in the right thread etc. > > "We"? You're talking about code that you've changed in non-trivial ways! No. I am talking about the core Emacs here. >> However after fixing the things I suggested I have not seen those >> crashes any more as far as I remember. > > Then, what are we discussing about? You might want to fix the core Emacs. >> =C2=A0"The problem seems to be in x_free_frame_resources. Should not >> =C2=A0free_frame_menubar be called before my_destroy_window there?" > > It is perhaps a fine suggestion, if you care to explain what is "the prob= lem". Now I am a bit lost. I thought I had done that change, but I have not. (Or it has been reverted by some merge, that happens.) I think the suggestion was just because that is what the MS docs suggest. However I see another small change that I have made to w32term.c that might have fixed some crashes (but this is unrelated to the problem we are discussing) : *** c:/emacs-lp/bld/emacs/trunk/src/w32term.c 2011-03-19 12:38:38.000000000 +0100 --- c:/emacs-lp/bld/emacs/emacsw32/src/w32term.c 2011-07-04 01:37:24.883981800 +0200 *************** *** 4491,4497 **** else { f =3D x_window_to_frame (dpyinfo, msg.msg.hwnd); ! f->async_visible =3D msg.msg.wParam; } #endif --- 4491,4498 ---- else { f =3D x_window_to_frame (dpyinfo, msg.msg.hwnd); ! if (f) ! f->async_visible =3D msg.msg.wParam; } #endif ***************