Bug 11283 – [REG 2.064] assert in std/windows/syserror.d
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2013-10-16T13:37:00Z
Last change time
2013-10-17T05:27:47Z
Assigned to
nobody
Creator
dmitry.olsh
Comments
Comment #0 by dmitry.olsh — 2013-10-16T13:37:23Z
It may be Win8 specific. (Win8 PRO x64 to be precise)
But starting with Phobos commit a2fea332ed7f86130942487614152aa3ed91f1c4
I get assertion failure on
make -fwin32.mak unittest
Output:
unittest
totalCPUs = 4
'qwertyuiop09813478' is not recognized as an internal or external command,
operable program or batch file.
object.Exception@std\windows\syserror.d(43): failed getting error string for WinAPI error code: The resource loader failed to find MUI file.
----------------
0x00BBD44C in @trusted immutable(char)[] std.windows.syserror.sysErrorString(uint, int, int)
0x00BBD563 in @safe void std.windows.syserror.__unittestL88_30()
0x00BE642F in int rt.minfo.moduleinfos_apply(scope int delegate(ref object.ModuleInfo*)).__foreachbody2(ref rt.sections_win32.SectionGroup)
0x00BDC50B in _d_run_main
0x0042B48C in main
0x7561850D in BaseThreadInitThunk
0x7749BF39 in RtlInitializeExceptionChain
0x7749BF0C in RtlInitializeExceptionChain
--- errorlevel 1
Comment #1 by andrej.mitrovich — 2013-10-16T15:05:13Z
I've found this comment on MSDN which may be relevant:
-----
ERROR_MUI_FILE_NOT_FOUND(15100)
Also note that beginning with Vista, error ERROR_MUI_FILE_NOT_FOUND(15100), or ERROR_MUI_FILE_NOT_LOADED(15105) may also be returned. This can trip you up if you are looking only for ERROR_RESOURCE_LANG_NOT_FOUND(1815).
In addition, under low memory conditions, FormatMessage will return ERROR_MUI_FILE_NOT_FOUND(15100) instead of ERROR_OUTOFMEMORY(et al). So if you see this error in the field, determine the customer's memory state so you don't scratch all the hair off your head while diving into your multi-language support implementation.
-----
Comment #2 by andrej.mitrovich — 2013-10-16T15:05:39Z
(In reply to comment #0)
> It may be Win8 specific. (Win8 PRO x64 to be precise)
>
> But starting with Phobos commit a2fea332ed7f86130942487614152aa3ed91f1c4
> I get assertion failure on
> make -fwin32.mak unittest
What is your system language? From the error message it looks like it's English; if that's the case, which English is it? (US, UK etc.)
Comment #4 by dmitry.olsh — 2013-10-17T02:02:16Z
(In reply to comment #3)
> (In reply to comment #0)
> > It may be Win8 specific. (Win8 PRO x64 to be precise)
> >
> > But starting with Phobos commit a2fea332ed7f86130942487614152aa3ed91f1c4
> > I get assertion failure on
> > make -fwin32.mak unittest
>
> What is your system language? From the error message it looks like it's
> English; if that's the case, which English is it? (US, UK etc.)
Systeminfo dumps the following (which puzzles me actually)
System Locale: en-gb;English (United Kingdom)
Input Locale: en-us;English (United States)
Comment #5 by jakobovrum — 2013-10-17T02:11:40Z
(In reply to comment #4)
> (In reply to comment #3)
> Systeminfo dumps the following (which puzzles me actually)
>
> System Locale: en-gb;English (United Kingdom)
> Input Locale: en-us;English (United States)
Does it work if SUBLANG_ENGLISH_US is changed to SUBLANG_ENGLISH_UK or SUBLANG_DEFAULT on lines 90 and 92 in std/windows/syserror.d?
In order to actually have a unittest for sysErrorString at all, I added the optional language parameters so a language combination that was always available could be chosen; I thought en-US was such a combination. Maybe that was a mistake. Maybe LANG_ENGLISH and SUBLANG_DEFAULT would always work?
Due to the same issue of missing language support by default, I had to remove the tests that actually tested for non-ASCII support anyway, so the unittest isn't as useful as it was originally intended. If no solution can be found, the unittest could just be removed entirely.
Comment #6 by dmitry.olsh — 2013-10-17T02:29:27Z
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > Systeminfo dumps the following (which puzzles me actually)
> >
> > System Locale: en-gb;English (United Kingdom)
> > Input Locale: en-us;English (United States)
>
> Does it work if SUBLANG_ENGLISH_US is changed to SUBLANG_ENGLISH_UK or
> SUBLANG_DEFAULT on lines 90 and 92 in std/windows/syserror.d?
>
> In order to actually have a unittest for sysErrorString at all, I added the
> optional language parameters so a language combination that was always
> available could be chosen; I thought en-US was such a combination. Maybe that
> was a mistake. Maybe LANG_ENGLISH and SUBLANG_DEFAULT would always work?
>
SUBLANG_ENGLISH_UK works, SUBLANG_DEFAULT and LANG_ENGLISH doesn't with the same error. It's strange.
> Due to the same issue of missing language support by default, I had to remove
> the tests that actually tested for non-ASCII support anyway, so the unittest
> isn't as useful as it was originally intended. If no solution can be found, the
> unittest could just be removed entirely.
Comment #7 by jakobovrum — 2013-10-17T02:54:33Z
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > (In reply to comment #3)
> > > Systeminfo dumps the following (which puzzles me actually)
> > >
> > > System Locale: en-gb;English (United Kingdom)
> > > Input Locale: en-us;English (United States)
> >
> > Does it work if SUBLANG_ENGLISH_US is changed to SUBLANG_ENGLISH_UK or
> > SUBLANG_DEFAULT on lines 90 and 92 in std/windows/syserror.d?
> >
> > In order to actually have a unittest for sysErrorString at all, I added the
> > optional language parameters so a language combination that was always
> > available could be chosen; I thought en-US was such a combination. Maybe that
> > was a mistake. Maybe LANG_ENGLISH and SUBLANG_DEFAULT would always work?
> >
>
> SUBLANG_ENGLISH_UK works, SUBLANG_DEFAULT and LANG_ENGLISH doesn't with the
> same error. It's strange.
I submitted a pull request to simply remove the test entirely. I can't think of a way to make it work.
https://github.com/D-Programming-Language/phobos/pull/1649
Comment #8 by github-bugzilla — 2013-10-17T05:27:35Z