Page 1 of 1

ScrollPager just freezes everything

Posted: Thu Jun 14, 2012 3:10 pm
by 15660666
Hi,

I'm using TeeChart for WPF version 4.1.2012.5103 and was hoping I could use the ScrollPager on my chart.
Everytime I assign a series to the ScrollPager the application freezes.

Even the WPF demo that came with this version of TeeChart freezes and crashes on the ScrollPager demo.

Please fix this...

Re: ScrollPager just freezes everything

Posted: Thu Jun 14, 2012 4:01 pm
by 10050769
Hello thor,

I'm using TeeChart for WPF version 4.1.2012.5103 and was hoping I could use the ScrollPager on my chart.
Everytime I assign a series to the ScrollPager the application freezes.
I can not reproduce your problem using last version of TeeCharWPF and next code:

Code: Select all

public MainWindow()
        {
            InitializeComponent();
            InitializeChart();
        }
        Steema.TeeChart.WPF.Tools.ScrollPager scroll;
        private void InitializeChart()
        {
            Steema.TeeChart.WPF.Styles.Line line = new Steema.TeeChart.WPF.Styles.Line(tChart1.Chart);
            scroll = new Steema.TeeChart.WPF.Tools.ScrollPager(tChart1.Chart);
            line.FillSampleValues();
            scroll.Series = line;

        }
Can you please modify previous code because we can reproduce your problem here?
Even the WPF demo that came with this version of TeeChart freezes and crashes on the ScrollPager demo.
It bug still is in bug list report with number[TW16016189]. We will try to fix it for next maintenance releases of TeeChartFor.Net.

Thanks,

Re: ScrollPager just freezes everything

Posted: Fri Jun 15, 2012 10:19 am
by 15660666
So the problem must be with my setup?

I ran your example and it freezes as well.

If I remove "scroll.Series = line;" everything runs fine.

My environment is :
Win7 Ultimate 64bit. (6.1.7601 SP 1 build 7601)
VS2010 10.0.40219.1 SP1Rel

Please advice on some way to get this working or if you need further details about my environment.

thanks

Re: ScrollPager just freezes everything

Posted: Fri Jun 15, 2012 2:51 pm
by 10050769
Hello Thor,

I am afraid I can not reproduce your problem using my previous code and compiled it in X64 machine here.

Can you tell us if you compiled with x86 TeeChart.WPF.dll or x64 TeeChart.WPF.dll? On the other hand,Does appear in your application any exception, caused to the ScrollPager? If the answer is yes, please tell me the exactly exception appears.

Thanks,

Re: ScrollPager just freezes everything

Posted: Wed Jul 25, 2012 11:48 am
by 15660666
Hi,

This is compiled with x86.

When I add the scroll pager I don't get an exception it just hangs without drawing the chart.
Breaking with intellitrace gives me the following stacktrace:


