It happened very rarely at exit and once while playing.
But you posted something about set sprite frame that could be something as i do this very often.
I got an game crash when i whas going to test it on my ultrabook
Then i noticed that win 8 whas making an security copy at the same time i whas playing
But i couldt mimick any crashes now that i wanted?
Here is how i end my game and as you can see i have separate loops for each screen.
REM /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
REM // The menue loop. ////
REM //////////////////////////////////////////////////
MenueLoop:
While Game_State=Game_Menue
GFT# = GetFrameTime()
if Mvolume#<70
if ThemeMusic=0 then StartTitelMusic()
Mvolume#=Mvolume#+(GFT#*10.0)
SetMusicSystemVolume( Mvolume# )
endif
RunMenue()
BackButtonRelease=GetRawKeyState(27)
if GetRawKeyReleased( 9 ) then KeyPress=0
if EndFlag>0 then end
sync()
Endwhile
Run_One_Time = 0
goto Origin
///////////////////////////////////////////////////////////////////////
Function StartTitelMusic()
ThemeMusic = Loadmusic("music/CopyrightedMusicDark.mp3")
Playmusic(ThemeMusic,1)
SetMusicSystemVolume( 0 )
if MusicFlag=1 then PauseMusic()
endfunction
//////////////////////////////////////////////////////////////////////
function RunMenue()
if Run_One_Time = 0
Create_Menue_Media()
OnScreen_Buttons_Visible(0,1,0,0)
//Create_Adverts()
endif
Screen_Menue()
OnScreen_Buttons_Input()
Run_One_Time = 1
GyroBack()
if Game_State <> Game_Menue then Clear_Menue_Media()
endfunction
REM /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
REM // The select loop. ////
REM //////////////////////////////////////////////////
SelectLoop:
While Game_State=Game_Level_Select
GFT# = GetFrameTime()
if Mvolume#<70
if ThemeMusic=0 then StartTitelMusic()
Mvolume#=Mvolume#+(GFT#*10.0)
SetMusicSystemVolume( Mvolume# )
endif
RunLevelSelect()
BackButtonRelease=GetRawKeyState(27)
if GetRawKeyReleased( 9 ) then KeyPress=0
if EndFlag>0 then end
sync()
Endwhile
Run_One_Time = 0
goto Origin
///////////////////////////////////////////////////////////////////////
function RunLevelSelect()
if Run_One_Time = 0
Create_Selection_Media()
OnScreen_Buttons_Visible(1,1,0,0)
endif
Screen_Selection()
OnScreen_Buttons_Input()
Run_One_Time = 1
GyroBack()
if Game_State <> Game_Level_Select then Clear_Selection_Media()
endfunction
i hope it helps?
Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz