SubChart problem in latest release

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
dimitrig
Newbie
Newbie
Posts: 17
Joined: Wed Jul 18, 2007 12:00 am
Location: Belgium
Contact:

SubChart problem in latest release

Post by dimitrig » Fri Nov 06, 2009 1:43 pm

I installed the latest version of TeeChart v3 recently (3.5.3575.14456). Since then I have an exception in my application, from the moment I use a SubChart and the size needs to be adapted.

In our application, we use a subchart that is always positioned on the right side next to our main chart, which is used as a coloring legend. As shown in this screenshot of one of my test programs:
moz-screenshot-13.jpg
Screenshot of usage
moz-screenshot-13.jpg (27.55 KiB) Viewed 8107 times
The right coloring legend is using a subchart with a horizontalbar in it. Whenever the main chart resizes, the position and size of the coloring legend is also adapted. Since the new version, whenever I change the size of the main chart, the program throws an exception which is coming from deep down in your drawing routines.

I've attached some simplified sample code that mimics the problem. You just have to add the form to a visual studio solution and run it. The form contains a subchart, with the code to adapt the position and size.
Form1.zip
Source code to reproduce the problem
(5.94 KiB) Downloaded 536 times
This is the exception that is generated upon resize:

Code: Select all

System.ArgumentException was unhandled
  Message="Parameter is not valid."
  Source="System.Drawing"
  StackTrace:
       at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
       at System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y, Int32 width, Int32 height)
       at System.Drawing.Graphics.FillRectangle(Brush brush, Rectangle rect)
       at Steema.TeeChart.Drawing.Graphics3DGdiPlus.Rectangle(Rectangle r)
       at Steema.TeeChart.Walls.BackWall.Paint(Graphics3D g, Rectangle rect)
       at Steema.TeeChart.Walls.Paint(Graphics3D g, Rectangle r)
       at Steema.TeeChart.Chart.InternalDraw(Graphics g, Boolean noTools)
       at Steema.TeeChart.Chart.InternalDraw(Graphics g)
       at Steema.TeeChart.TChart.Draw(Graphics g)
       at Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
       at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
       at System.Windows.Forms.Control.WmPaint(Message& m)
       at System.Windows.Forms.Control.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
       at System.Windows.Forms.Form.DefWndProc(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmSysCommand(Message& m)
       at System.Windows.Forms.Form.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
       at System.Windows.Forms.Form.DefWndProc(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmNcButtonDown(Message& m)
       at System.Windows.Forms.Form.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at WindowsApplication1.Program.Main() in C:\Documents and Settings\dimitrig\My Documents\Visual Studio 2005\Projects\WindowsApplication1\WindowsApplication1\Program.cs:line 17
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
Can you please let me know what is causing this problem in your new version?

thanks

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: SubChart problem in latest release

Post by Yeray » Fri Nov 06, 2009 2:42 pm

Hi dimitrig,

I suppose you already know about LegendPalette Tool and you need more control than what this tool offers you and that's why you are using SubChart Tool to draw a legend.

I'm afraid I couldn't reproduce your problem. Could you please send us a simple but complete solution we can run as-is to reproduce the problem here?

Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

dimitrig
Newbie
Newbie
Posts: 17
Joined: Wed Jul 18, 2007 12:00 am
Location: Belgium
Contact:

Re: SubChart problem in latest release

Post by dimitrig » Wed Dec 23, 2009 3:32 pm

Hi,

Indeed. I know of the LegendPalette, but we need more flexibility, so that's why I developed a custom legend around a subchart.

I tried the latest version of TeeChart now, and the problem is still in there. The main source code was already in my first post. I uploaded a complete copy with solution and build output now to my webspace: http://users.edpnet.be/avathar/NMDG/Win ... ation1.zip.

There are problems in the SubChart of TeeChart now for a couple of months. I first reported a similar problem with the SubChart in June, and since then we cannot use any recent TeeChart release of v3 because of this exception (ticket TF02014293 was generated when first reporting problems). Back then, the problem was also in the v2009 release.

regards

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

Re: SubChart problem in latest release

Post by Narcís » Wed Dec 23, 2009 4:06 pm

Hi dimitrig,

I'm not able to reproduce the problem using your project and latest TeeChart for .NET v3 update build (9th December 2009) available at the client area nor using latest v2009 release. It also works fine using the *.exe in your zip package. Can you please confirm you are using the 9th December build and if we should perform any additional step, besides running the project, to reproduce the issue?

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

dimitrig
Newbie
Newbie
Posts: 17
Joined: Wed Jul 18, 2007 12:00 am
Location: Belgium
Contact:

Re: SubChart problem in latest release

Post by dimitrig » Fri Mar 05, 2010 6:58 pm

Hi,

Yeah... I even went to the latest version v3 version now (3.5.3700.30575). Every time I run this app, then just maximize the form, I get the exception.

You should be able to just see it when you run the WindowsApplication1.exe in the bin\Debug folder (I uploaded a new version with more recent TeeChart version). Still downloadable from http://users.edpnet.be/avathar/NMDG/Win ... ation1.zip.

I don't know whether it is related to machine etc. I run it on Windows XP SP3 32-bit, with .NET framework 2.0 SP2. The machine is an Intel Core 2 Duo. I will try to run it once on some other machines here to see if I can find a correlation or not.

Btw... I recently posted another topic (http://www.teechart.net/support/viewtop ... =4&t=10840). You guys suggested to me to set the BufferStyle to DoubleBuffer. When I do this to this app as well, the problem is also gone here. However, I do not want to do this since that's a performance killer.

kind regards,
Dimitri

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

Re: SubChart problem in latest release

Post by Narcís » Tue Mar 09, 2010 5:50 pm

Hi Dimitri,

Thanks for the example project. I have been able to reprodudce the issue here using both v3 and v2009 and added it to the defect list (TF02014723) to be fixed for 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