Closed
Bug 285497
Opened 20 years ago
Closed 20 years ago
Disable Useless Error Popups on Windows
Categories
(Toolkit :: Startup and Profile System, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.8beta2
People
(Reporter: alex, Assigned: benjamin)
Details
Attachments
(1 file, 1 obsolete file)
1.38 KB,
patch
|
benjamin
:
first-review+
asa
:
approval1.8b2+
|
Details | Diff | Splinter Review |
By default, when some Win32 calls encounter an error (for example when trying to
load an invalid dll using LoadLibrary) Windows displays an error dialog box.
This error box usually has a very cryptic and not user friendly message. To
disable this behavior and make the functions fail gracefully, the following
function should be called on application startup:
::SetErrorMode(SEM_FAILCRITICALERRORS);
I believe the best place to make this call is the xre_main() function.
See bug 278328 and bug 153377 for additional information.
Assignee | ||
Updated•20 years ago
|
Assignee: nobody → benjamin
Assignee | ||
Comment 1•20 years ago
|
||
Attachment #180598 -
Flags: first-review?(darin)
Updated•20 years ago
|
Attachment #180598 -
Flags: first-review?(darin) → first-review+
Comment 2•20 years ago
|
||
Comment on attachment 180598 [details] [diff] [review]
Call SetErrorMode() at XRE_main
I'm sorry I have to veto this patch.
SetErrorMode(SEM_FAILCRITICALERRORS) should be called
whether the DEBUG macro is defined or not.
Assignee | ||
Comment 3•20 years ago
|
||
wtc: why? I presume that builders using debug builds would want a warning if a
dependent library were not available.
Comment 4•20 years ago
|
||
These error popups are useless if the application
developers check the return value of the Win32
functions in question and take appropriate
actions. This is exactly what we want: we want
to handle the errors in user friendly ways and
suppress the error popups from Windows.
For example, whether the error popups are
suppressed or not, the Win32 LoadLibrary function
fails with the same error code if the library
can't be loaded. So we don't need to see the
error popups in debug builds, either.
Comment 5•20 years ago
|
||
I'm sorry, I did not look at the comments in this bug to see that there was an
ongoing discussion about what should be done in DEBUG mode. I myself am less
concerned about the dialog appearing in DEBUG builds. Perhaps we could output a
textual warning to the console in DEBUG builds in place of the default windows
dialog. I personally find it useful to see a warning about libraries failing to
load when trying to debug something. For example, we might want to place such a
warning in the XPCOM native component loader.
Assignee | ||
Comment 6•20 years ago
|
||
The other way is ok too.
Attachment #180598 -
Attachment is obsolete: true
Attachment #180607 -
Flags: first-review+
Attachment #180607 -
Flags: approval1.8b2?
Comment 7•20 years ago
|
||
Comment on attachment 180607 [details] [diff] [review]
Call SetErrorMode() at XRE_main, both debug and non-debug
a=asa
Attachment #180607 -
Flags: approval1.8b2? → approval1.8b2+
Comment 8•20 years ago
|
||
Darin, it's fine by me for debug builds to output textual
warning messages to the console. These error popups are
very annoying -- you need to click on buttons to dismiss
them. Also, users usually associate them with serious errors,
but it should be the Mozilla apps, not Windows, that decide
whether a library loading failure is a serious error.
Assignee | ||
Comment 9•20 years ago
|
||
Fixed on trunk.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8beta2
Assignee | ||
Updated•18 years ago
|
Flags: in-testsuite?
Component: XRE Startup → Startup and Profile System
QA Contact: nobody → startup
You need to log in
before you can comment on or make changes to this bug.
Description
•