MAMEWorld Central >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

Haze
Reged: 09/23/03
Posts: 4398
Send PM
Re: Sudden problem with MAME and Neo Geo...
11/27/17 04:23 AM


> > 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.







Entire thread
Subject Posted by Posted on
* Sudden problem with MAME and Neo Geo... pb1592 11/23/17 09:37 PM
. * Re: Sudden problem with MAME and Neo Geo... B2K24  11/24/17 07:28 PM
. * Re: Sudden problem with MAME and Neo Geo... Dullaron  11/24/17 07:52 PM
. * Re: Sudden problem with MAME and Neo Geo... krick  11/24/17 08:53 AM
. * Re: Sudden problem with MAME and Neo Geo... BIOS-D  11/24/17 01:58 AM
. * Re: Sudden problem with MAME and Neo Geo... Sune  11/24/17 01:55 AM
. * Re: Sudden problem with MAME and Neo Geo... pb1592  11/25/17 02:23 PM
. * Re: Sudden problem with MAME and Neo Geo... jonwil  11/26/17 03:22 AM
. * Re: Sudden problem with MAME and Neo Geo... pb1592  11/26/17 06:36 AM
. * Re: Sudden problem with MAME and Neo Geo... krick  11/25/17 08:36 PM
. * Re: Sudden problem with MAME and Neo Geo... Haze  11/26/17 03:30 AM
. * Re: Sudden problem with MAME and Neo Geo... pb1592  11/26/17 09:35 AM
. * Re: Sudden problem with MAME and Neo Geo... Haze  11/26/17 03:09 PM
. * Re: Sudden problem with MAME and Neo Geo... Dullaron  11/26/17 03:39 PM
. * Re: Sudden problem with MAME and Neo Geo... pb1592  11/26/17 06:11 PM
. * Re: Sudden problem with MAME and Neo Geo... Kitsune Sniper  11/26/17 11:35 PM
. * Re: Sudden problem with MAME and Neo Geo... pb1592  11/27/17 03:28 AM
. * Re: Sudden problem with MAME and Neo Geo... Haze  11/27/17 04:12 AM
. * Re: Sudden problem with MAME and Neo Geo... pb1592  11/27/17 04:35 AM
. * Re: Sudden problem with MAME and Neo Geo... Haze  11/27/17 04:47 AM
. * Re: Sudden problem with MAME and Neo Geo... pb1592  11/27/17 05:27 AM
. * Re: Sudden problem with MAME and Neo Geo... BIOS-D  11/27/17 10:02 AM
. * Re: Sudden problem with MAME and Neo Geo... krick  11/27/17 04:18 AM
. * Re: Sudden problem with MAME and Neo Geo... Haze  11/27/17 04:23 AM
. * Re: Sudden problem with MAME and Neo Geo... pb1592  11/27/17 04:11 AM
. * Re: Sudden problem with MAME and Neo Geo... BIOS-D  11/26/17 06:48 PM
. * Re: Sudden problem with MAME and Neo Geo... pb1592  11/27/17 04:33 AM
. * Re: Sudden problem with MAME and Neo Geo... Dullaron  11/26/17 11:23 PM
. * Re: Sudden problem with MAME and Neo Geo... pb1592  11/26/17 06:26 AM

Extra information Permissions
Moderator:  redk9258, URherenow, Tafoid 
1 registered and 30 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 680