From: SourceForge.net <no...@so...> - 2004-06-02 19:24:21
|
Bugs item #699739, was opened at 2003-03-07 16:42 Message generated for change (Comment added) made by davygrvy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=699739&group_id=10894 Category: 27. Channel Types Group: obsolete: 8.4.2 Status: Open Resolution: None Priority: 5 Submitted By: Kevin B KENNY (kennykb) Assigned to: David Gravereaux (davygrvy) Summary: app can overrun console buffer on Windows Initial Comment: If an application configures a very large buffer on stdout, and then writes a large amount of data to the console on Windows, the write fails with error writing "stdout": not enough memory A script that illustrates the problem is: fconfigure stdout -buffering full -buffersize 262144 for { set i 0 } { $i <= 10000 } { incr i } { puts ---------------------------------------------------------------------- } It's reasonable for the write to block, but this failure is bizarre. ---------------------------------------------------------------------- >Comment By: David Gravereaux (davygrvy) Date: 2004-06-02 12:24 Message: Logged In: YES user_id=7549 It seems the upper limit -buffersize is 0x7FFF. One over that and WriteFile fails with ENOMEM. I can't think of a way to fix this aside from adding a way for drivers to intercept requests to change the buffersize. ---------------------------------------------------------------------- Comment By: David Gravereaux (davygrvy) Date: 2004-06-01 02:50 Message: Logged In: YES user_id=7549 Just put tcl in the debugger to look at this. WriteFile itself is failing in ConsoleOutputProc(). I think the summary of this problem is that the other end can't accept a buffer this big and rather than soaking up some of it, it just barfs. I don't know if there is an easy way to fix this. Even if we knew the limit ahead of time (maybe GetConsoleBufferInfo could get us the answer?) we have no way for the driver to intercept a setting of the buffersize from the driver side. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=699739&group_id=10894 |