From: Lennart Borgman <lennart.borgman@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: System calls without error checks in w32
Date: Sat, 29 May 2010 22:02:24 +0200 [thread overview]
Message-ID: <AANLkTikm_2Pfnnl3jF8CMALmXyuP9Fdxi14MtiRoQgaY@mail.gmail.com> (raw)
In-Reply-To: <83mxvitsay.fsf@gnu.org>
On Sat, May 29, 2010 at 9:35 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Lennart Borgman <lennart.borgman@gmail.com>
>> Date: Sat, 29 May 2010 20:42:40 +0200
>> Cc: emacs-devel@gnu.org
>>
>> CreateFontIndirect
>> DestroyCaret
>> ExtTextOut
>> GetForeGroundWindow
>> GetKeyboardState
>> GetKeyboardState
>> GetModuleHandle
>> GetProcAddress
>> GetTextExtentPoint32
>> GetWindowPlacement
>> GetWindowRect
>> KillTimer
>> LocalFree
>> PostMessage
>> PostThreadMessage
>> RegisterHotKey
>> ReleaseCapture
>> SelectObject
>> SetWindowLong
>>
>> A few of them does not return errors, but return value may have to be
>> checked anyway.
I looked a bit more. There are many more that could be checked, but
are not checked now.
> If you can suggest what to do when any of these fails, please do.
I have already made the suggestion below. I do not mean adding it
everywhere where checks are missing, that would be a lot of job in the
current state of the code. However adding this kind of output when
hunting for a problem could be very helpful.
>> >> DebPrint (("error w32_creatwindow.AjdustRectangle => %d\n",
>> >> GetLastError ()));
>> >>
>> >> to all of them? Is there anyone who has anything against this?
>> >
>> > What for?
>>
>>
>> I have for several years complained about frequent crashes. They are
>> quite irritating actually.
>>
>> I have to reboot quite often too, maybe because of errors in the
>> system calls (some resource is leaking).
>>
>> Menus often stops working. Difficult to track down, and even more so
>> without knowing if some bad system calls where involved.
>>
>> Emacs can totally hang. Or it can loop without yeilding. At least the
>> first one can be a bad system call.
>
> I don't see how any of these problems could be solved by using
> DebPrint.
Why not? The latest crash fixes I sent in was about missing checks.
next prev parent reply other threads:[~2010-05-29 20:02 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-29 2:38 System calls without error checks in w32 Lennart Borgman
2010-05-29 17:43 ` Eli Zaretskii
2010-05-29 18:42 ` Lennart Borgman
2010-05-29 19:35 ` Eli Zaretskii
2010-05-29 20:02 ` Lennart Borgman [this message]
2010-05-29 21:25 ` Eli Zaretskii
2010-05-29 21:30 ` Lennart Borgman
2010-05-30 3:02 ` Eli Zaretskii
2010-05-30 3:26 ` Lennart Borgman
2010-05-30 17:36 ` Eli Zaretskii
2010-05-30 18:02 ` Lennart Borgman
2010-05-30 19:24 ` Juanma Barranquero
2010-05-30 22:37 ` Lennart Borgman
2010-05-30 23:03 ` Juanma Barranquero
2010-05-30 23:28 ` Lennart Borgman
2010-05-31 0:10 ` Juanma Barranquero
2010-05-31 0:58 ` Lennart Borgman
2010-05-31 2:02 ` Juanma Barranquero
2010-05-31 2:36 ` Lennart Borgman
2010-05-31 3:06 ` Juanma Barranquero
2010-05-31 3:05 ` Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2010-05-31 9:18 grischka
2010-06-05 17:15 ` Jason Rumney
2010-06-07 10:37 ` grischka
2010-06-07 14:54 ` Stephen J. Turnbull
2010-06-07 15:23 ` Lennart Borgman
2010-06-07 17:21 ` grischka
2010-06-07 17:30 ` Lennart Borgman
2010-06-07 18:54 ` grischka
2010-06-08 0:32 ` Lennart Borgman
2010-06-08 0:34 ` Lennart Borgman
2010-06-07 19:56 ` Stefan Monnier
2010-06-07 23:35 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTikm_2Pfnnl3jF8CMALmXyuP9Fdxi14MtiRoQgaY@mail.gmail.com \
--to=lennart.borgman@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.