Xamarin.forms: SearchBar causes XAML visualization error

Created on 9 Mar 2020  ·  10Comments  ·  Source: xamarin/Xamarin.Forms

_This issue has been moved from a ticket on Developer Community._


Hello, passed the Xamarn Forms project, but ran into trouble when visualizing the page layout. When I add a SearchBar element to the XAML code, the error pops up in the vision box, "There was an exception to the control visualization."


Original Comments

vitaliy12j on 3/5/2020, 02:00 PM:

Выяснилось, что данная проблема возникает после обновлении NuGet пакета Xamarin.Forms до версиии v4.5.0.356.

Visual Studio Feedback System on 3/5/2020, 10:12 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

4.5.0 searchbar feedback-ticket forms-previewer-sdk regression Android needs-info ❓ unverified bug

All 10 comments

Asked the author to get in touch since I don't quite understand the issue. Waiting for that.

Hello, I am the author of the request:

When I add the SearchBar element to the XAML code, an error “An exception occurred while rendering the control” pops up in the visualization window.

this problem occurs after updating the NuGet package Xamarin.Forms to version v4.5.0.356
On earlier versions and on beta version 4.6.0.379-pre1, everything is fine.
Thanks.

OK, then you mean the previewer? Would you have a screenshot or some kind of error message?

OK, then you mean the previewer? Would you have a screenshot or some kind of error message?

screenshot

Would you be able to copy the full text from that white box in the pop up here? That would be super helpful!

Would you be able to copy the full text from that white box in the pop up here? That would be super helpful!

Unfortunately, the text in this window is not highlighted and not copied, you can only scroll through the list and watch.

I had to take a very, very many screenshots to get a full screenshot of the report. Also, for convenience, I processed, just in case, a screenshot of the text recognition service.

error

Xamatin.Forms.Platform.Android.SearchBarRenderer.CreateNativeControl () in D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\SearchBarRenderer.cs64
Xamarin.Forms.Platform.Android.SearchBarRenderer.OnElementChanged (Xamarin.Forms Platform Android. lementChangedEventArgs"I[TElement] e) in D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\ SearchBarRenderer.cs:95
Xamarin.Forms.Platform.Android.VisualElementRenderer 1[TElement].SetElement (TElement element) in D:\a\1\s\Xamarin.Forms Platform Android\VisualélementRenderer.cs:236
Xamarin Forms Platform.Android.VisualElementRenderer'[TElement] Xamarin.Forms Platform. Android VisualElementRenderer SetElement (Xamarin Forms.VisualElement element) in D:\a\1\s\Xamarin Forms Platform.Android| VisualElementRenderer.cs:133
Xamarin.Forms Platform. Android Platform. CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) in D\a\1\s\Kamarin.Forms.Platform Android Platform.cs:350
Xamarin Forms Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin Forms Platform.Android.lVisualElementRenderer oldRenclerer, Xamarin.Forms Platform.Android RendererPool pool, System Boolean sameChildren) in Ds\a\1\s\Xamarin.Forms Platform.Android\ VisualElementPackager.cs137
Xamarin Forms Platform.Android.VisualElementPackager SetElement (Kemarin Forms.VisualElement oldélement, Xamarin.Forms.VisualElement newElement) in D:\a\1\s\Xamarin Forms Platform.Android| VisualElementPackager.cs:347
Xamarin Forms Platform.Android.VisualElementPackager.Load () in D:\a\ \s\Xamarin Forms Platform Android\VisualElementPackager.cs:109
Xamarin.Forms Platform. Android VisualElementRenderer"[TElement]SetPackager (Xamarin.Forms.Platform. Android, VisualElementPackager packager) n D:\a\1\s\Xamarin Forms Platform Android\VisualElementRenderer.cs:445
Xamarin.Forms.Platform.Android.VisualElementRenderer 1[TElement].SetElement (TElement element) in D:\a\1\s\Xamarin.Forms Platform.Android|VisualElementRenderer.cs:239
Xamarin.Forms.Platform.Android.VisualElementRenderer 1[TElement] Xamarin.Forms Platform Android. lVisualElementRenderer SetElement (Xamarin.Forms,.VisualElement element) in D:\a\1\s\Xamarin.Forms.Platform.Android| VisualElementRenderer.cs:133,
Xamatin.Forms.Platform.Android Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) in D:\a\1\s\Xamarin.Forms.Platform.Android\ Platform.cs:350
Xamarin.Forms.Platform.Android, VisualElementPackager. AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms Platform Android. |VisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPoal pool, System.Boolean sameChildren) in D:\a\1\s\Xamarin.Forms.Platform.Andlroid\VisualElementPackaaer.cs:137
Xamarin.Forms Platform.Android, VisualElementPackager.SetElement (Kamarin.Forms. VisualElement oldElement, Xamarin.Forms.VisualElement newElement) in D:\a\1\s\Xamarin.Forms Platform.Android\VisualElementPackager.cs:347
Xamarin.Forms.Platform.Android, VisualElementPackager.Load () in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.csi109
Xamarin.Forms Platform. Android VisualElementRenderer"[TElement]SetPackager (Xamarin.Forms. Platform. Android, VisualElementPackager packager) n D:\a\1\s\Xamarin Forms Platform Android\VisualElementRenderer.cs:485
Xamarin.Forms Platform. Android VisualElementRenderer"[TElement]SetElement (TElement element) in D:\a\1\s\Xamarin Forms Platform Android} VisualElementRenderer.cs:239
Xamarin.Forms Platform. Android VisualElementRenderer"[TElement} Xamarin.Forms Platform Android.!VisualElementRendlrerSetElement (Xamarin.FormsVisualElement element) in D:\a\T\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:133
Xamarin.Forms Platform. Android Platform. CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) in D;\a\1\s\Kamarin.Forms-Platform Android Platform.cs:350
Xamarin Forms Platform.Android Platform. CreateRenderer (Xamarin.Forms.VisualElement element) in D:\a\1\s\Kamarin Forms Platform Android\Platform.cs:342
unknown method>
Systern Reflection. RuntimeMethodinfo.Invoke (System.Object obj, System Reflection BindingFlags invokeAttr, System Reflection.Binder binder, System. Object{] parameters, System. Globalization.Culturelnfo culture) in D:\j\workspace\archiv -10\android\release\mcs\ class\corlib\System.Reflection\RuntimeMethodinfo.cs:395

Really appreciate the effort @vik12J thank you so much!

@vik12J If you update to the latest 4.5.0 release, does this issue still occur? Thanks!

Since we haven't heard from you in more than 30 days, we hope this issue is no longer affecting you. If it is, please reopen this issue and provide the requested information so that we can look into it further. Thank you!

Was this page helpful?
0 / 5 - 0 ratings