@LINES, long lines, TCC disappears

May 20, 2008
11,415
99
Syracuse, NY, USA
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.
 
Nov 3, 2010
9
0
On Thu, 06 Oct 2011 18:09:38 -0400, rconn <>
wrote Re RE: [Support-t-3267] Re: @LINES, long lines, TCC disappears:


>---Quote---
>> I am of the opinion that an app should never crash as a result of
>> what the user does (short of deliberate sabotage).
>---End Quote---
>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.

Well put.
 
May 20, 2008
11,415
99
Syracuse, NY, USA
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.

Cute quip.

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.
 
May 30, 2008
235
2
Cute quip.

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.
 
May 20, 2008
11,415
99
Syracuse, NY, USA
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.

TCC 13.00.24
Module=D:\tc13\TakeCmd.dll
Address=10029C11
Exception=C0000005
EAX=03260000 EBX=016BFC94 ECX=0165CA61 EDX=77AE70B4
ESI=03230000 EDI=03230000 EBP=016BFC08 ESP=0165CAB0
CS=0000001B DS=00000023 ES=00000023 SS=00000023
Flags=00010216

Stack:
1 : TakeCmd.dll 00000001:00028c11
 
Similar threads
Thread starter Title Forum Replies Date
nickles Fixed Executing long command lines in a batch generates file name errors Support 16
Stefano Piccardi echoerr truncates long lines Support 9
W Copy+Paste without breaking long lines as default? Support 1
old coot Spurious errors (triggered by "for" construct?) when adding/removing "echo" lines Support 2
vefatica Continued lines (^) in a library routine? Support 5
R Lines between COMMENT & ENDCOMMENT not ignored Support 7
A TCMD - Dir Command puts out blank lines? Support 16
T FFind - can we display n number of lines after the find? Support 2
T WAD Difference between TCC and CMD in handling multi-command lines Support 6
JohnQSmith Weird DIR output (missing lines) Support 1
fpefpe Documentation Comment lines? Support 2
B %@lines doesn't count last line without cr/lf at eof Support 1
nikbackm How to? Find duplicate lines in text file Support 0
S Documentation HELP nit: @LINES Support 5
B Select and run lines from Command Input panel? Support 1
D WAD New envars for @LINES are not hidden Support 8
T Documentation @LINE[CON,n] @LINES[CON] not documented (bug?) Support 4
M How to? Parsing lines containing double quotes... Support 3
M Just an out-of-curiosity question the List command vs. the @Lines function... Support 13
samintz How to? Pull out multiple matching lines Support 5
L "for" in multiple lines Support 2
D Blank lines in jpstree.idx Support 3
T @Word from Lines with Pipes Support 3
vefatica @LINES[]? Support 1
J Extra blank lines during paste Support 6
vefatica How many lines are in this file? Support 17
nikbackm Trim last N lines from a file Support 6
T How do you echo lines with special characters to file? Support 4
B @lines: first line in the file is numbered 1 Support 0
R Reading an Unicode file with more than 8191 lines Support 1
R Long commands retrieved from command history have blank line when wrapped Support 20
vefatica Long file names - a few questions Support 2
Roedy WAD Minor long-standing install problems Support 6
M An issue I really don't understand and is too long and detailed for this "Title" line... Support 16
Q tcc.exe crash with long command line Support 10
I TCC crashes on gosub after long command line Support 0
nickles OPTION "trims" long ColorDir directive Support 1
L Very long startup times - solved for me Support 15
L File completion window saws long paths Support 3
A TCMD takes very long to start up Support 19

Similar threads