You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I trying to deliberately trigger the stuck sprite bug, but instead caused the game to freeze (not crash). By printing out the stack trace, it seems this happens due to a while loop which never terminates.
On Matsuribayashi ch8, here an edited _mats_op.txt which causes the crash near the start (completely unreasonable script, but it probably shouldn't crash):
It may be a good idea to add a timeout to the while loop, so at least the game doesn't crash, however doing so may put the game in an unknown state, so not sure what action should be taken if the timeout occurs.
The while loop relies on layer.FadingOut being set to false, which only happens once ReleaseTextures() is called (which is inside HideLayer()).
However, ReleaseTextures() won't set layer.FadingOut to false if primary (the primary texture for that layer) is null. primary is deliberately set to null in ReleaseTextures(), but I think it's also possible if the primary texture is destroyed or cleaned up by Unity for it to be set to null. So relying on layer.FadingOut to end the while loop seems dangerous.
I trying to deliberately trigger the stuck sprite bug, but instead caused the game to freeze (not crash). By printing out the stack trace, it seems this happens due to a while loop which never terminates.
On Matsuribayashi ch8, here an edited
_mats_op.txt
which causes the crash near the start (completely unreasonable script, but it probably shouldn't crash):_mats_op.txt
The while loop appears in a couple places (there may be more than the below):
higurashi-assembly/Assets.Scripts.Core.Scene/SceneController.cs
Lines 171 to 183 in 5e26440
higurashi-assembly/Assets.Scripts.Core.Scene/SceneController.cs
Lines 210 to 217 in 5e26440
higurashi-assembly/Assets.Scripts.Core.Scene/SceneController.cs
Lines 224 to 231 in 5e26440
It may be a good idea to add a timeout to the while loop, so at least the game doesn't crash, however doing so may put the game in an unknown state, so not sure what action should be taken if the timeout occurs.
The while loop relies on
layer.FadingOut
being set to false, which only happens onceReleaseTextures()
is called (which is insideHideLayer()
).However,
ReleaseTextures()
won't setlayer.FadingOut
to false ifprimary
(the primary texture for that layer) isnull
. primary is deliberately set tonull
inReleaseTextures()
, but I think it's also possible if the primary texture is destroyed or cleaned up by Unity for it to be set tonull
. So relying onlayer.FadingOut
to end the while loop seems dangerous.higurashi-assembly/Assets.Scripts.Core.Scene/Layer.cs
Lines 711 to 732 in 5e26440
The text was updated successfully, but these errors were encountered: