Xamarin.Plugin.FAB
Xamarin.Plugin.FAB copied to clipboard
Object reference not set to an instance of an object.
Hello,
In some cases when the app is foreground and turns to the main, we got this error:
Thread finished: #19
The thread 'Unknown' (0x13) has exited with code 0 (0x0).
03-08 11:35:10.810 D/Mono (14758): DllImport attempting to load: '/system/lib/liblog.so'.
03-08 11:35:10.811 D/Mono (14758): DllImport loaded library '/system/lib/liblog.so'.
03-08 11:35:10.811 D/Mono (14758): DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
03-08 11:35:10.811 D/Mono (14758): Searching for '__android_log_print'.
03-08 11:35:10.811 D/Mono (14758): Probing '__android_log_print'.
03-08 11:35:10.811 D/Mono (14758): Found as '__android_log_print'.
03-08 11:35:10.815 I/MonoDroid(14758): UNHANDLED EXCEPTION:
03-08 11:35:10.866 I/MonoDroid(14758): System.NullReferenceException: Object reference not set to an instance of an object.
03-08 11:35:10.866 I/MonoDroid(14758): at FAB.Droid.FloatingActionButtonRenderer+<SetImage>c__async6+<SetImage>c__AnonStorey7.<>m__0 () [0x00010] in <865ebf9a4258496ba3806c92ae441acc>:0
03-08 11:35:10.866 I/MonoDroid(14758): at Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/4009/9578cdcd/source/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:36
03-08 11:35:10.866 I/MonoDroid(14758): at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in /Users/builder/data/lanes/4009/9578cdcd/source/monodroid/src/Mono.Android/platforms/android-25/src/generated/Java.Lang.IRunnable.cs:81
03-08 11:35:10.866 I/MonoDroid(14758): at (wrapper dynamic-method) System.Object:0163adae-18c3-4525-86fc-0158342d1ab1 (intptr,intptr)
[0:] *** Erros não tratados
[0:] Object reference not set to an instance of an object.
[0:] at FAB.Droid.FloatingActionButtonRenderer+<SetImage>c__async6+<SetImage>c__AnonStorey7.<>m__0 () [0x00010] in <865ebf9a4258496ba3806c92ae441acc>:0
at Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/4009/9578cdcd/source/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:36
at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in /Users/builder/data/lanes/4009/9578cdcd/source/monodroid/src/Mono.Android/platforms/android-25/src/generated/Java.Lang.IRunnable.cs:81
at (wrapper dynamic-method) System.Object:0163adae-18c3-4525-86fc-0158342d1ab1 (intptr,intptr)
An unhandled exception occured.
Thread finished: #20
Thread finished: #21
03-08 11:35:11.542 D/Mono (14758): [0x9a572930] hill climbing, change max number of threads 17
The thread 'Unknown' (0x14) has exited with code 0 (0x0).
The thread 'Unknown' (0x15) has exited with code 0 (0x0).
03-08 11:35:11.557 E/mono-rt (14758): [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object.
I'm using the 2.1.2-pre3 version and I'm still getting this issue on Android. Tested with Android 4 to 7.
[0:] Object reference not set to an instance of an object.
[0:] at FAB.Droid.FloatingActionButtonRenderer+<SetImage>c__async6+<SetImage>c__AnonStorey7.<>m__0 () [0x00010] in <865ebf9a4258496ba3806c92ae441acc>:0
at Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/3511/501e63ce/source/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:36
at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in /Users/builder/data/lanes/3511/501e63ce/source/monodroid/src/Mono.Android/platforms/android-24/src/generated/Java.Lang.IRunnable.cs:81
at (wrapper dynamic-method) System.Object:751c37f4-1b42-4db4-90e4-d0137600522b (intptr,intptr)
An unhandled exception occured.
Thanks when will their be a new Nuget update :)? Or how can I pull and add this fix myself ?
changes are merged. working on nuget update publish. running into some CI issues though.
Great! Thanks for your effort I will wait :)
@LukasThijs update has been pushed to nuget. I'd appreciate feedback/input whether or not the included changes solve your issue.
https://www.nuget.org/packages/FAB.Forms/2.2.0-pre1
thanks to @erichedstrom for addressing it.
@keannan5390
I am at the office right now and will update the package. I will give a update when I did a test run!
Really appreciate the effort you put into updating this Nuget!
Update
The button does crash with the following :
04-06 08:23:36.181 I/MonoDroid( 4059): System.MissingMethodException: Method 'Android.Support.Design.Widget.FloatingActionButton.SetRippleColor' not found.
This has been reported if I am correct :) I will refrain from setting the Ripple Color for now.
Update 2
I have downloaded https://github.com/MarcorOnline/Xamarin.Plugin.FAB and build his solution + created .dll files . Removed the Android FAB.Forms and FAB.Android and added the new .dlls as reference.
In case someone else needs these and does not know how to make the dll's here a link:
https://ufile.io/11e381
Luuk
add the Dll solution work for me ,thanks LukasThijs :)
You are welcome :) I wish I could help supporting this component, but sadly have a important deadline to meet.
Perfekt work, for me the same now everything working :)
@LukasThijs Can you send to me the dlls?
hi everybody, i have used floating action button in my code snippet. but null exception occur when floating button click for call to web api in xamarin forms. please let me know,how to resolve this issue?