RtlTimeToTimeFields - gmtime returns nullptr #630

wellerallergy opened this Issue Nov 18, 2016 · 4 comments


None yet

4 participants

wellerallergy commented Nov 18, 2016 edited

Trying to run Scott Pilgrim I get this error:

"The thread 0xf98 has exited with code 0 (0x0). Unhandled exception thrown: read access violation. tm was nullptr."

Call stack:
xenia.exe!xe::kernel::xboxkrnl::RtlTimeToTimeFields(const xe::kernel::shim::PrimitivePointerParam<unsigned__int64> & time_ptr, const xe::kernel::shim::TypedPointerParamxe::kernel::xboxkrnl::X_TIME_FIELDS & time_fields_ptr) Line 451 C++


xenia.exe!xe::kernel::shim::RegisterExport<0,320,xe::kernel::shim::PrimitivePointerParam<unsigned __int64> const ,xe::kernel::shim::TypedPointerParam<xe::kernel::xboxkrnl::X_TIME_FIELDS> const >'::2'::X::Trampoline(xe::cpu::ppc::PPCContext_s * ppc_context) Line 503 C++

@DrChat DrChat changed the title from Read access violation. tm was nullptr to RtlTimeToTimeFields - gmtime returns nullptr Nov 19, 2016
DrChat commented Nov 19, 2016 edited

Thanks for the useful information :)

MSDN says gmtime can return nullptr if the time is before Jan 1, 1970.

inckie commented Dec 14, 2016

For some ISOs, time_ptr in RtlTimeToTimeFields already holds epoch time or something close to that. Trying to convert it makes it negative thus returning null from gmtime. The time seems to be originated from ISO file system.

inckie commented Jan 6, 2017

I've traced it down. See #655.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment