Solved TD-22147: VisFileOpen/Read functions on UNICODE files crash TD

Report TD 5.x and 6.x bugs and possible workarounds.
Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3512
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

TD-22147: VisFileOpen/Read functions on UNICODE files crash TD

Post by Dave Rabelink » 09 Jun 2015, 11:47

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)
VisFileReadString.zip
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink

Image
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
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3512
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: TD-22147: VisFileOpen/Read functions on UNICODE files crash TD

Post by Dave Rabelink » 09 Jun 2015, 14:35

Gupta has assigned a defect for this issue:

TD-22147 - Crash using VisFileOpen/Read functions on UNICODE files
Regards,
Dave Rabelink

Image
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
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3512
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: TD-22147: VisFileOpen/Read functions on UNICODE files crash TD

Post by Dave Rabelink » 13 Jul 2015, 12:12

This defect has been fixed in:

TD 6.3 UPD2 45680
Regards,
Dave Rabelink

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

Return to “Bug Reports”

Who is online

Users browsing this forum: [Ahrefs], [Ccbot] and 6 guests