I'm aware that an issue with desktops trying to use 16-bit colour was patched in 6.99.1 (viewtopic.php?t=31351), however in the last few months I've seen multiple reports of this occurring exclusively on Android devices running Ren'Py 7.3.5. The same people had no issue with the previous release of the game which also ran that version of Ren'Py.
Between the two releases the most significant thing to come close to touching Surface code was a reordering of crop and rotozoom operations to optimise them (was rotozoom then crop, now the crop is done first to have less to zoom), however the issue appears to occur at or close to random, even when well away from such code paths.
I've dug around a bit, and while I can force the exception by passing junk depth and mask data to the Surface constructor, I can find no code path in Ren'Py that could trigger it. I've had users report back their renpy.display.pgrender.sample_alpha (and noalpha values to check the depth and mask values being auto-created there are valid and they all appear to check out.
It's not a huge number of reports, somewhere in the region of 10-25, but it's enough to suggest at least something somewhere must be up.
Here's a sample of the debug data collected. While the first surface listed varies per user/device (screen res), all other values have been consistent between people with no problems and people seeing this error anywhere between 1 and 30+ minutes of playing. As far as I can tell right now, the only thing that would trigger the error would be a combination of these values SDL2 doesn't expect, and that doesn't appear to be the case for anyone affected thus far, leaving me more than a little stumped at the moment. :(
Code: Select all
sys.byteorder 'little'
pygame.display.get_surface() <Surface(2560x1440x32)>
renpy.display.pgrender.sample_alpha <Surface(10x10x32)>
.get_masks() (255L, 65280L, 16711680L, 4278190080L)
renpy.display.pgrender.sample_noalpha <Surface(10x10x32)>
.get_masks() (255L, 65280L, 16711680L, 0L)
pygame.Surface((10, 10), 0, 32) <Surface(10x10x32)>
.get_masks() (255L, 65280L, 16711680L, 0L)