Artifacts Associated With Ticket 3603553fffffffffffffffffffffffffffffffff
Ticket change [778a0ce919] (rid 89792) by vampiera on 2013-02-06 13:12:52:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
This small program fails on baddocument.odt (in attach) using gunzip on gz created says -> gzip: baddocument.odt.gz: invalid compressed data--format violated while for gooddocument.odt (in attach) there are no problems. proc zip_file {path file} { set fin [open $path/$file rb] set fout [open $path/$file.gz wb] set fzip [zlib push gzip $fout] while {![eof $fin]} { puts -nonewline $fzip [read $fin 10] } chan pop $fout close $fin close $fout } zip_file . baddocument.odt zip_file . gooddocument.odt - foundin initialized to: "current: 8.6.0"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "vampiera"
- subsystem initialized to: "57. zlib"
- title initialized to: "Problem width file larger 36K"
- type initialized to: "Bug"
Add attachment "baddocument.odt" [eeb97df436] (rid 108866) by vampiera on 2013-02-06 20:12:53.
Ticket change [85f67d4f68] (rid 131421) by vampiera on 2013-02-06 20:12:53:
- icomment:
File Added - 460198: baddocument.odt
- login: "vampiera"
- mimetype: "text/plain"
- username: "vampiera"
- icomment:
Ticket change [959b0dad54] (rid 106182) by vampiera on 2013-02-06 20:14:25:
- icomment:
File Added - 460199: gooddocument.odt
- login: "vampiera"
- mimetype: "text/plain"
- username: "vampiera"
- icomment:
Add attachment "gooddocument.odt" [6d08956e16] (rid 128631) by vampiera on 2013-02-06 20:14:25.
Ticket change [089f61e1be] (rid 89603) by dkf on 2013-02-06 21:49:55:
- icomment:
Just for my understanding, aren't .odt files already compressed? I thought they were variations on the ZIP format.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [806dd34d0c] (rid 116863) by vampiera on 2013-02-06 21:59:46:
- icomment:
yes .odt files are zip files I have the same effect with pdf. The example is .odt because it is easy to me edit and change document size.
- login: "vampiera"
- mimetype: "text/plain"
- username: "vampiera"
- icomment:
Ticket change [f4bbe3ecd2] (rid 129978) by dkf on 2013-02-06 22:01:37:
- icomment:
Yeah, PDFs are also compressed (but in a different way). :-) I'm wondering whether the problem is to do with incompressible data over a certain size. Don't know if that's the case yet; just speculating for now.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [dc6a7b62ea] (rid 114473) by vampiera on 2013-02-06 22:23:30:
- icomment:
Maybe. In attach a txt file greater 36K (also in gz format) It works.
- login: "vampiera"
- mimetype: "text/plain"
- username: "vampiera"
- icomment:
Add attachment "promessisposi.txt" [55ec5bc080] (rid 94238) by vampiera on 2013-02-06 22:24:01.
Ticket change [4aed507bd3] (rid 126616) by vampiera on 2013-02-06 22:24:01:
- icomment:
File Added - 460209: promessisposi.txt
- login: "vampiera"
- mimetype: "text/plain"
- username: "vampiera"
- icomment:
Ticket change [ce482c9bfa] (rid 96030) by dkf on 2013-02-06 22:29:34:
- icomment:
Another possibility for the failure might be failing to flush the data correctly before the core of the [chan pop] is done. (That would show up as a truncation.) Interesting that the *resulting* data has a minimum size for the problem to occur. That's got to be important. Just checking, this is the Tcl 8.6.0 release that has the bug? Not one of the betas? I know that there were flushing bugs in the betas.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [6c4deed4c0] (rid 128481) by vampiera on 2013-02-06 22:41:49:
- icomment:
Dimension ... in attach a txt file with problem. my release: base-tcl-thread 8.6.0.0.296563 linux-glibc2.3-x86_64 from ActiveState
- login: "vampiera"
- mimetype: "text/plain"
- username: "vampiera"
- icomment:
Ticket change [cffe9d8c71] (rid 113088) by vampiera on 2013-02-06 22:42:12:
- icomment:
File Added - 460210: promessisposi256.txt
- login: "vampiera"
- mimetype: "text/plain"
- username: "vampiera"
- icomment:
Add attachment "promessisposi256.txt" [d3169ee726] (rid 113637) by vampiera on 2013-02-06 22:42:12.
Ticket change [64c90fa6ab] (rid 92833) by dkf on 2013-02-10 22:17:01:
- icomment:
Confirmed that there's a problem. Switching to using [fcopy] and tinkering with simple [flush] use doesn't affect that. :-(
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "8"
- username: "dkf"
- icomment:
Ticket change [31c20c1c33] (rid 93488) by dkf on 2013-02-11 16:15:16:
- closedate changed to: "2013-02-11T09:15:16"
- closer changed to: "dkf"
- icomment:
allow_comments - 1 OK, this one is evil. The problem is that if, when *not* flushing, the buffer inside zlib itself (32kB) fills up, it asks for Tk to write that buffer out (in 8kB chunks), yet Tk was getting that wrong and not writing anything at all! Only data written at a flushing point, or when the channel was being closed, was getting correctly through. Thus, any attempt to write data that was larger than 32kB *after* compression would fail unless extensive effort was made to force flushes. Ouch. Doubly embarrassing was that this was a one-line fix. The real bug was that the condition on code to do the writes was comparing the number of free bytes in the buffer (with zero) instead of the number of bytes to write (with zero). Duh! Fixed.
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"