Page 1 of 2

Import fail.

Posted: Wed Jun 22, 2011 8:27 am
by 13050783
We use Web Chart. The version of TeeChart.dll is 3.5.3225.32185.
We made a custom series which derived from Points class.
We tried to export template and import that again. And we got this exception:

Exception has been thrown by the target of an invocation.
Stack infomation: at System.RuntimeMethodHandle._SerializationInvoke(IRuntimeMethodInfo method, Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at Steema.TeeChart.Import.TemplateImport.Load(Stream stream)
Object reference not set to an instance of an object.
Stack infomation: at Steema.TeeChart.Import.Imports.InternalFindType(String typeName, Assembly a)
at Steema.TeeChart.Import.Imports.FindType(String typeName)
at Steema.TeeChart.Import.Imports.DeserializeFrom(SerializationInfo info, StreamingContext context)
at Steema.TeeChart.Chart..ctor(SerializationInfo info, StreamingContext context)

We think this should be a bug of our version. Could you tell us how to solve this problem? We are very urgent with this problem.

Re: Import fail.

Posted: Wed Jun 22, 2011 8:34 am
by narcis
Hi mks-ydi,

You should serialize/deserialize custom series as explained on this thread.

Hope this helps!

Re: Import fail.

Posted: Wed Jun 22, 2011 9:09 am
by 13050783
Thank you for your explain. But our problem is different. Our exception is "Object reference not set to an instance of an object." which throwed from "Steema.TeeChart.Import.Imports.InternalFindType(String typeName, Assembly a)".

Re: Import fail.

Posted: Wed Jun 22, 2011 9:13 am
by narcis
Hi mks-ydi,

Can you reproduce this using a standard TeeChart series instead of a custom series? Can you reproduce it using latest TeeChart for .NET v3 release available at the client download area? If the problem persists, can you please attach a simple example project we can run "as-is" to reproduce the problem here?

Thanks in advance.

Re: Import fail.

Posted: Wed Jun 22, 2011 9:19 am
by 13050783
Hi Narcís

This problem only happen when we use custom series. Is the latest version "TeeChartNET3UpdateBuild.exe"?

Thanks
mks-ydi

Re: Import fail.

Posted: Wed Jun 22, 2011 9:30 am
by narcis
Hi mks-ydi,
Is the latest version "TeeChartNET3UpdateBuild.exe"?
In your first post you said:
We use Web Chart. The version of TeeChart.dll is 3.5.3225.32185.
That's not the last version available, which is build 3.5.3700.30574/5 from 17th February 2010 and the installer is called TeeChartNET3UpdateBuild.exe as you already suggested.

A fix for non-functional custom serialization/deserialization was implemented in build 3.2.2930.22967/8 from January 2008, as you can see at the version info page, which is a newer version than the one you are using.

Could you please check if build 3.5.3700.30574/5 from February 2010 solves the problem at your end?

Thanks in advance.

Re: Import fail.

Posted: Wed Jun 22, 2011 9:38 am
by 13050783
Hi Narcís

I have tried TeeChart.dll 3.5.3700.30575. The problem is still there. I made a sample

Thanks
mks-ydi

Re: Import fail.

Posted: Wed Jun 22, 2011 9:43 am
by 13050783
Hi Narcís

I put sample project on attachment of last POST. Hoping your solution.

Thanks
mks-ydi

Re: Import fail.

Posted: Wed Jun 22, 2011 9:54 am
by narcis
Hi mks-ydi,

I'm afraid the attachment didn't get through. Please try submitting it again and check that the forums board doesn't give any error message when doing so. Please notice that "bin" and "obj" folders are not necessary, just "Properties" folder. Alternatively you can post your files at http://www.steema.net/upload/.

Thanks in advance.

Re: Import fail.

Posted: Wed Jun 22, 2011 9:57 am
by 13050783
Hi Narcis

I'm sorry I did notice message. I put project on attachment again.

Thanks
mks-ydi

Re: Import fail.

Posted: Wed Jun 22, 2011 10:38 am
by narcis
Hi mks-ydi,

Thanks for the project. I could reproduce the issue here and we are investigating it. I'll get back to you when we have further news. I have checked that this works fine in WinForms applications:

Code: Select all

	public class CustomSeries : Steema.TeeChart.Styles.Points
	{
		public CustomSeries() : this(null) { }
		public CustomSeries(Steema.TeeChart.Chart c)
		  : base(c)
		{

		}
	}
	public partial class Form1 : Form
	{
	  public Form1()
	  {
		InitializeComponent();
		InitializeChart();
	  }

	  private void InitializeChart()
	  {
		tChart1.Series.Add(new CustomSeries()).FillSampleValues();

		System.IO.MemoryStream msTemplate = new System.IO.MemoryStream();
		tChart1.Export.Template.Save(msTemplate);

		msTemplate.Position = 0;
		tChart1.Import.Template.Load(msTemplate);
	  }
	}

Re: Import fail.

Posted: Wed Jun 22, 2011 11:31 am
by narcis
Hi mks-ydi,

After investigating the issue here we think this is a WebChart bug which I have added to the defect list (TF020156259) to be fixed for future releases.

Re: Import fail.

Posted: Thu Jun 23, 2011 1:13 am
by 13050783
Hi Narcís

Thank you Narcís. When would you release next version?

Thanks
mks-ydi

Re: Import fail.

Posted: Thu Jun 23, 2011 7:19 am
by narcis
Hi mks-ydi,

A maintenance release will be published imminently but a fix to this issue won't make into it. Maintenance versions are usually published in a 6-8 week fashion. I recommend you to be aware at this forum, our RSS news feed, twitter and facebook accounts for new release announcements and what's implemented on them.

Re: Import fail.

Posted: Thu Jun 23, 2011 7:32 am
by 13050783
Hi Narcís

We have found a way to slove our problem. It seems we don't need worry about this bug now. Thank you for your help.

Thanks
mks-ydi