Thanks for the reply!
Your change allows the app to restart properly, which is somewhat better.
However maybe this:
could do the trick?
I do not have much experience with Android programming and simply added
Intent clearRecentAppIntent = new Intent(Intent.ACTION_MAIN);
to the SDLActivity.onDestroy() function right after super.onDestroy().
However it does not do as I had hoped for, but maybe I am doing
something wrong here.On 12.02.2014 22:17, Gabriel Jacobo wrote:
This is the best I could
do: https://hg.libsdl.org/SDL/rev/56e9c709db7e Let me know how it works
The background behind this is that Android doesn’t want you terminating
your app yourself so badly that even if you do, the static variables we
keep never get wiped unless we do that manually. So, you exit your app,
it finishes successfully, you run it again…and all the previous
variables keep their previous values…which at least in my opinion is
bona fide strange bug generator.
All of this doesn’t solve the “problem” of the app appearing in the task
stack after you exit. Apparently, from a quick google (and this is news
to me), the task stack shows recent apps whether they are still open or
not (though removing an app from that by swiping it away does seem to
close it effectively).
2014-02-12 17:26 GMT-03:00 Martin Felis <@Martin_Felis
Just tried it in the emulator and it seems I need to rephrase my
The app does quit (also in the task manager), however when pressing the
"recent apps button" that is available on newer (i.e. >= 4.0) devices
the SDL2 App is still listed but cannot be switched to due to the
I was not able to reproduce it in the emulator as I cannot get the
"recent apps button" to show up. :(
On 12.02.2014 21:03, Martin Felis wrote:
> Hope it is okay to bump.
> Does not calling exit() work for other people?
> For me it switches to Home but in the task manager the App is still
> available and when switching to it it results in a segfault.
> This is also for the case when modifying testgles.c to exit the main
> render loop after e.g. 1000 frames.
> On 08.02.2014 11:20, Martin Felis wrote:
>> On 08.02.2014 00:58, Gabriel Jacobo wrote:
>>> 2014-02-07 20:34 GMT-03:00 Martin Felis <martin at fysx.org
<mailto:martin at fysx.org>
>>> <mailto:martin at fysx.org <mailto:martin at fysx.org>>>:
>>> I felt adventurous to exit the app nicer by removing the
>>> The app does get destroyed, however when switching to the
task manager I
>>> can still see the App. When clicking on it it tries to
resume the app
>>> which results in a segfault as SDL_main is not running anymore.
>>> Is this a bug or a misunderstood feature?
>>> It may be a bug, does handleNativeExit get called after the
>> Yes it gets called. Also as a result onDestroy() gets called.
>> (Sorry for possible double post - used wrong email address)
>> SDL mailing list
>> SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
> SDL mailing list
> SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
SDL mailing list
SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
SDL mailing list
SDL at lists.libsdl.org