splat: [BUG] ReflectionTypeLoadException - Type '__callback_factory__class__' is not finished

Describe the bug I just installed the latest ReactiveUI (10.5.7) into my Xamarin.Forms (4.3) app, and built a single ViewModel out using it. I love it so far, and I did all of my testing using the iOS simulator.

Upon testing the app on my Pixel 4XL (Android 10), I immediately got the following runtime exception when I hit the new page/viewmodel.

PlatformBitmapLoader: Exception while detecting drawing types. - System.Reflection.ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
Type '__callback_factory__class__' is not finished
  at System.Reflection.Emit.AssemblyBuilder.GetTypes (System.Boolean exportedOnly) [0x0012d] in <ff07eae8184a40a08e79049bbcb31a0e>:0 
  at System.Reflection.Assembly.GetTypes () [0x00000] in <ff07eae8184a40a08e79049bbcb31a0e>:0 
  at Splat.PlatformBitmapLoader.GetTypesFromAssembly (System.Reflection.Assembly assembly, Splat.IFullLogger log) [0x00000] in d:\a\1\s\src\Splat.Drawing\Platforms\Android\Bitmaps\PlatformBitmapLoader.cs:158 
System.TypeLoadException: Type '__callback_factory__class__' is not finished

followed by a really long list of this

PlatformBitmapLoader: DrawableList Type: Drawable PlatformBitmapLoader: DrawableList Type: Drawable PlatformBitmapLoader: DrawableList Type: Drawable PlatformBitmapLoader: DrawableList Type: Drawable PlatformBitmapLoader: DrawableList Type: Drawable

The end result is an extremely long delay in loading the page.

Steps To Reproduce Not sure how to fill this in. I’m assuming this is a tooling issue moresoe than anything else. I will give whatever information you ask for however.

Expected behavior Page should load instantaneously

Screenshots If applicable, add screenshots to help explain your problem.

Environment(please complete the following information):

  • Mono: 6.4.0.208
  • OS: Android
  • Version 10
  • Device: Google Pixel 4 LX
  • android:minSdkVersion: 22"
  • android:targetSdkVersion: 29

notice in the gif where I press the (+) in the top right, there is an enormous delay and an enormous amount of output before the page loads. Nov-01-2019 13-55-54

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 25 (12 by maintainers)

Most upvoted comments

We are considering just removing that functionality or at least making it optional