Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue with ScaleX error on Android 9 and 11 #670

Merged
merged 1 commit into from
May 7, 2021

Conversation

zinvob
Copy link
Contributor

@zinvob zinvob commented May 4, 2021

#407

  • All projects build
  • Follows style guide lines
  • Relevant documentation was updated
  • Rebased onto current develop

@LuckyDucko
Copy link
Collaborator

@zinvob can you show me how you reproduced the code?

Just curious if instead of the if statement, we could use null-coalesce and null conditional operators to change the code from

_defaultOpacity = page.Opacity;
if (double.IsNaN(_defaultOpacity))
    _defaultOpacity = 1;

to

_defaultOpacity = page?.Opacity ?? 1

@zinvob
Copy link
Contributor Author

zinvob commented May 6, 2021

_defaultOpacity = page?.Opacity ?? 1

Page is not null and Opacity is not null (it's NAN). Your sample will just still produce _defaultOpacity = NAN. There must be a NAN check. It seems that this problem is due to the page being partially closed down when checking for Opacity. This seems to give different effects on different versions. On my system I can reproduce it on 9 and 11.

Copy link
Collaborator

@LuckyDucko LuckyDucko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zinvob Ah I see, why I wanted some example code so I could verify where you were coming from.

It's unusual that this affected android only, perhaps there is a deeper issue here concerning timing, if I follow your idea about partially closed pages. I'll keep that in mind. Otherwise, good job 👍

@LuckyDucko LuckyDucko requested a review from martijn00 May 7, 2021 00:14
@martijn00 martijn00 merged commit 6a706ee into rotorgames:develop May 7, 2021
@martijn00
Copy link
Collaborator

@rotorgames My nuget api key has expired. Can you send a new one on Slack or email, or give me direct access to the nuget?

@nathankim0
Copy link

Wow, I found this pr while having a hard time encountering a ScaleX error in v2.0.0.13. The error was resolved after updating to v2.0.0.14. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants