Add mappings for NS_ERROR_MODULE_WIN32 errors generated from nsLocalFileWin.cpp
Categories
(Core :: XPCOM, defect, P3)
Tracking
()
People
(Reporter: sg, Assigned: jkrause)
References
(Blocks 7 open bugs)
Details
(Keywords: leave-open)
Attachments
(8 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
The NS_ERROR_MODULE_WIN32 errors actually generated from nsLocalFileWin.cpp should eventually be mapped to platform-agnostic error codes.
Comment 1•1 year ago
|
||
One candidate error code to be added is 0x570 ERROR_FILE_CORRUPT
. We already have NS_ERROR_FILE_CORRUPTED
, but we use it probably at a higher level of abstraction (reading a file whose content we don't understand wrt the expected content, like jar). As 0x570 ERROR_FILE_CORRUPT
needs probably different actions (it is a strong indicator of file system corruption) than dealing with a file we might have wrecked ourself, I'd propose a new NS_ERROR_FILE_OS_CORRUPT
. Ideas for a better naming are welcome!
Comment 2•1 year ago
•
|
||
While NS_ERROR_FILE_CORRUPTED already exists, it indicates most of the times more a parsing problem of a given file format.
But Windows ERROR_FILE_CORRUPTED signals a malfunctioning or corrupted file system at OS level, thus we translate it to the new
NS_ERROR_FILE_FS_CORRUPTED.
There seems to be no suitable errno under POSIX to map here.
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Pushed by jstutte@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5cd1ef556cbc Map Windows error 0x570 ERROR_FILE_CORRUPT to NS_ERROR_FILE_FS_CORRUPTED r=xpcom-reviewers,janv,nika
Comment 4•1 year ago
|
||
bugherder |
Updated•1 year ago
|
Comment 5•1 year ago
|
||
WIN32(0x45D) is ERROR_IO_DEVICE seems to happen in the wild, too.
Comment 6•1 year ago
|
||
Pushed by jstutte@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2899639c5db8 Map Windows error 0x45D ERROR_IO_DEVICE to NS_ERROR_FILE_DEVICE_FAILURE r=janv,xpcom-reviewers,mccr8
Comment 8•1 year ago
|
||
bugherder |
Comment 9•1 year ago
|
||
Looking at what I can map ERROR_DISK_FULL in ConvertWinError I was wondering, if ERROR_DISK_FULL and/or ERROR_HANDLE_DISK_FULL should really map to NS_ERROR_FILE_TOO_BIG, which sounds meaningful to me only in case we are writing a (large) file. And the only place we intercept NS_ERROR_FILE_TOO_BIG seems to deal with 32Bit limitations while reading, not with the disk full case.
Comment 10•1 year ago
|
||
The code which depends on the old generic NS_ERROR_MODULE_WIN32 mapping needs
to be updated too.
Depends on D113505
Comment 11•1 year ago
|
||
Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a98b826be2d8 Follow-up fix for the ERROR_FILE_CORRUPT to NS_ERROR_FILE_FS_CORRUPTED mapping; r=jstutte
Comment 12•1 year ago
|
||
bugherder |
Comment 13•1 year ago
|
||
0x1E3 seem to have no current mapping in official documentation ? And in winerror.h we only see:
#define MK_E_UNAVAILABLE _HRESULT_TYPEDEF_(0x800401E3L)
whatever MK_E_UNAVAILABLE
means (what I read in internet talks about marshaling to office?).
Comment 14•1 year ago
|
||
Comment 15•1 year ago
|
||
(In reply to Jens Stutte [:jstutte] from comment #13)
0x1E3 seem to have no current mapping in official documentation ? And in winerror.h we only see:
#define MK_E_UNAVAILABLE _HRESULT_TYPEDEF_(0x800401E3L)
whatever
MK_E_UNAVAILABLE
means (what I read in internet talks about marshaling to office?).
I don't think MK_E_UNAVAILABLE has to do with the error. According to net helpmsg 483
, the error message for Win32 error code 483 (0x1E3) is "The request failed due to a fatal device hardware error."
Comment 16•1 year ago
|
||
(In reply to Jens Stutte [:jstutte] from comment #13)
And in winerror.h
Obviously this is not an official Microsoft repo. I found
//
// MessageId: ERROR_DEVICE_HARDWARE_ERROR
//
// MessageText:
//
// The request failed due to a fatal device hardware error.
//
#define ERROR_DEVICE_HARDWARE_ERROR 483L
in my local Windows SDK installation.
Comment 17•1 year ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #16)
#define ERROR_DEVICE_HARDWARE_ERROR 483L
in my local Windows SDK installation.
Thanks for looking that up! That sounds much more plausible, indeed.
Comment 18•1 year ago
|
||
Comment 19•1 year ago
|
||
Pushed by jstutte@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d148b4f4821e Add mappings for ERROR_DEVICE_HARDWARE_ERROR, ERROR_DEVICE_NOT_CONNECTED, ERROR_DISK_FULL and remove error NS_ERROR_FILE_DISK_FULL in favor of existing NS_ERROR_FILE_NO_DEVICE_SPACE r=xpcom-reviewers,necko-reviewers,nika,valentin
Comment 20•1 year ago
|
||
bugherder |
Comment 21•1 year ago
•
|
||
There are some new Windows errors. hurray!
Code | Meaning | Where |
---|---|---|
0x12 | ERROR_NO_MORE_FILES | GetNextFile , this might be something we need to handle/expect? |
0x1 | ERROR_INVALID_FUNCTION | GetDirectoryEntries , not sure but we might try to invoke GetDirectoryEntries on a directory that vanished in the meantime? |
0x5AA | ERROR_NO_SYSTEM_RESOURCES | Sounds not very actionable, but is definitely fatal |
0x1129 | ERROR_REPARSE_TAG_INVALID (The tag present in the reparse point buffer is invalid.) | GetDirectoryEntries |
0x17 | ERROR_CRC Data error (cyclic redundancy check). | CopyTo From what I read, it is another form of saying "filesystem corrupt" |
Comment 22•1 year ago
|
||
We should map also:
ERROR_INVALID_NAME
- 123 (0x7B)
- The filename, directory name, or volume label syntax is incorrect.
Comment 23•10 months ago
|
||
Updated•10 months ago
|
Comment 24•10 months ago
|
||
Pushed by echuang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a26f138f9054 Map Windows local file error 0x7B ERROR_INVALID_NAME to NS_ERROR_FILE_INVALID_PATH, r=xpcom-reviewers,dom-storage-reviewers,nika,jstutte
Comment 25•10 months ago
|
||
bugherder |
Updated•6 months ago
|
Updated•6 months ago
|
Assignee | ||
Comment 26•5 months ago
|
||
The error 0x1129 ERROR_REPARSE_TAG_INVALID
now also appeared in Bug 1702422 Comment 83 for the first time.
Assignee | ||
Comment 27•5 months ago
|
||
The error 0x571 ERROR_DISK_CORRUPT
appeared in Bug 1704439 Comment 52 for the first time. The Microsoft docs says "The disk structure is corrupted and unreadable.", so maybe it could be mapped to NS_ERROR_FILE_FS_CORRUPTED
.
Assignee | ||
Comment 28•5 months ago
|
||
The error 0x571 ERROR_DISK_CORRUPT
also appeared in Bug 1702422 Comment 83 for the first time.
Assignee | ||
Comment 29•5 months ago
|
||
The error 0x1129 ERROR_REPARSE_TAG_INVALID
appeared in Bug 1720080 Comment 52 for the first time.
Assignee | ||
Comment 30•5 months ago
|
||
Updated•5 months ago
|
Comment 31•5 months ago
|
||
Pushed by jkrause@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6020e9690ec4 Map Windows error `ERROR_DISK_CORRUPT` to `NS_ERROR_FILE_FS_CORRUPTED`. r=xpcom-reviewers,dom-storage-reviewers,jstutte,nika
Comment 32•5 months ago
|
||
bugherder |
Updated•5 months ago
|
Assignee | ||
Comment 33•4 months ago
|
||
The error 0x510 ERROR_CONTENT_BLOCKED
appeared in Bug 1702421 Comment 78 for the first time.
Assignee | ||
Comment 34•4 months ago
|
||
Comment 35•4 months ago
|
||
Pushed by jkrause@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3079bbbfc4cb Map Windows error `0x510 ERROR_CONTENT_BLOCKED` to `NS_ERROR_FILE_ACCESS_DENIED`. r=xpcom-reviewers,nika
Updated•4 months ago
|
Comment 36•4 months ago
|
||
bugherder |
Assignee | ||
Comment 37•4 days ago
|
||
Comment 38•3 days ago
|
||
Pushed by jkrause@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f2ae3ed2e501 Map Windows error `ERROR_DEV_NOT_EXIST` (0x37) to `NS_ERROR_FILE_DEVICE_FAILURE`. r=xpcom-reviewers,barret
Comment 39•3 days ago
|
||
bugherder |
Description
•