Commit Graph
15 Commits
Author SHA1 Message Date
Glenn Maynard 5f72bea070 ditch explicit close command; just close the handle 2006-02-13 23:02:18 +00:00
Glenn Maynard 4b7f50f673 ditch explicit close command; just close the handle 2006-02-13 23:02:06 +00:00
Chris Danford 6116d9f1bc fix VC6 build 2006-02-13 01:07:44 +00:00
Glenn Maynard 23dcc99781 Add automatic error reporting. This sends crashinfo.txt
over HTTP as a POST form.  This is intended to decrease the
amount of effort required to submit bug reports, reduce the
potential for human error, and increase the consistency of
the form of bug reports (always a crashinfo.txt, no wrapping
or RARring, not pasted into BTS text fields, and no forgetting
it entirely).

This offers less chance to fix the bug than a real BTS entry.
We can't interact with the user (since the submission is
anonymous and not tied to an email), so we can't get more
information about the problem or offer solutions; we can only
fix it based on the crashinfo.  This will result in noise, due
to crashes caused by drivers.

We don't want people to send bug reports accidentally, but we
also don't want to encourage cancelling the report.  This dialog
defaults to "view", so pressing enter neither sends the report
nor cancels.

We don't want people to modify crashinfo.txt before they send
it, since we want consistency.  (Data sent is not re-read from
crashinfo.txt; it's simply kept in memory.)  We also don't want
to give people the impression that changes in "view" will change
what's sent.  At the same time, it's convenient to have the
crashinfo "view" function load notepad.  So, crashinfo.txt is
marked read-only, so attempts to save over it in notepad will fail.

In this mode, we don't offer the option to load log.txt, or
point to a BTS.  This is intended to make bug submission as
simple as possible for casual users.  Keep the dialog simple
and to the point.

The id number that's displayed after a submission is intended
to be used as a reference; we can say "reproduce the crash,
submit the report and tell us what number is shown in the corner",
and easily locate the report.  It's intended to be ignorable by
the most users, so no attempt is made at explaining what it means.
(It should probably be grayed out, but I havn't dug into it yet
to figure out how to gray it while still allowing the text to get
focus, so it can be copied.)

We send over HTTP, on port 80.  This is probably the most likely
way to be able to send data out without any configuration.

(The localization support is incomplete.)
2006-02-11 10:45:24 +00:00
Glenn Maynard a6bd91b9d4 use WindowsDialogBox 2006-02-11 08:00:38 +00:00
Glenn Maynard d94c5912c8 also fixup (dur; goofed up a partial commit) 2006-02-11 07:54:26 +00:00
Glenn Maynard 4d2ba02c06 fixup 2006-02-11 07:53:21 +00:00
Glenn Maynard bcab631922 pull out MakeCrashReport call 2006-02-11 07:52:39 +00:00
Glenn Maynard 7a1852ef2b these have their own newlines 2006-02-11 05:36:43 +00:00
Glenn Maynard 48e1266e19 add a line header; easier to read and search 2006-02-11 05:34:55 +00:00
Glenn Maynard 92682e0ef0 move code 2006-02-10 04:25:50 +00:00
Glenn Maynard 13096dedf0 This isn't in crash conditions anymore, so we can reuse this. 2006-02-09 23:55:28 +00:00
Glenn Maynard 8814b127c7 hFontMono is unused 2006-02-09 23:53:23 +00:00
Glenn Maynard e5b0c7321f cleanup 2006-02-09 23:53:22 +00:00
Glenn Maynard 607a8e2e11 I've been hesitant to do this, but it's the next step in
making crash handling more consistent.  Move the crash
handling dialog into a new process, like the Unix handler
does.

 - We're allowed to operate normally; we have a new heap,
so allocations are safe.
 - Gzipping the VDI is easy now; we can simply use GunzipFile().

The only particularly ugly thing in this is the need to run
CrashGetModuleBaseName in the original process.  That's lame,
but straightforward.  It'd be better to use GetModuleFileNameEx,
but I didn't want to drag psapi.dll into this.

This may also make window hiding more reliable.  Previously,
we wrote the crashinfo, tried to hide the window, then showed
the dialog.  Hiding the window was risky and could hang or
crash again.  Now we can forcibly kill the process from the
child, if needed, and still be able to show a dialog.

This also removes the backtrace and "reason" displays from the
dialog.  Those weren't useful in practice; I always loaded the
crashinfo.txt and never used them, and they're intimidating to
casual users.
2006-02-09 23:11:31 +00:00