Separate names with a comma.
Discussion in 'Support' started by vefatica, Oct 6, 2011.
I tried @LINES on a big (1MB) file containing no newlines. TCC disappeared.
Not particularly surprising. Why would you do such a thing?
I didn't choose that file specifically. It was simply included in a DO set.
I am of the opinion that an app should never crash as a result of what the user does (short of deliberate sabotage). An error message, or warning, or simply "1" (for a non-empty file containing no newlines) would have been fine.
It's a nice theory. In the real world, the amount of error trapping the
programmer can do is finite, while the number of bizarre things a user can
do is infinite.
On Thu, 06 Oct 2011 18:09:38 -0400, rconn <>
wrote Re RE: [Support-t-3267] Re: @LINES, long lines, TCC disappears:
The file contained 1,048,576 bytes (of text) and no newlines. Had that file contained 1,048,575 or 1,048,577 bytes, TCC would not have crashed and would have correctly returned 0.
That also goes for any file with no newlines whose size is exactly a power of two greater than 65536 ... crash ... one more or one fewer character ... no crash.
That certainly is peculiar.
Sounds to me as if it crashes if the file size is an exact multiple of the buffer size used for reading the file contents.
On Fri, 07 Oct 2011 07:14:55 -0400, nikbackm <> wrote:
|Sounds to me as if it crashes if the file size is an exact multiple of the buffer size used for reading the file contents.
I suspected that too but it was easier to check powers of 2.
I just tried 3*2^16 ... crash.
EAX=03260000 EBX=016BFC94 ECX=0165CA61 EDX=77AE70B4
ESI=03230000 EDI=03230000 EBP=016BFC08 ESP=0165CAB0
CS=0000001B DS=00000023 ES=00000023 SS=00000023
1 : TakeCmd.dll 00000001:00028c11