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

Fix for nullreferenceexception in TabbedRenderer on iOS when it has are no children (yet) #669

Merged
merged 1 commit into from Mar 3, 2017

Conversation

Projects
None yet
4 participants
@jorisvergeer
Contributor

jorisvergeer commented Jan 9, 2017

When a TabbedPage is rendered on iOS with no set CurrentPage (i.e. CurrentPage = null), this results in a NullReferenceException.

This occurs for example when the children are loaded/added async.

Description of Change

Add null check in ChildViewControllerForStatusBarHidden() in TabbedRenderer

Bugs Fixed

API Changes

None

Behavioral Changes

None

PR Checklist

  • Has tests (if omitted, state reason in description) I don't know how to write automated integration tests.
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense
Joris Vergeer
@dnfclas

This comment has been minimized.

Show comment
Hide comment
@dnfclas

dnfclas Jan 9, 2017

Hi @jorisvergeer, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, DNFBOT;

dnfclas commented Jan 9, 2017

Hi @jorisvergeer, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, DNFBOT;

@dnfclas

This comment has been minimized.

Show comment
Hide comment
@dnfclas

dnfclas Jan 9, 2017

@jorisvergeer, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.

Thanks, DNFBOT;

dnfclas commented Jan 9, 2017

@jorisvergeer, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.

Thanks, DNFBOT;

@dnfclas dnfclas added the cla-signed label Jan 9, 2017

@rmarinho

This comment has been minimized.

Show comment
Hide comment
@rmarinho

rmarinho Jan 11, 2017

Member

Can you add a UITest for it?

Member

rmarinho commented Jan 11, 2017

Can you add a UITest for it?

@jorisvergeer

This comment has been minimized.

Show comment
Hide comment
@jorisvergeer

jorisvergeer Jan 16, 2017

Contributor

@rmarinho
I will add tests when I have time. (Somewhere this week)
Isn't it a but dubious that there are currently no tests for this control/renderer?

Contributor

jorisvergeer commented Jan 16, 2017

@rmarinho
I will add tests when I have time. (Somewhere this week)
Isn't it a but dubious that there are currently no tests for this control/renderer?

@rmarinho

This comment has been minimized.

Show comment
Hide comment
@rmarinho

rmarinho Jan 16, 2017

Member

@jorisvergeer for the platform/renderers side we have UITests. If you write a UITest with a custom renderer that reproduces this should work. and cover this issue.

Thanks.

Member

rmarinho commented Jan 16, 2017

@jorisvergeer for the platform/renderers side we have UITests. If you write a UITest with a custom renderer that reproduces this should work. and cover this issue.

Thanks.

@rmarinho rmarinho added needs-changes and removed waiting-tests labels Feb 2, 2017

@rmarinho

Needs a UITest

@rmarinho

This comment has been minimized.

Show comment
Hide comment
@rmarinho

rmarinho Feb 6, 2017

Member

@jorisvergeer can you please add a UITest so we don't regress on this.

Thanks

Member

rmarinho commented Feb 6, 2017

@jorisvergeer can you please add a UITest so we don't regress on this.

Thanks

@jorisvergeer

This comment has been minimized.

Show comment
Hide comment
@jorisvergeer

jorisvergeer Feb 6, 2017

Contributor

@rmarinho Is there any documentation about how to get the UItest project to work?

All I get for every test when I do "run tests" is:
TestFixtureSetUp failed in IssuesSetup

I tried with the Xamarin.Forms.Core.iOS.UITests project on both a real device and the simulator. They all give the same results. (I followed instructions from https://developer.xamarin.com/guides/testcloud/uitest/working-with/testing-on-devices/ios/)

Contributor

jorisvergeer commented Feb 6, 2017

@rmarinho Is there any documentation about how to get the UItest project to work?

All I get for every test when I do "run tests" is:
TestFixtureSetUp failed in IssuesSetup

I tried with the Xamarin.Forms.Core.iOS.UITests project on both a real device and the simulator. They all give the same results. (I followed instructions from https://developer.xamarin.com/guides/testcloud/uitest/working-with/testing-on-devices/ios/)

@rmarinho rmarinho merged commit 38c0b34 into xamarin:master Mar 3, 2017

6 checks passed

Android-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: UI Tests :: OSX Test Cloud Package - Run Android 6.0.1 : Tests passed: 351, i…
Details
OSX-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: OSX Debug : Running
Details
Windows-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: Windows Debug : Tests passed: 3695, ignored: 10
Details
iOS10-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified iOS10 : Tests passed: 34…
Details
iOS8-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified IOS8 : Tests passed: 344…
Details
iOS9-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified iOS9 : Tests passed: 346…
Details

rmarinho added a commit that referenced this pull request Mar 9, 2017

@jorisvergeer jorisvergeer deleted the jorisvergeer:bugfix/nullreference-in-tabbedpage branch Mar 23, 2017

@samhouts samhouts added D-15.4 and removed cla-not-required labels Oct 10, 2017

@samhouts samhouts modified the milestones: 2.3.0, 2.3.4 Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment