|
2013-02-11
| ||
| 16:15 | • Closed ticket [3603553fff]: Problem width file larger 36K plus 7 other chang... artifact: 31c20c1c33 user: dkf | |
|
2013-02-10
| ||
| 22:17 | • Ticket [3603553fff]: 5 changes artifact: 64c90fa6ab user: dkf | |
|
2013-02-06
| ||
| 22:42 | • Ticket [3603553fff]: 4 changes artifact: cffe9d8c71 user: vampiera | |
| 22:42 | • Add attachment promessisposi256.txt to ticket [3603553fffffffff|3603553... artifact: d3169ee726 user: vampiera | |
| 22:41 | • Ticket [3603553fff] Problem width file larger 36K status still Open with 4 o... artifact: 6c4deed4c0 user: vampiera | |
| 22:29 | • Ticket [3603553fff]: 4 changes artifact: ce482c9bfa user: dkf | |
| 22:24 | • Add attachment promessisposi.txt to ticket [3603553fffffffff|3603553fff... artifact: 55ec5bc080 user: vampiera | |
| 22:24 | • Ticket [3603553fff] Problem width file larger 36K status still Open with 4 o... artifact: 4aed507bd3 user: vampiera | |
| 22:23 | • Ticket [3603553fff]: 4 changes artifact: dc6a7b62ea user: vampiera | |
| 22:01 | • Ticket [3603553fff]: 4 changes artifact: f4bbe3ecd2 user: dkf | |
| 21:59 | • Ticket [3603553fff]: 4 changes artifact: 806dd34d0c user: vampiera | |
| 21:49 | • Ticket [3603553fff]: 4 changes artifact: 089f61e1be user: dkf | |
| 20:14 | • Ticket [3603553fff]: 4 changes artifact: 959b0dad54 user: vampiera | |
| 20:14 | • Add attachment gooddocument.odt to ticket [3603553fff] artifact: 6d08956e16 user: vampiera | |
| 20:12 | • Add attachment baddocument.odt to ticket [3603553fff] artifact: eeb97df436 user: vampiera | |
| 20:12 | • Ticket [3603553fff] Problem width file larger 36K status still Open with 4 o... artifact: 85f67d4f68 user: vampiera | |
| 13:12 | • New ticket [3603553fff]. artifact: 778a0ce919 user: vampiera | |
Problem width file larger 36K
Closed / Fixed3603553fffffffffffffffffffffffffffffffffCreated 14 years agoUpdated 14 years ago
Descriptionplain2013-02-06 13:12:52
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
vampieraplain2013-02-06 20:12:53
File Added - 460198: baddocument.odt
vampieraplain2013-02-06 20:14:25
File Added - 460199: gooddocument.odt
dkfplain2013-02-06 21:49:55
Just for my understanding, aren't .odt files already compressed? I thought they were variations on the ZIP format.
vampieraplain2013-02-06 21:59:46
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.
dkfplain2013-02-06 22:01:37
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.
vampieraplain2013-02-06 22:23:30
Maybe. In attach a txt file greater 36K (also in gz format) It works.
vampieraplain2013-02-06 22:24:01
File Added - 460209: promessisposi.txt
dkfplain2013-02-06 22:29:34
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.
vampieraplain2013-02-06 22:41:49
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
vampieraplain2013-02-06 22:42:12
File Added - 460210: promessisposi256.txt
dkfplain2013-02-10 22:17:01
Confirmed that there's a problem. Switching to using [fcopy] and tinkering with simple [flush] use doesn't affect that. :-(
dkfplain2013-02-11 16:15:16
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.
Log in (anonymous is fine) to add a comment.
Attachments:
- promessisposi256.txt [download] added by vampiera on 2013-02-06 22:42:12. [details]
- promessisposi.txt [download] added by vampiera on 2013-02-06 22:24:01. [details]
- gooddocument.odt [download] added by vampiera on 2013-02-06 20:14:25. [details]
- baddocument.odt [download] added by vampiera on 2013-02-06 20:12:53. [details]