> PresentationCore.dll!System.Windows.Media.TextFormatting.TextFormatterContext.SetTabs(int incrementalTab = {unknown}, MS.Internal.TextFormatting.LsTbd* tabStops = {unknown}, int tabStopCount = {unknown})
PresentationCore.dll!MS.Internal.TextFormatting.FullTextState.SetTabs(System.Windows.Media.TextFormatting.TextFormatterContext context = {unknown})
PresentationCore.dll!FullTextLine.FormatLine(MS.Internal.TextFormatting.FullTextState fullText = {unknown}, int cpFirst = {unknown}, int lineLength = {unknown}, int formatWidth = {unknown}, int finiteFormatWidth = {unknown}, int paragraphWidth = {unknown}, MS.Internal.TextFormatting.LineFlags lineFlags = {unknown}, MS.Internal.TextFormatting.FormattedTextSymbols collapsingSymbol = {unknown})
PresentationCore.dll!MS.Internal.TextFormatting.TextFormatterImp.FormatLineInternal(System.Windows.Media.TextFormatting.TextSource textSource = {unknown}, int firstCharIndex = {unknown}, int lineLength = {unknown}, double paragraphWidth = {unknown}, System.Windows.Media.TextFormatting.TextParagraphProperties paragraphProperties = {unknown}, System.Windows.Media.TextFormatting.TextLineBreak previousLineBreak = {unknown}, System.Windows.Media.TextFormatting.TextRunCache textRunCache = {unknown})
PresentationCore.dll!MS.Internal.TextFormatting.TextFormatterImp.FormatLine(System.Windows.Media.TextFormatting.TextSource textSource = {unknown}, int firstCharIndex = {unknown}, double paragraphWidth = {unknown}, System.Windows.Media.TextFormatting.TextParagraphProperties paragraphProperties = {unknown}, System.Windows.Media.TextFormatting.TextLineBreak previousLineBreak = {unknown})
PresentationCore.dll!LineEnumerator.FormatLine(System.Windows.Media.TextFormatting.TextSource textSource = {unknown}, int textSourcePosition = {unknown}, double maxLineLength = {unknown}, System.Windows.Media.TextFormatting.TextParagraphProperties paraProps = {unknown}, System.Windows.Media.TextFormatting.TextLineBreak lineBreak = {unknown})
PresentationCore.dll!LineEnumerator.MoveNext()
PresentationCore.dll!System.Windows.Media.FormattedText.DrawAndCalculateMetrics(System.Windows.Media.DrawingContext dc = {unknown}, System.Windows.Point drawingOffset = {unknown}, bool getBlackBoxMetrics = {unknown})
PresentationCore.dll!Get System.Windows.Media.FormattedText.Metrics()
PresentationCore.dll!Get System.Windows.Media.FormattedText.WidthIncludingTrailingWhitespace()
TeeChart.WPF.Client.dll!Steema.TeeChart.WPF.Drawing.Graphics3DWPF.MeasureString(Steema.TeeChart.WPF.Drawing.ChartFont f = {unknown}, string text = {unknown})
TeeChart.WPF.Client.dll!Steema.TeeChart.WPF.Drawing.Graphics3D.TextHeight(string text = {unknown})
TeeChart.WPF.Client.dll!Get Steema.TeeChart.WPF.Drawing.Graphics3D.FontHeight()
TeeChart.WPF.Client.dll!Steema.TeeChart.WPF.AxisLabels.InternalLabelSize(double value = {unknown}, bool isWidth = {unknown})
TeeChart.WPF.Client.dll!Steema.TeeChart.WPF.AxisLabels.LabelHeight(double value = {unknown})
TeeChart.WPF.Client.dll!Get Steema.TeeChart.WPF.Axis.CalcIncrement()
TeeChart.WPF.Client.dll!Steema.TeeChart.WPF.Axis.MaxLabelsValueWidth()
TeeChart.WPF.Client.dll!Steema.TeeChart.WPF.Axis.MaxLabelsWidth()
TeeChart.WPF.Client.dll!Steema.TeeChart.WPF.Axis.InternalCalcPerpendicularSize(Steema.TeeChart.WPF.Drawing.ChartFont tmpFont = {unknown}, int tmpAngle = {unknown}, string tmpText = {unknown}, int tmpSize = {unknown})
TeeChart.WPF.Client.dll!Steema.TeeChart.WPF.Axis.SizeLabels(bool Perpendicular = {unknown})
TeeChart.WPF.Client.dll!Steema.TeeChart.WPF.Axis.SizeLabels()
TeeChart.WPF.Client.dll!Steema.TeeChart.WPF.Axis.CalcRect(ref System.Windows.Rect r = {unknown}, bool inflateChartRectangle = {unknown})
TeeChart.WPF.Client.dll!Steema.TeeChart.WPF.Chart.AxisRect(Steema.TeeChart.WPF.Axis a = {unknown}, ref System.Windows.Rect r = {unknown})
TeeChart.WPF.Client.dll!Steema.TeeChart.WPF.Chart.CalcAxisRect()
TeeChart.WPF.Client.dll!Steema.TeeChart.WPF.Chart.InternalDraw(System.Windows.Media.DrawingContext g = {unknown}, bool noTools = {unknown})
TeeChart.WPF.Client.dll!Steema.TeeChart.WPF.Chart.InternalDraw(System.Windows.Media.DrawingContext g = {unknown})
TeeChart.WPF.Client.dll!Steema.TeeChart.WPF.TChart.Draw(System.Windows.Media.DrawingContext g = {unknown})
TeeChart.WPF.Client.dll!Steema.TeeChart.WPF.TChart.OnRender(System.Windows.Media.DrawingContext drawingContext = {unknown})
PresentationCore.dll!System.Windows.UIElement.Arrange(System.Windows.Rect finalRect = {unknown})
PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayout()
PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayoutCallback(object arg = {unknown})
PresentationCore.dll!InvokeOnRenderCallback.DoWork()
PresentationCore.dll!System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandlerCore(object resizedCompositionTarget = {unknown})
PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandler(object resizedCompositionTarget = {unknown})
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback = {unknown}, object args = {unknown}, int numArgs = {unknown})
WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source = {unknown}, System.Delegate method = {unknown}, object args = {unknown}, int numArgs = {unknown}, System.Delegate catchHandler = {unknown})
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl()
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state = {unknown})
mscorlib.dll!System.Threading.ExecutionContext.runTryCode(object userData = {unknown})
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext = {unknown}, System.Threading.ContextCallback callback = {unknown}, object state = {unknown})
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext = {unknown}, System.Threading.ContextCallback callback = {unknown}, object state = {unknown}, bool ignoreSyncCtx = {unknown})
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext = {unknown}, System.Threading.ContextCallback callback = {unknown}, object state = {unknown})
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke()
WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue()
WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd = {unknown}, int msg = {unknown}, System.IntPtr wParam = {unknown}, System.IntPtr lParam = {unknown}, ref bool handled = {unknown})
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd = {unknown}, int msg = {unknown}, System.IntPtr wParam = {unknown}, System.IntPtr lParam = {unknown}, ref bool handled = {unknown})
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o = {unknown})
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback = {unknown}, object args = {unknown}, int numArgs = {unknown})
WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source = {unknown}, System.Delegate method = {unknown}, object args = {unknown}, int numArgs = {unknown}, System.Delegate catchHandler = {unknown})
WindowsBase.dll!System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority priority = {unknown}, System.TimeSpan timeout = {unknown}, System.Delegate method = {unknown}, object args = {unknown}, int numArgs = {unknown})
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd = {unknown}, int msg = {unknown}, System.IntPtr wParam = {unknown}, System.IntPtr lParam = {unknown})
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame = {unknown})
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame = {unknown})
PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore = {unknown})
PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window = {unknown})
PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window = {unknown})
PresentationFramework.dll!System.Windows.Application.Run()
ChartTester.exe!dotnet_charts.App.Main()
mscorlib.dll!System.AppDomain.ExecuteAssembly(string assemblyFile = {unknown}, System.Security.Policy.Evidence assemblySecurity = {unknown}, string[] args = {unknown})
Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state = {unknown})
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext = {unknown}, System.Threading.ContextCallback callback = {unknown}, object state = {unknown}, bool ignoreSyncCtx = {unknown})
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext = {unknown}, System.Threading.ContextCallback callback = {unknown}, object state = {unknown})
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart()

