When opening UTF16 (UNICODE) files using VisFileOpen and reading the contents, the application gets unstable and will eventually (or immediately ) crash.
The string buffers in TD get corrupted.
It does not matter if OF_UTF16 as flag is specified or not.
The only workaround is not to use Vis functions, but Sal functions on UTF16 files.
See testcase.
The archive contains several text files of different types.
All files should be read without crashing TD. The UNICODE test files do all crash.
Change the testcase on the button SAM_Click to test the several files.
I have tested other TD versions and found that:
- Starting from TD 6.2 SP3r the crashes occur
- TD 6.3 RTM and UPD1 both crash
(Testcase in TD62 format)
TD-22147: VisFileOpen/Read functions on UNICODE files crash TD
-
- Founder/Site Admin
- Posts: 3512
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
TD-22147: VisFileOpen/Read functions on UNICODE files crash TD
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
-
- Founder/Site Admin
- Posts: 3512
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
Re: TD-22147: VisFileOpen/Read functions on UNICODE files crash TD
Gupta has assigned a defect for this issue:
TD-22147 - Crash using VisFileOpen/Read functions on UNICODE files
TD-22147 - Crash using VisFileOpen/Read functions on UNICODE files
Regards,
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
-
- Founder/Site Admin
- Posts: 3512
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
Re: TD-22147: VisFileOpen/Read functions on UNICODE files crash TD
This defect has been fixed in:
TD 6.3 UPD2 45680
TD 6.3 UPD2 45680
Regards,
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Who is online
Users browsing this forum: [Ahrefs], [Ccbot] and 6 guests