tangram-es icon indicating copy to clipboard operation
tangram-es copied to clipboard

Very Rarely MapController.getCameraPosition().longitude returns NaN

Open westnordost opened this issue 2 years ago • 2 comments

Follow-up of #2169. Basically, the problem described in the title still exists, but happens much less frequently.

Today, I got a bug report that may help to find a (remaining) cause for it:

Apparently, it happened right after rotating the screen, in an app that does not restart its activity when the screen is rotated but handles the screen dimension change itself. So in other words, this happened right when the screen dimensions are being updated (maybe concurrently to that?).

Note that both longitude and latitude are NaN this time around as opposed to the previous ticket.

I hope that information helps.

westnordost avatar Aug 31 '21 14:08 westnordost

Ok, thanks for the new info! Does this occur all the time when a resize occurs, or only sometimes?

matteblair avatar Aug 31 '21 17:08 matteblair

Definitely not always. Very (very?) rarely. So I guess it must be a race condition of sorts.

westnordost avatar Aug 31 '21 17:08 westnordost