Application hangs on loading 'corrupt' tee file

TeeChart for ActiveX, COM and ASP
Post Reply
Bush
Newbie
Newbie
Posts: 50
Joined: Fri Nov 05, 2004 5:00 am

Application hangs on loading 'corrupt' tee file

Post by Bush » Tue Feb 21, 2006 11:17 pm

Hi,

To avoid application hanging,
please is there any method to check contents of a file before using :

Tchart.Clearchart
Tchart.Import.Loadfromfile sfile

The file has been saved as usual but the application hangs when loading a specified file.

I can upload the specified tee file 20kb as a sample, but don't see the trigger for it.

Kind Regards,
Bush. :(

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Feb 27, 2006 12:14 pm

Hi,

there's not a way to check the contens of the tee file, however I've added this as a wish to be considered for the next releases.

To solve your problem, have you tried using:

Code: Select all

Private Sub Command1_Click()
On Error Resume Next
TChart1.Import.LoadFromFile "c:\teefile.tee"
If Err Then
        MsgBox "Error"
End If
End Sub

Bush
Newbie
Newbie
Posts: 50
Joined: Fri Nov 05, 2004 5:00 am

Post by Bush » Tue Feb 28, 2006 8:34 am

Mny thx yr reply.
On error doesn't help.
If nothing is foreseen, is maybe more important to check/clean file contents when using 'savetofile'.

For your information:
That file is corrupt has in my opion something to do with 'tools'.

Since months we already implemented code that several tools are removed before saving. If not, in many cases we have "automatisation error". This issue has been discussed before.
We already removed asGridband and Axisarrows which were giving unpredictable errors.
If those items are called from teechart editor when chart is loaded, then no problem. But if you save the chart with above tools and use loadfromfile, many times you have automatisation error.
But like I said, this time, no error at all and application hangs.
I hope this helps.
I have still the sample somewhere and if you like, tell me where to upload it.
Kind regards.

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 Feb 28, 2006 9:09 am

Hi Bush,

Could you please send us one of those .tee files that doesn't work? You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

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

Bush
Newbie
Newbie
Posts: 50
Joined: Fri Nov 05, 2004 5:00 am

Post by Bush » Mon Mar 06, 2006 9:59 am

Had to create account and so on. Sample file (5.81 Kb) can be downloaded from http://www.transquotes.com/transstock/1200223410004.zip
Kind Regards.

Marc
Site Admin
Site Admin
Posts: 1272
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Tue Mar 07, 2006 12:34 pm

Hello,

Thanks for making available the tee file.

The contents of the tee file that you linked for us has some invalid bytes at the end, a repetition of some of the last elements of the tee itself. We can't explain what might have caused that but please check any additional save/file move process that may be taking place in case the error is creeping in there. There is no current TeeChart technique by which you are able to check the invalid content before the file is read.

For content review you can make a text readable version of the tee file. You are able to see a listing of file contents but it will only show the valid contents and ignore invalid elements (and thus is not useful for debugging file problems).

eg.

Code: Select all

  TChart1.Export.ConvertTeeFileToText _
           "c:\myfolder\teefile.tee", _
           "c:\myfolder\teefile.txt"
For tests here we applied a modification to trim the tee and the file loads correctly showing all the contents that are listed in the text translation file (as coded above).

In current TeeChart versions the tee file read has been non-trimmed to support pre-version 6 tee files that have a slightly different coding technique. We have changed that to be parameterizable in the next maintenance release of TeeChart (v7 - are you using v7?). The change resolves the problem when reading your tee file. Please download the next maintenance release when available.

Regards,
Marc Meumann
Steema Support

Bush
Newbie
Newbie
Posts: 50
Joined: Fri Nov 05, 2004 5:00 am

Post by Bush » Wed Mar 08, 2006 12:48 pm

Hi Mark,
Yes we are using 7.006 and thx, we will download next release when available.
Kind Regards,
Bush.

Post Reply