Page 1 of 2
System.ArgumentNullException Value cannot be null. Parameter name: type
Posted: Mon Jan 11, 2021 6:18 pm
by 18286055
With
Xamarin.Forms Version 5.0.0.1874, Version 4.8.0.1821, Version 4.8.0.1687 and Version 4.8.0.1560, graphs break on both Android and iOS. it displays if you catch the exceptions but does not render correctly: popup annotations are broken and don't show, pinch and zoom is gone, etc.
I have not tested versions prior to Version 4.8.0.1560.
Previous Related Issue
Re: System.ArgumentNullException Value cannot be null. Parameter name: type
Posted: Tue Jan 12, 2021 5:14 pm
by Pep
Hello,
it seems that is working fine here. Do you have a simple example to reproduce it ?
Anyway, just tell to you, that we're going to upload a new nuget version package before the end of this week (compiled with the latest Xamarin.Forms version).
Re: System.ArgumentNullException Value cannot be null. Parameter name: type
Posted: Mon Jan 25, 2021 5:13 pm
by 18286055
just updated nugets and both exceptions still occur.
Re: System.ArgumentNullException Value cannot be null. Parameter name: type
Posted: Mon Jan 25, 2021 5:24 pm
by 18286055
Steema.TeeChart.Tools.NearestPoint.Point doesn't seem to be updating when the
NearestPoint.Change event occurs.
Also, it would be very helpful if the new point/index can be passed via the event args in the EventHandler, such as:
Code: Select all
public class NearestPointEventArgs : EventArgs
{
public int Point { get; set; }
public NearestPointEventArgs() { }
public NearestPointEventArgs( int point )
{
Point = point;
}
}
Then the updated NearestPoint class would be:
Code: Select all
public class NearestPoint : ToolSeries
{
...
public event EventHandler<NearestPointEventArgs> Change;
...
}
Re: System.ArgumentNullException Value cannot be null. Parameter name: type
Posted: Mon Jan 25, 2021 6:12 pm
by Pep
Hello,
just updated nugets and both exceptions still occur.
We did some tests with the latest Xamarin.Forms version available and it seems that comes with a problem that might be related to the one that you writen here, so we decided to wait for the next Xamarin.Forms stable version in order to compile against this one.
About the nearest point question.
Have you looked at the following nearest point tool example ?
https://github.com/Steema/teechart-xama ... tPointTool
Re: System.ArgumentNullException Value cannot be null. Parameter name: type
Posted: Mon Jan 25, 2021 9:20 pm
by 18286055
yes, I checked out the nearest point tool example. I stepped through with visual studio's debugger; it's not being updated.
They just released Xamarin.Forms v5.0.0.1931, the issue still occurs
Re: System.ArgumentNullException Value cannot be null. Parameter name: type
Posted: Wed Jan 27, 2021 7:19 pm
by Pep
Hello,
yes, you're correct. I'm able to reproduce the problem here by using the latest TeeChart for Xamarin.Forms version published.
The problem appeared since the 4.2020.9.28 version.
In order to make it work until we fix the problem ,you'd have to use the 4.2020.5.28 version.
I've already added this as an important bug here :
bug 2400
We'll try to fix it as sson as possible and upload a new nuget version.
We'll also consider your apportation to add this as a new functionality for the NearestPontTool. Thank you.
Re: System.ArgumentNullException Value cannot be null. Parameter name: type
Posted: Wed Jan 27, 2021 9:26 pm
by 18286055
Thank you for you time.
Re: System.ArgumentNullException Value cannot be null. Parameter name: type
Posted: Thu Jan 28, 2021 4:08 pm
by 18286055
Using 4.2020.5.28, the NearestPoint tool is working again. but the exceptions still occur from above.
Re: System.ArgumentNullException Value cannot be null. Parameter name: type
Posted: Thu Feb 04, 2021 11:32 am
by Pep
Yes, the exception seems to be related with Xamarin.Forms v5. Not sure if it also happens to you with older Xamarin.Forms version.
Re: System.ArgumentNullException Value cannot be null. Parameter name: type
Posted: Fri Feb 19, 2021 3:23 pm
by Pep
Hello,
just inform to you that a new TeeChart for Xamarin.Forms Nuget version has been published, this one compiled with the latest Xamarin.Forms stable version and also includes fixes for NearestPointTool change event and also the feature you commented.
Nuget version
Thanks.
Re: System.ArgumentNullException Value cannot be null. Parameter name: type
Posted: Mon Feb 22, 2021 9:35 pm
by 18286055
I now get a
System.InvalidCastException: 'Specified cast is not valid.' error when I touch the graph.
Code: Select all
02-22 15:17:06.607 E/AppCenterCrashes(20449): Unhandled Exception from source=AndroidEnvironment
System.InvalidCastException: Specified cast is not valid.
at Steema.TeeChart.Tools.NearestPoint.MouseEvent (Steema.TeeChart.MouseEventKinds kind, Steema.TeeChart.Drawing.MouseEventArgs e, Steema.TeeChart.Drawing.Cursor& c) [0x0005b] in <f7c2f20fd8914905b8e049dc591c50a8>:0
at Steema.TeeChart.Chart.BroadcastMouseEvent (Steema.TeeChart.MouseEventKinds kind, Steema.TeeChart.Drawing.MouseEventArgs e, Steema.TeeChart.Drawing.Cursor& c) [0x00023] in <f7c2f20fd8914905b8e049dc591c50a8>:0
at Steema.TeeChart.TChart.OnMouseMove (Android.Views.MotionEvent e) [0x00089] in <4db77ad85a1749be9de93ae5cb78efb5>:0
at Steema.TeeChart.TChart.OnTouchEvent (Android.Views.MotionEvent e) [0x008bd] in <4db77ad85a1749be9de93ae5cb78efb5>:0
at Android.Views.View.n_OnTouchEvent_Landroid_view_MotionEvent_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_e) [0x0000f] in <b24a608f3e284c3e8fda498590205f05>:0
at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.59(intptr,intptr,intptr)
**System.InvalidCastException:** 'Specified cast is not valid.'
Visual Studio v16.8.6
Xamarin.Forms v5.0.0.2012
Steema.TeeChart.NET.Xamarin.Forms v4.2021.2.18
Xamarin.Android SDK 11.1.0.26
Xamarin.iOS SDK 14.10.0.4
Note: My phone was updated to Android 11, so the app must be compiled against Android 11 in order to debug.
Re: System.ArgumentNullException Value cannot be null. Parameter name: type
Posted: Mon Feb 22, 2021 9:41 pm
by 18286055
Also, the previous exceptions still over on page creation.
- Capture.PNG (67.1 KiB) Viewed 59052 times
Re: System.ArgumentNullException Value cannot be null. Parameter name: type
Posted: Thu Feb 25, 2021 2:27 pm
by Pep
Hello,
**System.InvalidCastException:** 'Specified cast is not valid.'
Yes, you're correct, it was a bug which we've already fixed it.
We've just upload a new nuget version that includes the fix.
Also, the previous exceptions still over on page creation.
About this page problem I cannot reproduce the problem here using the latest versions of TeeChart for Xamarin.Forms and Xamarin.Forms.
Please, check if the problem also happens in a new clean project.
Re: System.ArgumentNullException Value cannot be null. Parameter name: type
Posted: Wed Mar 24, 2021 6:52 pm
by 18286055
Pep wrote: ↑Thu Feb 25, 2021 2:27 pm
Hello,
**System.InvalidCastException:** 'Specified cast is not valid.'
Yes, you're correct, it was a bug which we've already fixed it.
We've just upload a new nuget version that includes the fix.
Also, the previous exceptions still over on page creation.
About this page problem I cannot reproduce the problem here using the latest versions of TeeChart for Xamarin.Forms and Xamarin.Forms.
Please, check if the problem also happens in a new clean project.
What I meant by "Also, the previous exceptions still over on page creation." is that the System.InvalidCastException still occurs on version 4.2021.2.25.