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.
Application hangs on loading 'corrupt' tee file
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:
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
Pep Jorge
http://support.steema.com
http://support.steema.com
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.
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.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |
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.
Kind Regards.
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.
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
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"
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