Subject: Re: bug#6414: f->output_data.w32->menubar_widget uninitialized?

From: Juanma Barranquero <[email-masked]>
Date: Mon, 4 Jul 2011 01:21:31 +0200

On Mon, Jul 4, 2011 at 01:11, Lennart Borgman <[email-masked]> 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. 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).

> Do you agree that this report is a reasonable way to tell you what I
> have done to try to fix the problem and get your thoughts on it?

No, because I still don't know what the problem is.

> 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.

> 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!

> 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?

>  "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".

    Juanma