Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 859b6ef7 authored by Keith Mok's avatar Keith Mok Committed by Gerrit Code Review
Browse files

Fix random crash in libhwui

On some cases (noticed from log) that there is a crash in
libhwui.so, future debug log shows that the light center position
values are nan, causing an out of bound access in hull function
in SpotShadow.cpp for parameter retPoly which assume to be of
maximum length of pointsLength only but not the case when all
points are nan.

More log shows that a Snapshot was created (new) without
mRelativeLightCenter begin set, and Layer.cpp trying to
use it by calling updateLightPosFromRenderer. Those values
are random values in stack which causing math calc based on
that value returning nan also.

Initialize mRelativeLightCenter to 0 in Snapshot.cpp to avoid the
problem.

FEIJ-1515, FEIJ-1573, FEIJ-1575, FEIJ-1589

Change-Id: I9e24f6f1f856d053d09db1b1aae100f219f2a6de
(cherry picked from commit de7ee4c9)
parent 8a137353
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment