TeeChart showing abnormal message box & accumulating memory

TeeChart for ActiveX, COM and ASP
star_it
Newbie
Newbie
Posts: 20
Joined: Fri Apr 10, 2015 12:00 am

Re: TeeChart showing abnormal message box & accumulating memory

Post by star_it » Thu Apr 30, 2015 10:42 am

Hi,

I cannot use the latest version of the activex because our requirements compel us to use v2013.0.1.4.131120. With this I am sending you a smaller and compact version of the code to examine and investigate the cause for the "2." message box issue. In this code we have used the function 'RemoveAllSeries' and 'AddSeries' after a certain interval of time. The graph controls are sitting on a dialog and the dialog itself is running on a separate thread. There are altogether 10 dialogs each containing 2 graph controls.

Observation after running the code:

1. Abnormal message box (with "2." written on it) show up occasionally. The probability of abnormal message box increases if one drags the graph control dialogs for some time.

2. Every time there is an abnormal message box an exception inside 'Kernelbase.dll' is reported in output window.

3. The graph dialogs cannot paint themselves and after a certain time the controls disappear partially or completely.

4. If we launch a single graph window ( by changing at line no. 1086 of SampleChart.cpp from 10 to 1) then no abnormal message box appear. Once we change the graph dialog count to more than one the abnormal message box re-appears.

Please download the 'helpers.rar' file from my previous post, uncompress and put the folder inside 'SampleChart'.

Let me know if you need any further help.

Regards,
Asit Kumar De
Attachments
SampleChart.zip
(101.41 KiB) Downloaded 1597 times

star_it
Newbie
Newbie
Posts: 20
Joined: Fri Apr 10, 2015 12:00 am

Re: TeeChart showing abnormal message box & accumulating memory

Post by star_it » Tue May 05, 2015 6:30 am

I could not see my post dated 30-Apr-2015. That is why I am posting the message again along with the attachment. Ignore this message if already noted.

Asit


Hi,

I cannot use the latest version of the activex because our requirements compel us to use v2013.0.1.4.131120. With this I am sending you a smaller and compact version of the code to examine and investigate the cause for the "2." message box issue. In this code we have used the function 'RemoveAllSeries' and 'AddSeries' after a certain interval of time. The graph controls are sitting on a dialog and the dialog itself is running on a separate thread. There are altogether 10 dialogs each containing 2 graph controls.

Observation after running the code:

1. Abnormal message box (with "2." written on it) show up occasionally. The probability of abnormal message box increases if one drags the graph control dialogs for some time.

2. Every time there is an abnormal message box an exception inside 'Kernelbase.dll' is reported in output window.

3. The graph dialogs cannot paint themselves and after a certain time the controls disappear partially or completely.

4. If we launch a single graph window ( by changing at line no. 1086 of SampleChart.cpp from 10 to 1) then no abnormal message box appear. Once we change the graph dialog count to more than one the abnormal message box re-appears.

Please download the 'helpers.rar' file from my previous post, uncompress and put the folder inside 'SampleChart'.

Let me know if you need any further help.

Regards,
Asit Kumar De
Attachments
SampleChart.rar
(96.84 KiB) Downloaded 1652 times

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

Re: TeeChart showing abnormal message box & accumulating memory

Post by Yeray » Tue May 05, 2015 7:53 am

Hi Asit,

I haven't been able to reproduce the "2" abnormal message problem with that application.
The only message I see is a "SampleChart.exe has triggered a breakpoint" as soon as I close one of the multiple windows with 2 charts. Once it arrives, it continues showing over and over:
breakpoint.png
breakpoint.png (8.71 KiB) Viewed 31624 times
Then, sometimes I also get a "Debug Assertion Failed" error:
debug_assertion_failed.png
debug_assertion_failed.png (14.81 KiB) Viewed 31630 times
Changing your application from "Debug" to "Release" I can close all the windows without getting anyone of the above.

I can drag any of the windows without getting the "2" abnormal message both in Release and Debug modes.
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

star_it
Newbie
Newbie
Posts: 20
Joined: Fri Apr 10, 2015 12:00 am

Re: TeeChart showing abnormal message box & accumulating memory

Post by star_it » Tue May 05, 2015 8:48 am

Hi Yeray,

Try running the application several times and drag the windows as they are created. The '2." message box do not appear consistently but it appears.

You can ignore the crash issue. Just don't close the individual graph windows. The crash is not related to the message box issue.

Regards,
Asit Kumar De

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

Re: TeeChart showing abnormal message box & accumulating memory

Post by Yeray » Tue May 05, 2015 9:41 am

Hello Asit,
star_it wrote:Try running the application several times and drag the windows as they are created. The '2." message box do not appear consistently but it appears.
I saw the "2" message box once after running the application several times with v2013.0.1.4 registered.
Then I registered v2014.0.0.1, I've ran the application several times and I didn't reproduce the problem.
However, since this problem isn't reproduced consistently, it's difficult to guarantee it. Anyway, I'd suggest you to give it a try to the v2014.0.0.1 or even better to the latest version, v2015.0.0.0.
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

star_it
Newbie
Newbie
Posts: 20
Joined: Fri Apr 10, 2015 12:00 am

Re: TeeChart showing abnormal message box & accumulating memory

Post by star_it » Tue May 05, 2015 11:27 am

Hi Yeray,

I just downloaded TeeChart2015_0_0_0_ActiveX3264.exe from your website, uninstalled the previous version, restarted the machine and installed the new version. When I ran the demo application and dragged the windows there were no '2." message boxed but I came across a message box with "3." written inside (refer to the attached screen dump). The frequency of this message box is less than that of "2" and the same exception was reported on the output window.

