From: Lennart Borgman <lennart.borgman@gmail.com>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: 6414@debbugs.gnu.org
Subject: bug#6414: f->output_data.w32->menubar_widget uninitialized?
Date: Mon, 4 Jul 2011 01:42:50 +0200 [thread overview]
Message-ID: <CANbX367XCCDTu0v8=SgMUOPtcJFoKE+XLEyQMCW_Tx0s2fsCQA@mail.gmail.com> (raw)
In-Reply-To: <CAAeL0STHZmQGDe+cXUh+FkiwUx9ehHAdBUbjHCL9GtObmR3K6g@mail.gmail.com>
On Mon, Jul 4, 2011 at 01:21, Juanma Barranquero <lekktu@gmail.com> wrote:
> On Mon, Jul 4, 2011 at 01:11, Lennart Borgman <lennart.borgman@gmail.com> 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.
>> "The problem seems to be in x_free_frame_resources. Should not
>> free_frame_menubar be called before my_destroy_window there?"
>
> It is perhaps a fine suggestion, if you care to explain what is "the problem".
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 = x_window_to_frame (dpyinfo, msg.msg.hwnd);
! f->async_visible = msg.msg.wParam;
}
#endif
--- 4491,4498 ----
else
{
f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
! if (f)
! f->async_visible = msg.msg.wParam;
}
#endif
***************
next prev parent reply other threads:[~2011-07-03 23:42 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-13 18:01 bug#6414: f->output_data.w32->menubar_widget uninitialized? Lennart Borgman
2010-06-13 18:32 ` Lennart Borgman
2010-06-13 18:47 ` Lennart Borgman
2011-07-03 18:54 ` Juanma Barranquero
2011-07-03 22:19 ` Lennart Borgman
2011-07-03 22:30 ` Juanma Barranquero
2011-07-03 22:37 ` Lennart Borgman
2011-07-03 22:48 ` Juanma Barranquero
2011-07-03 23:11 ` Lennart Borgman
2011-07-03 23:21 ` Juanma Barranquero
2011-07-03 23:42 ` Lennart Borgman [this message]
2011-07-04 0:34 ` Juanma Barranquero
2011-07-04 1:08 ` Lennart Borgman
2011-07-04 1:21 ` Juanma Barranquero
2011-07-04 1:44 ` Lennart Borgman
2011-07-04 2:13 ` Juanma Barranquero
2011-07-04 2:18 ` Lennart Borgman
2011-07-04 2:35 ` Juanma Barranquero
2011-09-21 20:32 ` Lars Magne Ingebrigtsen
2011-09-21 20:40 ` Lennart Borgman
2011-09-21 20:44 ` Juanma Barranquero
2011-09-21 20:46 ` Lennart Borgman
2011-09-21 20:59 ` Lars Magne Ingebrigtsen
2011-09-21 21:07 ` Lennart Borgman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANbX367XCCDTu0v8=SgMUOPtcJFoKE+XLEyQMCW_Tx0s2fsCQA@mail.gmail.com' \
--to=lennart.borgman@gmail.com \
--cc=6414@debbugs.gnu.org \
--cc=lekktu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).