[SDL] SDL_crash -- fatal error catching with user callback

John john at leafygreengames.com
Fri Mar 29 09:39:19 PDT 2013


It's largely a myth nowadays. GCC and CLANG implement exception support with 
zero performance overhead. Of SDL supported platforms (listed in 
README.Platforms), all but Windows support zero-overhead exceptions. And even on 
Windows, take any claims of "overhead" with a grain of salt. If you can even 
measure it in your game, then your game is probably spinning at 100% CPU already.


On 03/28/2013 11:53 PM, Sik the hedgehog wrote:
> I was under the impression that actually was because on some platforms
> (i.e. consoles) exceptions are not really usable at all in the first
> place.
>
> 2013/3/29, Forest Hale <havoc at ghdigital.com>:
>> One more note - C++ exceptions are frequently disabled in games because of
>> significant performance overhead from supporting them.  Given how often SDL
>> is used for games, I think it is meaningful to
>> assume they MAY not be available, even in C++.
>>
>> On 03/28/2013 07:20 PM, Jared Maddox wrote:
>>>> Date: Thu, 28 Mar 2013 16:24:13 -0700
>>>> From: "Nathaniel J Fries" <nfries88 at yahoo.com>
>>>> To: sdl at lists.libsdl.org
>>>> Subject: Re: [SDL] SDL_crash -- fatal error catching with user
>>>> 	callback
>>>> Message-ID: <1364513053.m2f.36342 at forums.libsdl.org>
>>>> Content-Type: text/plain; charset="iso-8859-1"
>>>>
>>>>
>>>> Mason Wheeler wrote:
>>>>> ...doesn't C++ have exceptions? That's why I was singling C out. Is
>>>>> there
>>>>> *any* modern language still in use for serious development that isn't
>>>>> capable of this, aside from C?
>>>>>
>>>>>
>>>>> Mason
>>>>
>>>>
>>>> No it does not. All C++ exceptions must be thrown by use of the "throw"
>>>> keyword, and don't even need to represent an error at all (for example,
>>>> GCC's implementation of C++11's cooperative thread termination works by
>>>> throwing an exception, to ensure destructors are called for all objects
>>>> on
>>>> the thread's stack).
>>>>
>>>> ------------------------
>>>> Nate Fries
>>>>
>>>
>>> It doesn't even matter, anyways. If every language other than C
>>> already provided this then having this library for C would be
>>> perfectly reasonable. If noone ever used it then it would STILL be
>>> reasonable. For that matter, it isn't part of SDL 2, so it has no
>>> impact on SDL 2.
>>>
>>> Mason, I don't know why you're fussing over this, but stop. The only
>>> people who have any right to question this are employees of
>>> Sourceforge, since that's where it's hosted. You shouldn't keep
>>> letting yourself get so worked up when something departs from how you
>>> expect things to be.
>>> _______________________________________________
>>> SDL mailing list
>>> SDL at lists.libsdl.org
>>> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>>>
>>
>>
>> --
>> LordHavoc
>> Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces
>> Co-designer of Nexuiz - http://alientrap.org/nexuiz
>> "War does not prove who is right, it proves who is left." - Unknown
>> "Any sufficiently advanced technology is indistinguishable from a rigged
>> demo." - James Klass
>> "A game is a series of interesting choices." - Sid Meier
>>
>> _______________________________________________
>> SDL mailing list
>> SDL at lists.libsdl.org
>> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>



More information about the SDL mailing list