Yeah you are right, I realized the height of 0 was the problem shortly afterwards. I feel slightly dumb but also not? I actually was paying attention to the console and it did not pop up on windows...until it did lol I did not realize that force quitting android does not trigger the game end event thus it was never saving a setting. Things were working perfectly seemingly perfectly on windows, just very strange, I had to do some special actions to replicate the issue on windowsEvery possible index is out of bounds when your grid has a height of 0.
Also, this error crops up in Windows F5 runs too, you just aren't paying attention.
Android (and iOS) are different to windows in that the user can exit the app or push it into the background in an instant (and they are designed that way), which means that it is impossible for GM to catch this and trigger an event. As for the grid error, iirc, this is actually being fixed so that any out of bounds errors will crash the runner on all platforms (it currently only crashes on HTML5 I think), so errors like this should be easier to debug.Yeah you are right, I realized the height of 0 was the problem shortly afterwards. I feel slightly dumb but also not? I actually was paying attention to the console and it did not pop up on windows...until it did lol I did not realize that force quitting android does not trigger the game end event thus it was never saving a setting. Things were working perfectly seemingly perfectly on windows, just very strange, I had to do some special actions to replicate the issue on windows
Excellent looking forward to that, its well overdue! I don't have the html export so currently I can't get that hard crash.Android (and iOS) are different to windows in that the user can exit the app or push it into the background in an instant (and they are designed that way), which means that it is impossible for GM to catch this and trigger an event. As for the grid error, iirc, this is actually being fixed so that any out of bounds errors will crash the runner on all platforms (it currently only crashes on HTML5 I think), so errors like this should be easier to debug.
Nope...it's instantaneous and can't be captured by the app (or at least, it's not captured by any GameMaker apps). This is why things like os_is_paused() only trigger when the app is brought to foreground again and not when it's pushed to the background.Does the app lose focus when its pushed in the back? Is that a way to be able to trigger an event or line of code?
If the app is closed on mobile you can use os_is_paused() to run any code before the app loses focus.Excellent looking forward to that, its well overdue! I don't have the html export so currently I can't get that hard crash.
Does the app lose focus when its pushed in the back? Is that a way to be able to trigger an event or line of code?
Hmmm... good point! I may be misremembering the docs, or it may be that it's being misrepresented in the docs. I'll check with the core tech devs tomorrow and see.That's a bit ambiguous as the docs state that the code is run before the app is paused, but won't be acted upon until the app is reopened in the case of the example code.
I haven't tested that function in a while, but as I remember it things like creating instances, layers etc won't be created until the next step (when the app regains focus) but any code that runs instantly like changing variables, arrays, lists etc would be done before the app was paused and ready to use once the app regained focus.Hmmm... good point! I may be misremembering the docs, or it may be that it's being misrepresented in the docs. I'll check with the core tech devs tomorrow and see.
REALLY REALLY? This would be amazing!As for the grid error, iirc, this is actually being fixed so that any out of bounds errors will crash the runner on all platforms (it currently only crashes on HTML5 I think), so errors like this should be easier to debug.
I hate to sound like a flip flopper on the subject but I kinda...KINDA...understand why having a width or height being 0 is kinda a good thing. It makes looping and filling in things much easier. For example:Android (and iOS) are different to windows in that the user can exit the app or push it into the background in an instant (and they are designed that way), which means that it is impossible for GM to catch this and trigger an event. As for the grid error, iirc, this is actually being fixed so that any out of bounds errors will crash the runner on all platforms (it currently only crashes on HTML5 I think), so errors like this should be easier to debug.
/// in create I did: season_ranking_grid = ds_grid_create(width,1); // to give one row in there
var ranking_hh = ds_grid_height(season_ranking_grid); // height of ranking
if season_ranking_grid[# 0,0] == undefined
ranking_hh --;
// add column
ds_grid_resize(season_ranking_grid,ds_grid_width(season_ranking_grid),ranking_hh+1); // add to end of grid
ds_grid_resize(season_ranking_usage_grid,ds_grid_width(season_ranking_grid),ranking_hh+1); // add to end of usage grid
/// create: grid = ds_grid(width,0); // no rows
var grid_ww = ds_grid_width(grid);
var grid_hh = ds_grid_height(grid);
ds_grid_resize(grid,grid_ww,grid_hh+1);
// add data
grid[# 0,grid_hh+1 ] = name; // add name to first column
grid[# 1,grid_hh+1] = itemlist; // add itemlist grid id to second column