Crash when app comes back from sleep

Another game I’ve been working on was soft released recently. it is using a vanilla implementation of the Orthographic extension. I just checked the errors I catch and send to GameAnalytics:

orthographic/render/helper.lua:75: argument #1 contains one or more values which are not numbers: vmath.matrix4(inf, 0, 0, nan, 0, inf, 0, nan, 0, 0, -1, -0, 0, 0, 0, 1) stack traceback: [C]: in function 'set_projection' orthographic/render/helper.lua:75: in function 'set_screen_view_projection' orthographic/render/orthographic.render_script:50: in function <orthographic/render/orthographic.render_script:21>

This is on iOS. Android is reporting no similar errors. This is likely to be an issue on all iOS games using Rendercam/Orthographic and the latest Defold build.

Aside from patching the Orthographic extension, is there something else I can do?

1 Like

This issue is related to the latest change for the iconified event, and the OS reports a window size of (0,0).

I think @britzl has an upcoming fix for this.

3 Likes

I’ve fixed this in the Orthographic camera (release v 2.10.1)

3 Likes

Fantastic! Will try it out for the next release.

Update: Most errors are gone, happy days! I only get this one reported now with Orthographic v2.10.1:

orthographic/render/helper.lua:61: argument #1 contains one or more values which are not numbers: vmath.matrix4(inf, 0, 0, nan, 0, inf, 0, nan, 0, 0, -1, -0, 0, 0, 0, 1)
stack traceback:
	[C]: in function 'set_projection'
	orthographic/render/helper.lua:61: in function 'set_screen_view_projection'
	orthographic/render/orthographic.render_script:47: in function <orthographic/render/orthographic.render_script:21>

Update: The game is now released and a few thousand of the above errors happen a day. I imagine it’s a silent error, because it doesn’t seem to produce one-star reviews, but maybe the extension could be updated for tidiness’ sake?

Done! New version which handles window width and height being zero: https://github.com/britzl/defold-orthographic/releases/tag/2.10.2

4 Likes

:partying_face::partying_face::partying_face:

1 Like