Comments (11)
In version 1.1.0 I removed 'the async stuff'. Thanks for helping me find this problem ;)
Unfortunately I do not always have time to work on this project, sorry for the late response.
from xamforms.controls.calendar.
Could you try version 1.0.8 to see if the problem is still there?
It is weird because get_DatesFontSize
is a double and has a default value and therefore can not be null.
from xamforms.controls.calendar.
@rebeccaXam Thank you so much, no crashes so far! :)
I'll keep an eye on it, and should know for certain within a day or so.
from xamforms.controls.calendar.
Still getting this, unfortunately. From what I can tell, it doesn't seem to occur nearly as often now though.
from xamforms.controls.calendar.
In the calendar control codebase, for filling calendar control, below code is used:
if (Device.OS == TargetPlatform.Windows || Device.OS == TargetPlatform.WinPhone)
{
FillCalendarWindows();
}
else
{
// iOS and Android can create controls on another thread when they are not attached to the main ui yet,
// windows can not
await FillCalendar();
}
protected Task FillCalendar()
{
return Task.Factory.StartNew(() =>
{
FillCalendarWindows();
});
}
What i have observed is, while executing the statement, return Task.Factory.StartNew(() =>
{
FillCalendarWindows();
});
calendar control is crashing randomly.
So, in the first statement, irrespective of platform if we call FillCalendarWindows();(Skipping FillCalendar() method call) is fixing the issue. But I do not know whether it is the right fix for the issue or not.
from xamforms.controls.calendar.
Looks like this is now happening in a production application (on a device) too. :(
from xamforms.controls.calendar.
Slightly different crash, but still a null binding issue:
Application Specific Information:
*** Terminating app due to uncaught exception 'System.NullReferenceException', reason: 'System.NullReferenceException: Object reference not set to an instance of an object'
Xamarin Exception Stack:
at Xamarin.Forms.BindableObject.GetContext (Xamarin.Forms.BindableProperty property) <0x100302e90 + 0x0003c> in <59b03de64f0e485e8c9d8ead0b747e17#2fefd57775e65d7a0dcd9cef89ef65e0>:0
at Xamarin.Forms.BindableObject.GetValue (Xamarin.Forms.BindableProperty property) <0x100301540 + 0x0002f> in <59b03de64f0e485e8c9d8ead0b747e17#2fefd57775e65d7a0dcd9cef89ef65e0>:0
at XamForms.Controls.Calendar.get_WeekdaysTextColor () <0x100e63b10 + 0x00027> in <5c64a4f9c5354185bb66037f727faf04#2fefd57775e65d7a0dcd9cef89ef65e0>:0
at XamForms.Controls.Calendar.ShowHideElements () <0x100e66fc0 + 0x007b3> in <5c64a4f9c5354185bb66037f727faf04#2fefd57775e65d7a0dcd9cef89ef65e0>:0
at XamForms.Controls.Calendar.FillCalendarWindows () <0x100e60ad0 + 0x00023> in <5c64a4f9c5354185bb66037f727faf04#2fefd57775e65d7a0dcd9cef89ef65e0>:0
at XamForms.Controls.Calendar.<FillCalendar>m__3 () <0x100e6f770 + 0x00013> in <5c64a4f9c5354185bb66037f727faf04#2fefd57775e65d7a0dcd9cef89ef65e0>:0
at System.Threading.Tasks.Task.InnerInvoke () <0x10059af10 + 0x0005f> in <54e129cad3ee4c61a6b46c3680ddc69a#2fefd57775e65d7a0dcd9cef89ef65e0>:0
at System.Threading.Tasks.Task.Execute () <0x10059a740 + 0x00043> in <54e129cad3ee4c61a6b46c3680ddc69a#2fefd57775e65d7a0dcd9cef89ef65e0>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x10052f020 + 0x00028> in <54e129cad3ee4c61a6b46c3680ddc69a#2fefd57775e65d7a0dcd9cef89ef65e0>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x10052e4c0 + 0x000d3> in <54e129cad3ee4c61a6b46c3680ddc69a#2fefd57775e65d7a0dcd9cef89ef65e0>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10052e410 + 0x0008b> in <54e129cad3ee4c61a6b46c3680ddc69a#2fefd57775e65d7a0dcd9cef89ef65e0>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x10052e3b0 + 0x00047> in <54e129cad3ee4c61a6b46c3680ddc69a#2fefd57775e65d7a0dcd9cef89ef65e0>:0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () <0x10052e380 + 0x00017> in <54e129cad3ee4c61a6b46c3680ddc69a#2fefd57775e65d7a0dcd9cef89ef65e0>:0
at XamForms.Controls.Calendar+<OnParentSet>c__async0.MoveNext () <0x100e771a0 + 0x0017f> in <5c64a4f9c5354185bb66037f727faf04#2fefd57775e65d7a0dcd9cef89ef65e0>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x10052f020 + 0x00028> in <54e129cad3ee4c61a6b46c3680ddc69a#2fefd57775e65d7a0dcd9cef89ef65e0>:0
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>m__0 (System.Object state) <0x10052dad0 + 0x0004f> in <54e129cad3ee4c61a6b46c3680ddc69a#2fefd57775e65d7a0dcd9cef89ef65e0>:0
at UIKit.UIKitSynchronizationContext+<Post>c__AnonStorey0.<>m__0 () <0x100c71b10 + 0x00027> in <cc077ba5ca594b7b8b31455dce914ca4#2fefd57775e65d7a0dcd9cef89ef65e0>:0
at Foundation.NSAsyncActionDispatcher.Apply () <0x100c5e5b0 + 0x00023> in <cc077ba5ca594b7b8b31455dce914ca4#2fefd57775e65d7a0dcd9cef89ef65e0>:0
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) <0x100c6ad10 + 0x0002b> in <cc077ba5ca594b7b8b31455dce914ca4#2fefd57775e65d7a0dcd9cef89ef65e0>:0
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) <0x100c6ac50 + 0x000ab> in <cc077ba5ca594b7b8b31455dce914ca4#2fefd57775e65d7a0dcd9cef89ef65e0>:0
at App.iOS.Application.Main (System.String[] args) <0x1002a4330 + 0x00023> in <b1362e227fb24e00a3c402c3f854ba58#2fefd57775e65d7a0dcd9cef89ef65e0>:0
from xamforms.controls.calendar.
@rebeccaXam This is also happening on Android, and getting more frequent for some reason.
Here's an Android specific exception:
Xamarin caused by: android.runtime.JavaProxyThrowable: System.NullReferenceException: Object reference not set to an instance of an object.
at Xamarin.Forms.BindableObject.GetContext (Xamarin.Forms.BindableProperty property) [0x00013] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:489
at Xamarin.Forms.BindableObject.GetValue (Xamarin.Forms.BindableProperty property) [0x0000e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:54
at XamForms.Controls.Calendar.get_DatesFontAttributes () [0x00000] in <5c64a4f9c5354185bb66037f727faf04>:0
at XamForms.Controls.Calendar.CreateButtons () [0x001ac] in <5c64a4f9c5354185bb66037f727faf04>:0
at XamForms.Controls.Calendar.FillCalendarWindows () [0x00006] in <5c64a4f9c5354185bb66037f727faf04>:0
at XamForms.Controls.Calendar.<FillCalendar>m__3 () [0x00000] in <5c64a4f9c5354185bb66037f727faf04>:0
at System.Threading.Tasks.Task.InnerInvoke () [0x00012] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/threading/Tasks/Task.cs:2879
at System.Threading.Tasks.Task.Execute () [0x00016] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/threading/Tasks/Task.cs:2502
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113
at XamForms.Controls.Calendar+<OnParentSet>c__async0.MoveNext () [0x0008b] in <5c64a4f9c5354185bb66037f727faf04>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>m__0 (System.Object state) [0x00000] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018
at Android.App.SyncContext+<Post>c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/4009/9578cdcd/source/xamarin-android/src/Mono.Android/Android.App/SyncContext.cs:35
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-24/src/generated/Java.Lang.IRunnable.cs:81
at (wrapper dynamic-method) System.Object:5ce9d441-22be-4d66-a7da-c83cd4ebbf94 (intptr,intptr)
at mono.java.lang.RunnableImplementor.n_run(Native Method)
at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
from xamforms.controls.calendar.
@rebeccaXam Sorry to keep pinging you, but the crashing at startup is getting out of hand at the moment. :(
from xamforms.controls.calendar.
@rebeccaXam The fix by @pradeeparutla works 100%. Simply get rid of the async stuff for FillCalendar() and it works.
from xamforms.controls.calendar.
Thank you. :)
from xamforms.controls.calendar.
Related Issues (20)
- Disable SelectedDate in Calendar after reusing the control HOT 2
- Null Reference Exception on ElementPropertyChanged HOT 6
- Xamarin Forms iOS a imagem das datas especiais não aparecem HOT 1
- Repository moved - help needed ❗️
- Importing firebase data into the Special Date parameter
- WhenChanging Month App Crashing
- WhenChanging Month App Crashing
- WhenChanging Month App Crashing
- WhenChanging Month App Crashing HOT 6
- Disabled HOT 1
- Additional properties for Calendar selection HOT 1
- BackgroundPattern doesn't work on UWP HOT 2
- iOS App crashes after update HOT 6
- iOS AutomationID
- Xamarin.forms.calendar
- Writing UI test cases for date selection in Xamforms.Calendar
- How refresh Calendar (Just Special Dates) HOT 3
- uppercase text HOT 3
- Special Date Text Turkish Character Problem
- iOS crash with Xamarin Forms 4.0 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xamforms.controls.calendar.