Just to let you know that we are going to have an important delivery shortly and this message box issue has to be resolved before that and we have no solution for it. Please look into the issue and let us know how to fix.This is urgent!

Regards,
Asit

P.S. Try to follow the code in StAnalyzerDlg.cpp and ChartWrapper.cpp.
Attachments
SampleChart.zip
(101.3 KiB) Downloaded 1608 times
AbnormalMsgBox_TeeChart2015_0_0_0_0.jpg
AbnormalMsgBox_TeeChart2015_0_0_0_0.jpg (62.58 KiB) Viewed 31596 times

star_it
Newbie
Newbie
Posts: 20
Joined: Fri Apr 10, 2015 12:00 am

Re: TeeChart showing abnormal message box & accumulating memory

Post by star_it » Wed May 06, 2015 9:59 am

Hi Yeray,

Any update to my last response? Please let me know if you can reproduce the same ("3." message box) on your end and if so why are these message box appearing.

Another observation is that for each graph control if I set auto repaint false after it is created I don't find any message box. Check if auto repainting the graphs has anything to do with these message box in a multi-threaded environment.

Also if I set auto repaint false how do I update and draw the graphs?

Waiting for your response.

Regards,
Asit

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

Re: TeeChart showing abnormal message box & accumulating memory

Post by Yeray » Wed May 06, 2015 10:15 am

Hello,

First of all, I'd like to apologise because the latest TeeChart ActiveX version is v2015.0.0.1, not v2015.0.0.0.

We could reproduce it here but very inconsistently.
On the other hand, the application still seems to be using v2014.0.0.1 (*) not v2015.0.0.0 (or v2015.0.0.1).

(*) I checked that adding the following code at line 132 at ChartWrapper.cpp and debugging to see that string:

Code: Select all

CString str = pchart_->GetVersion();
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

star_it
Newbie
Newbie
Posts: 20
Joined: Fri Apr 10, 2015 12:00 am

Re: TeeChart showing abnormal message box & accumulating memory

Post by star_it » Wed May 06, 2015 12:00 pm

Hi Yeary,

Could you find out the reason behind popping of such abnormal message box? If so what is that and how to avoid it. Please suggest it as early as possible.

Also let me know which function to use to update a graph when auto repaint is set to faise. Inside the header file for TChart generated from using the ActiveX I find there are two such methods viz., RefreshData and Repaint. Currently after adding new data to the graph I am using both these functions (with auto repaint false) to update but nothing is drawn or updated on the controls. Please suggest.

Regards,
Asit

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

Re: TeeChart showing abnormal message box & accumulating memory

Post by Yeray » Wed May 06, 2015 12:15 pm

Hi Asit,
star_it wrote: Could you find out the reason behind popping of such abnormal message box? If so what is that and how to avoid it. Please suggest it as early as possible.
We could reproduce the problem and we found the origin of the problem. At the moment we are investigating what alternatives we have to fix it.
We'll be back to you as soon as we find it.
star_it wrote:Also let me know which function to use to update a graph when auto repaint is set to faise. Inside the header file for TChart generated from using the ActiveX I find there are two such methods viz., RefreshData and Repaint. Currently after adding new data to the graph I am using both these functions (with auto repaint false) to update but nothing is drawn or updated on the controls. Please suggest.
Try with this:

Code: Select all

TChart1.Environment.InternalRepaint
You may need to set AutoRepaint to true before calling that function and you can set it back to false if you want after it.

Code: Select all

TChart1.AutoRepaint = True
TChart1.Environment.InternalRepaint
TChart1.AutoRepaint = False
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

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

Re: TeeChart showing abnormal message box & accumulating memory

Post by Yeray » Wed May 06, 2015 1:39 pm

Hello,
Yeray wrote:We could reproduce the problem and we found the origin of the problem. At the moment we are investigating what alternatives we have to fix it.
We'll be back to you as soon as we find it.
Try switching from GDIPlus to GDI to check if the problem is only reproducible in GDIPlus:

Code: Select all

pchart_->GetAspect().GetGDIPlus().SetActive(false);
If you can confirm it is only reproducible in GDIPlus, it can serve you as a temporal workaround while we continue investigating for a permanent fix.
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

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

Re: TeeChart showing abnormal message box & accumulating memory

Post by Yeray » Wed May 06, 2015 2:02 pm

Hello again,
Yeray wrote: On the other hand, the application still seems to be using v2014.0.0.1 (*) not v2015.0.0.0 (or v2015.0.0.1).

(*) I checked that adding the following code at line 132 at ChartWrapper.cpp and debugging to see that string:

Code: Select all

CString str = pchart_->GetVersion();
I could upgrade the application to v2015.0.0.1 simply by overwriting the files at the helpers folder with those from the "\Utilities\New VC Classes" folder in the v2015.0.0.1 installation.
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

star_it
Newbie
Newbie
Posts: 20
Joined: Fri Apr 10, 2015 12:00 am

Re: TeeChart showing abnormal message box & accumulating memory

Post by star_it » Thu May 07, 2015 9:58 am

Hi Yeary,

Setting GDIPlus active to false indeed resulted no further "3." message box but the graph display quality is very poor. Most of the times the graph controls are not painted properly. Although it fixes the core issue but the graphs will be useless from user point of view. Please suggest.

Regards,
Asit

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

Re: TeeChart showing abnormal message box & accumulating memory

Post by Yeray » Fri May 08, 2015 8:34 am

Hello Asit,

Thanks for the feedback.
We are investigating what alternatives do we have to fix the problem.
In the meanwhile the only workaround I can think on is disabling GDIPlus.
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

Post Reply