Search Issue Tracker

Fixed in 2.1.1

Votes

0

Found in [Package]

2.0.1

Issue ID

1305455

Regression

Yes

[Adaptive Performance] When SetRefreshRateByIndexInternal(int index) API called occurs a 'IndexOutOfRangeException'

Package: Adaptive Performance

-

A customer asked me about IndexOutOfRangeException occurred at Adaptive Performance from this ticket.

Research result, I think Adaptive Performance has a bug.

When SetRefreshRateByIndexInternal(int index) API in SamsungGameSDKAdaptivePerformanceSubsystem.cs called occurs a exception at Adaptive Performance 2.0.1. The exception occurs when the app is first running only. it is running normally from second. (Adaptive Performance 2.1.0 has a same problem too.)

1. I think it is wrong that a logic operator of the first if statement at "SetRefreshRateByIndexInternal(int index)". I think '&&-AND logic operator' is right instead of '||-OR logic operator'.

2. SupportedRefreshRates value is changing at UpdateRefreshRateInfo() API. But because of not refreshing m_DefaultRefreshRateIndex value, I think it is occurring that exception.

-------------------------------------

Step to reproduce:
1. Create a new project
2. Package Manager > Install 'Adaptive Performance' Package.
3. Scalar Settings:
- selects 'Adaptive Framerate' and 'Adaptive LOD' only two
4. VRR Settings
- checks' Automatic VRR'
5. builds app (apk) and install to Android device.
6. runs the app.

--> 'IndexOutOfRangeException' occurs (only first running after install)

Test Device:
Samsung Galaxy Fold 2 (Android 10)

Actual Result:
The exception occurs when the app is first running only. it is running normally from second.

Expected Result:
App runs normally without a exception always.

Reproducible in:
2019.4.6f1, 2019.4.16f1 with Package Version 2.0.1 (or 2.1.0)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.