It seems it's just hanging on some thread or monitor.

thanks

Re: ScrollPager just freezes everything

Posted: Wed Jul 25, 2012 11:49 am
by 15660666
btw this is after updating to 4.1.2012.7133

Re: ScrollPager just freezes everything

Posted: Thu Jul 26, 2012 10:19 am
by narcis
Hi thor,

Thanks for the info. I could reproduce the issue here and added it (TW16016276) to the defect list to be fixed.

Re: ScrollPager just freezes everything

Posted: Fri Sep 21, 2012 11:56 am
by narcis
Hi thor,

After investigating the issue here we found that the problem is when chart dimensions have not been set. ScrollPager tool needs that so you can either declare your chart like this:

Code: Select all

    <my:TChart Margin="0,0,0,0" Name="tChart1"  Height="300" Width="300"/>
Or define dimensions at run-time:

Code: Select all

      tChart1.Width = 300;
      tChart1.Height = 300;

      Steema.TeeChart.WPF.Styles.Line line = new Steema.TeeChart.WPF.Styles.Line(tChart1.Chart);
      line.FillSampleValues();
      Steema.TeeChart.WPF.Tools.ScrollPager scroll = new Steema.TeeChart.WPF.Tools.ScrollPager(tChart1.Chart);
      scroll.Series = line;