[Gc] GetThreadContext failed

Henning Makholm makholm at octoshape.com
Mon Jun 7 07:08:04 PDT 2010


We use version 6.8 of the GC, with minor local patches that should
be irrelevant here, in the client-side part of our product
(Octoshape Streaming Services).

Recently a growing number of end-users are reporting that the
program crashes with a "GetThreadContext failed" message box from
the GC. This massage is generated by GC_push_all_stacks() in
win32_threads.c.

The users having problems all seem to be using 64-bit Windows,
running our 32-bit application (built with MS Visual Studio 8)
as a WOW64 process. Most are using Windows 7, but we also have
independent reports of the errors from 64-bit Windows XP.

We have been unable to reproduce the condition locally, but we
got one of the users to run a special build where I instrumented
GC_abort() to display the value of GetLastError(). This turns out
to be 0x1F, which is ERROR_GEN_FAILURE ("A device attached to the
system is not functioning").

I'm kind of stumped here. Does anybody on the list have similar
experiences, and/or ideas for what could make GetThreadContext()
fail with this error code?

The MSDN documentation for GetCurrentThread warns that
"THREAD_GET_CONTEXT may not be present" if we're "impersonating
security contexts". I'm fairly sure that our program is not doing
anything to do that, but I'm unsure whether our process can be
interiting such a state from the Javascript wrapper that starts
it. In any case, ERROR_GEN_FAILURE would be a strange symptom of
a permission problem.

--
Henning Makholm
Octoshape ApS




More information about the Gc mailing list