Scrolling inverted legend positioned on top crashes

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
tsy@omp.com
Newbie
Newbie
Posts: 2
Joined: Mon May 31, 2021 12:00 am

Scrolling inverted legend positioned on top crashes

Post by tsy@omp.com » Fri Jun 27, 2025 1:44 pm

Hi,

We are using TeeChart of 4.2020.5.25 version, but the same problem is also reproducible on 2015 version and more recent one, used in TeeChartOffice demonstration executable.

To reproduce the crash:
- Set the legend position to Top or Bottom;
- Make it Inverted;
- Add Legend Scrollbar tool;
- Add enought data to see the scrollbar. The more the better (the slider should take less than half of available spaced).
- Scroll to the right until crash occurs.

We also noticed that when legend is inverted, scrolling step is doubles - slider is moved by legend items instead of 1.

Here is the call stack:
TeeChart.dll!Steema.TeeChart.Legend.DrawLegendItem(int ItemIndex, int ItemOrder) Unknown
> TeeChart.dll!Steema.TeeChart.Legend.DrawItems() Unknown
TeeChart.dll!Steema.TeeChart.Legend.Paint(Steema.TeeChart.Drawing.Graphics3D g, System.Drawing.Rectangle rect, bool doDraw, bool doCalc) Unknown
TeeChart.dll!Steema.TeeChart.Chart.DoDrawLegend(ref System.Drawing.Rectangle tmp, bool doDraw, bool doCalc) Unknown
TeeChart.dll!Steema.TeeChart.Chart.DrawTitlesAndLegend(System.Drawing.Graphics g, ref System.Drawing.Rectangle tmp, bool BeforeSeries) Unknown
TeeChart.dll!Steema.TeeChart.Chart.InternalDraw(System.Drawing.Graphics g, bool noTools) Unknown
TeeChart.dll!Steema.TeeChart.TChart.Draw(System.Drawing.Graphics g) Unknown
TeeChart.dll!Steema.TeeChart.TChart.OnPaint(System.Windows.Forms.PaintEventArgs pe) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.PaintWithErrorHandling(System.Windows.Forms.PaintEventArgs e, short layer) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.WmPaint(ref System.Windows.Forms.Message m) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) Unknown
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) Unknown
Last edited by tsy@omp.com on Fri Jun 27, 2025 1:53 pm, edited 1 time in total.

tsy@omp.com
Newbie
Newbie
Posts: 2
Joined: Mon May 31, 2021 12:00 am

Re: Scrolling inverted legend positioned on top crashes

Post by tsy@omp.com » Fri Jun 27, 2025 1:50 pm

I attached the project file of everything preconfigured. To reproduce a crash, simply drag the scrollbar slider to the right.

Is there any workaround possible to avoid it? The ones I found are:
- Switch-off the legend inversion;
- Place the legend right or left.
But our customer isn't pleased with such suggestion and wants a permanent fix.

Maybe I can set some properties to implicitly avoid the exception without changing the functional behavior?

Thanks,
Taras
Attachments
CrashExample.zip
(1.54 KiB) Not downloaded yet

Rubén
Newbie
Newbie
Posts: 21
Joined: Fri Nov 19, 2010 12:00 am

Re: Scrolling inverted legend positioned on top crashes

Post by Rubén » Fri Jun 27, 2025 3:11 pm

Hi Taras,

Thank you for your detailed report and the example provided.

Our team is currently investigating the issue, and we will provide you with an update as soon as possible.

Best regards,
Ruben
Steema Support Team

Post Reply