Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Crash when using ViewCell in ListView, but only on Windows Phone

$
0
0

I have a Xamarin.Forms app that has a ListView with around 2000 items. I provide a search so the size is not really a problem. I designed the app initially to use a TextCell, but now I want to switch to a ViewCell to show a bit more info besides text and detail and have a major issue. On Android and iOS it works perfect, not even a performance hit, but on Windows Phone the screen freezes for a second, and then Visual Studio gets the focus saying that "source information is missing from debug information for this module". Although I enabled "Break on CLR exception when thrown" I didn't even get an exception.

The stacktrace at that moment is :
mscorlib.ni.dll!System.Reflection.RuntimeAssembly.nLoad(System.Reflection.AssemblyName fileName, string codeBase, System.Security.Policy.Evidence assemblySecurity, System.Reflection.RuntimeAssembly locationHint, ref System.Threading.StackCrawlMark stackMark, System.IntPtr pPrivHostBinder, bool throwOnFileNotFound, bool forIntrospection, bool suppressSecurityChecks) Unknown
mscorlib.ni.dll!System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(System.Reflection.AssemblyName assemblyRef, System.Security.Policy.Evidence assemblySecurity, System.Reflection.RuntimeAssembly reqAssembly, ref System.Threading.StackCrawlMark stackMark, System.IntPtr pPrivHostBinder, bool throwOnFileNotFound, bool forIntrospection, bool suppressSecurityChecks) Unknown
mscorlib.ni.dll!System.Reflection.RuntimeAssembly.InternalLoad(string assemblyString, System.Security.Policy.Evidence assemblySecurity, ref System.Threading.StackCrawlMark stackMark, System.IntPtr pPrivHostBinder, bool forIntrospection) Unknown
mscorlib.ni.dll!System.Reflection.RuntimeAssembly.InternalLoad(string assemblyString, System.Security.Policy.Evidence assemblySecurity, ref System.Threading.StackCrawlMark stackMark, bool forIntrospection) Unknown
mscorlib.ni.dll!System.Reflection.Assembly.Load(string assemblyString) Unknown
System.Windows.ni.dll!System.Windows.Resx.Resx() Unknown
System.Windows.ni.dll!System.Windows.Resx.GetLoader() Unknown
System.Windows.ni.dll!System.Windows.Resx.GetStringHelper(string name) Unknown
System.Windows.ni.dll!System.Windows.Resx.GetString(string name) Unknown
System.Windows.ni.dll!MS.Internal.Error.MarshalXresultAsException(uint hr, MS.Internal.Error.COMExceptionBehavior comExceptionBehavior) Unknown
System.Windows.ni.dll!MS.Internal.Error.CallAUEHandler(uint hr, out uint bIsHandled) Unknown

Very weird, at first sight nothing Xamarin related. BUT if i reduce my list of data to around 50 items instead of 2000, the ListView does get rendered as expected !

The ViewCell is VERY simple by the way (for the sake of testing, I dumbed it down to see if it still crashes - and it does):
(angle brackets in XAML removed)
ViewCell Height="30"
Label Text ="{Binding Description}" TextColor="{StaticResource LabguideColor}" /
/ViewCell

Another sidenote, I have nothing of custom renderers or other device specific code. And on iOS and Android it runs perfectly, so it really has to be the combination of ViewCell and large datasets and Windows Phone


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>