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

NullReferenceException in Entry on second display of popup #40

Closed
bzburr opened this issue Oct 4, 2016 · 11 comments
Closed

NullReferenceException in Entry on second display of popup #40

bzburr opened this issue Oct 4, 2016 · 11 comments

Comments

@bzburr
Copy link

bzburr commented Oct 4, 2016

When I have a popup with an Entry, the popup works on first display. No problem.

When displayed a second time - the app crashes with a NullReferenceException after the Entry handles focus and before the keyboard is displayed.
the call stack says the exception is coming from SetElementSize in KeyBoardUpNotification

screen shot 2016-10-04 at 11 43 47 am

x
@rotorgames
Copy link
Owner

rotorgames commented Oct 4, 2016

@bzburr Hi friend. Please write versions:

Popup,
Xamarin.iOS,
Xamarin.VS (or Xamarin Studio),
Xamarin.Forms,
Android or iOS platform version.

@zois
Copy link

zois commented Oct 12, 2016

Same here. I know you are super busy but instead of asking all the info, try to reproduce it. bzburr is pretty straightforward. When you have an entry in the popup, it crashes the second time you open the popup. It happens only in iOS, not in Android. I am using version 1.0.2. Thanks

@rotorgames
Copy link
Owner

@zois Hi friend. Can you send to github your solution?

@zois
Copy link

zois commented Oct 12, 2016

When using MVVM, e.g Prism may cause this issue with the navigation. What I did is using explicitly the popups navigation service to push and pop the popup and I have no issues anymore. Now I just need to tell the view model that opens the popup, that sth has changed, e.g. sth was selected from a list. Thanks again!

@EmilAlipiev
Copy link
Contributor

how did you achieve to open popup from viewmodel? can you please share your code?

@cfonseca-dev
Copy link

Isn't there a solution for this issue yet?

@rotorgames
Copy link
Owner

@cfaguayo It can be fixed in the next version

@rotorgames
Copy link
Owner

This issue was fixed in v1.1.0-pre1. Please test it and tell me about your tests. Thank you.

@KarlRanseier
Copy link

V1.1.0-Pre2 indeed fixes this problem - Thanks!

@lohitha123
Copy link

Hi all,

this is not fixed ..

Please look at this once again,

I amusing the version v1.0.4 -- again i got the issues.

System.NullReferenceException: Object reference not set to an instance of an object
at Xamarin.Forms.Platform.iOS.PageRenderer.SetElementSize (Xamarin.Forms.Size size) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:62
at Rg.Plugins.Popup.IOS.Renderers.PopupPageRenderer.KeyBoardUpNotification (Foundation.NSNotification notifi) [0x0003c] in :0
at Foundation.InternalNSNotificationHandler.Post (Foundation.NSNotification s) [0x00000] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/Foundation/NSNotificationCenter.cs:48
at at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at Smartdocs.iOS.Application.Main (System.String[] args) [0x00001] in /Users/ravishankar/Desktop/oct5theditor/mobileapp/iOS/Main.cs:17

@rotorgames
Copy link
Owner

@lohitha123 Please try to update to v1.1.0-pre5

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

No branches or pull requests

7 participants