> > I suspect other systems with a calender will also crash. Things like PGM? > > > > As for why, I'm not sure. Is the date on the PC in question set to something > > completely invalid? I've literally never seen this crash before, so something very > > screwy has happened on your PC, it could indeed be that you've badly broken your > > Windows installation. > > Maybe the CMOS battery died or maybe the motherboard BIOS was flashed without > resetting to defaults. This could leave things in a wonky state.
it's possible. MAME uses gmtime and localtime.
It looks like there are certain situations in which that can return NULL, and MAME won't handle those cleanly as it doesn't check for NULL.
This could be due to the date on the PC being invalid, or maybe some Windows file if it relies on that to get the time, and is returning NULL due to bad files.
Quote:
The gmtime, mktime, and localtime functions use the same single, statically allocated structure to hold their results. Each call to one of these functions destroys the result of any previous call. If timer represents a date before midnight, January 1, 1970, gmtime returns NULL. There is no error return.
Quote:
localtime
Return Value
Return a pointer to the structure result, or NULL if the date passed to the function is:
Before midnight, January 1, 1970.
After 03:14:07, January 19, 2038, UTC (using _time32 and time32_t).
After 23:59:59, December 31, 3000, UTC (using _time64 and __time64_t).
Either way, the MAME code could probably be made safer, the backtrace given points very much at it being likely one of those calls is returning NULL tho.
|