Stack overflow when clicked on the Themes tab in the Editor

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
C282304
Newbie
Newbie
Posts: 6
Joined: Thu Aug 03, 2006 12:00 am

Stack overflow when clicked on the Themes tab in the Editor

Post by C282304 » Wed Mar 04, 2009 5:04 pm

I am using the ShowEditor method to display the chart settings at run time. When I click on the Themes tab I get the stack overflow exception. I also get index out of bounds when I click on the Series tab but it continues.

The best I can tell is that it is trying to serialize my business objects and getting in some kind of cicular referencing. I am using datasets for the series. I have marked all the public properties of my business objects with attribute [XmlIgnore].

When I put breakpoints in these property getter I still see that it is being called. I just want to disable this serialization.

It shows run time version v1.1.4322 and version 2.0.2546.16098 and it is a TCHart for .NET 2.0 with VS2005.

Any idea what is the cause and how to fix it?

Thanks in advance

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Post by Sandra » Thu Mar 05, 2009 9:40 am

Hi C282304,

We couldn't reproduce your problem here. We recommend that install new version, check your problem that is solved,we could say if your version works correctly or not


Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

C282304
Newbie
Newbie
Posts: 6
Joined: Thu Aug 03, 2006 12:00 am

still a problem after update

Post by C282304 » Thu Mar 05, 2009 4:46 pm

I did update the version to 2.0.3309.32489. But the problem still exists.

Here is another behavior that may give you a clue that something is wrong with my series. May be you can isolate it
I have a Series class inheriting from FastLine.

In the dialog box that shows up as a result of calling ShowEditor() I see my series ( 2nd level ) Under Chart tab ( 1st level ). I can enable and disable it and the chart updates immediately.

But Under the Series tab ( 1st level ) I get Index out of range exception in the method ShowSeriesForm(). It then continues but the Format tab ( 2nd level ) is empty.

Thanks

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Post by Sandra » Fri Mar 06, 2009 11:05 am

Hi C282304,

I think that your problem is produced, because you doesn't have editor difined for your custom series an is necessary to define an editor. You can find solution here, specifically you see post of 14 of September and exactly example for RegisterSeries.

But to be able to do this, you need version 3 of TeeChartForNet, because in version 2 aren't possible do this solution.
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

C282304
Newbie
Newbie
Posts: 6
Joined: Thu Aug 03, 2006 12:00 am

Post by C282304 » Fri Mar 06, 2009 3:18 pm

Thanks for the help.

Version 3 requires .NET 3.0, is that right? If so we have no plans to upgrade to .NET 3.0 until later in the year.

In the earlier post your support person has suggested changing the source code for version 2. Is there any way we can get that done? Either you can build it for us or how do we get the source code?

Also can you point me to good examples of the code where you can inherit from one of the seriers specifically Fast line?

Thanks again for the help.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Mar 06, 2009 3:36 pm

Hi C282304,
Version 3 requires .NET 3.0, is that right? If so we have no plans to upgrade to .NET 3.0 until later in the year.
No, TeeChart for .NET v3 also runs with Microsoft .NET Framework v1.1 and v2.0.
In the earlier post your support person has suggested changing the source code for version 2. Is there any way we can get that done? Either you can build it for us or how do we get the source code?
We don't use to make custom features for clients unless they make into production releases of TeeChart. However you may get TeeChart for .NET sourcecode as an option. You should contact our Sales Dept. at sales at steema dot com for that.
Also can you point me to good examples of the code where you can inherit from one of the seriers specifically Fast line?
There's an interesting example of custom series in the thread Sandra pointed you:

http://www.teechart.net/support/viewtopic.php?t=6590

I also recommend you to read the thread below about the options and improvements TeeChart for .NET v3 offers in terms of creating custom series.

http://www.teechart.net/support/viewtopic.php?t=7019

I can't think of an exampe using FastLine series now but two interesting examples are also available here:

http://www.teechart.net/support/viewtopic.php?t=4309
http://www.teechart.net/support/viewtopic.php?t=4110

Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

C282304
Newbie
Newbie
Posts: 6
Joined: Thu Aug 03, 2006 12:00 am

Post by C282304 » Fri Mar 06, 2009 5:06 pm

Thanks a lot for your prompt help. I upgraded to V3 and use the register service call as mentioned in the article. That solved my out bounds error in the Series tab in the chart editor.

I am still having problem with the Themes tab though.

I went and removed as much as possible - all my public properties that used my business objects. This made - the stack overflow reported in the original post go away. But now I am getting this error when clicking on the themes tab

Type : System.Reflection.TargetInvocationException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Exception has been thrown by the target of an invocation.
Source : mscorlib
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void _SerializationInvoke(System.Object, System.SignatureStruct ByRef, System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
Stack Trace : at System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.RuntimeMethodHandle.SerializationInvoke(Object target, SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, 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 System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
at Steema.TeeChart.Import.TemplateImport.Load(Stream stream)
at Steema.TeeChart.Import.Imports.InternalLoadViewState(MemoryStream savedState, Chart& chart)
at Steema.TeeChart.Import.ThemeImport.Load(Stream stream)
at Steema.TeeChart.Chart.Clone()
at Steema.TeeChart.Editors.ThemeEditor.InitializeThemePainter()
at Steema.TeeChart.Editors.ThemeEditor..ctor(Chart c, Control p)
at Steema.TeeChart.Editors.ChartEditor.tabControl1_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.TabControl.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.TabControl.WmSelChange()
at System.Windows.Forms.TabControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Can you point to some thing in the custome Serie missing?

Thanks

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Mar 09, 2009 8:11 am

Hi C282304,

The only thing I can think of for now is custom series serialization issue as described in the thread below. Notice it is 2 page long.

http://www.teechart.net/support/viewtopic.php?t=7019

For more information about this issue please read Tutorial 19 - Custom Serialization. Tutorials can be found at TeeChart's program group.

If this doesn't help please send us a simple example project we can run "as-is" to reproduce the problem here. You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

C282304
Newbie
Newbie
Posts: 6
Joined: Thu Aug 03, 2006 12:00 am

Post by C282304 » Mon Mar 09, 2009 8:36 pm

I am going to look into how to serialize my custome series.

Is there a way to disable the themes tab in the Chart Editor through code?

Thanks

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Mar 10, 2009 8:14 am

Hi C282304,

Yes, you can do it as shown in the All Features\Welcome !\Components\ChartController\ChartController Editor example at the features demo, available at TeeChart's program group.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

C282304
Newbie
Newbie
Posts: 6
Joined: Thu Aug 03, 2006 12:00 am

Post by C282304 » Tue Mar 10, 2009 2:37 pm

Thanks for all the help. For now I am going to disable the themes tab.
So this issue can be considered closed.

Going forward it seems the serialization code could use some improvement. If the inherited class does not want to be serialized or some objects inside the inherited series class want to be ignored then that should be allowed.

Thanks again.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Mar 11, 2009 11:30 am

Hi C282304,

Ok, I've added your request to the wish-list to be considered for inclusion in future releases.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply