Artifacts Associated With Ticket 0990f53b1a
Ticket change [402055df96] (rid 853) by rkeene on 2010-10-13 14:59:38:
- comment initialized to:
Reported by JDC: http://groups.google.com/group/starkit/browse_frm/thread/5827418f4a2b80e7 PNG files read from an mk4vfs can fail to be read. Likely an issue in vfs::zstreamed in tclvfs. It happens on non-KitCreator Tclkits too.
- foundin initialized to: "0.5.2"
- private_contact initialized to: "346ea4e97beda2eb92a9ebba810f853dd2035948"
- severity initialized to: "Severe"
- status initialized to: "Open"
- title initialized to:
PNG files in Metakit4 VFSes fail to be read correctly
- type initialized to: "Code Defect"
- comment initialized to:
Add attachment "cross.png" [46090d3a50] (rid 855) by rkeene on 2010-10-13 15:09:04.
Ticket change [625c3d95ab] (rid 856) by rkeene on 2010-10-13 15:29:31:
- Appended to comment:
<hr /><i>rkeene added on 2010-10-13 15:29:31:</i><br /> <ol> <li> Create mk4vfs <ol> <li><tt>$ mkdir x.vfs</tt></li> <li><tt>$ cp cross.png x.vfs/</tt></li> <li><tt>$ ./tclkit-8.5.9-linux-i686 sdx.kit wrap x</tt></li> <li><tt>1 updates applied</tt></li> </ol> </li> <li> Test reading "cross.png" from the mk4vfs <ol> <li><tt>% vfs::mk4::Mount x x</li></tt> <li><tt>mk4vfs1</li></tt> <li><tt>% cd x</li></tt> <li><tt>% glob *</li></tt> <li><tt>cross.png</li></tt> <li><tt>% set fd <nowiki>[open cross.png]</nowiki></li></tt> <li><tt>mk7</li></tt> <li><tt>% fconfigure $fd -translation binary</li></tt> <li><tt>% set data <nowiki>[read $fd]</nowiki>; puts <nowiki>[string length $data]</nowiki></li></tt> <li><tt>655</li></tt> <li><tt>% binary scan $data H* data_hex</li></tt> <li><tt>1</li></tt> <li><tt>% puts $data_hex</li></tt> <li><tt>89504e470d0a1a0a0000000d49484452</li></tt> <li><tt>000000100000001008060000001ff3ff</li></tt> <li><tt>610000000467414d410000afc837058a</li></tt> <li><tt>e90000001974455874536f6674776172</li></tt> <li><tt>650041646f626520496d616765526561</li></tt> <li><tt>647971c9653c000002214944415438cb</li></tt> <li><tt>9593eb4e135114858989c989cfa05689</li></tt> <li><tt>86c89180c41b425b0628ad0d0826d0fb</li></tt> <li><tt>855ea480b4a5eda44da136ea0f4d7c12</li></tt> <li><tt>9f0b44c5deb0d299763ad3e5ae984a2d</li></tt> <li><tt>25e1c74ece64cefaf6acb5f70c0018b8</li></tt> <li><tt>4cd5d742d7ce3e775f10333a2ade57ec</li></tt> <li><tt>0f72d9ed8dd76c4e432fa02dceeca295</li></tt> <li><tt>ce428b277b20755f80d703613436b6f0</li></tt> <li><tt>ebe5cae7eae2d2bd7f80bf62e4dfa145</li></tt> <li><tt>a525443437b73b10d9bbc6a93b9ad138</li></tt> <li><tt>90cba37d3e365be3e519d39553402acd</li></tt> <li><tt>5a09516bedbe013e7e8296cdb5016804</li></tt> <li><tt>425cf6f8397587b21d03e8bdec0fe078</li></tt> <li><tt>feb95a16e6ae7659d06209a6be8ea99a</li></tt> <li><tt>9801de7f809a4aa31e0c83ba43d98a02</li></tt> <li><tt>d9bd3fe78ac942e259766e88cdc8266b</li></tt> <li><tt>84d6d5667487ecbc05f6f224cc01992c</li></tt> <li><tt>648f0f9539b35a9e9e61fda7701a1693</li></tt> <li><tt>5c5e0d59b2e3f6010e3720a651999dd7</li></tt> <li><tt>4a4681fd7fbf0720393ded5101340dd8</li></tt> <li><tt>9cc08a1dd849926f0b0a1353fc4280e4</li></tt> <li><tt>7073c9e581128e004991842920467628</li></tt> <li><tt>4079d58eb2de88ef63e3fc5c40cdeee2</li></tt> <li><tt>92d30d25b40ed01825870b14965a9c32</li></tt> <li><tt>68278bcb406403b517cb283c7c8cc3a1</li></tt> <li><tt>61de05a0cde2d41d4af015754d40a24f</li></tt> <li><tt>a7b0d4e2a481159e4cb0a3f1476ad564</li></tt> <li><tt>0682219c58ac381a19c5c1ad41de01d0</li></tt> <li><tt>6609359b034a200469d5010a4b2d3ed3</li></tt> <li><tt>7702fb3632c6be0edf577f1a0548d605</li></tt> <li><tt>fc187d80fd1b3aa1cb026d96505d5842</li></tt> <li><tt>c930ad51583d691fde1d625f06efa867</li></tt> <li><tt>c53d2196f446a1f07492f5fb990e74b7</li></tt> <li><tt>d9fef59bc28563bc6cfd0672bba4c7db</li></tt> <li><tt>edbe140000000049454e44ae426082</li></tt> </ol> </li> </ol>
- priority changed to: "Immediate"
- resolution changed to: "Open"
- subsystem changed to: "Tcl"
- Appended to comment:
Ticket change [3f6c6ead56] (rid 857) by rkeene on 2010-10-13 15:42:47:
- Appended to comment:
<hr /><i>rkeene added on 2010-10-13 15:42:47:</i><br /> It works in the trivial case posted previously, but fails with the following kit: http://code.google.com/p/wubwikit/downloads/detail?name=wub-20100922.kit In the kit: <verbatim> % set fd [open cross.png] mk7 % fconfigure $fd -encoding binary % set data [read $fd]; puts [string length $data] 654 % file stat cross.png x % parray x x(atime) = 1285147347 x(blksize) = 135312827 x(blocks) = 583863729869319636 x(ctime) = 1285147347 x(dev) = -143965300 x(gid) = 0 x(ino) = 0 x(mode) = 33279 x(mtime) = 1285147347 x(nlink) = 1 x(size) = 655 x(type) = file x(uid) = 0 </verbatim>
- Appended to comment:
Ticket change [2fca045077] (rid 858) by rkeene on 2010-10-13 15:45:53:
- Appended to comment:
<hr /><i>rkeene added on 2010-10-13 15:45:53:</i><br /> Still not sure where this is failing. <verbatim> % mk::loop x db.dirs!90.files { puts "$x, [mk::get $x name]" } db.dirs!90.files!0, cross.png db.dirs!90.files!1, tick.png db.dirs!90.files!2, tclp.gif % mk::view info db.dirs!90.files name size:I date:I contents:B % mk::get db.dirs!90.files!0 size 655 % string length [mk::get db.dirs!90.files!0 contents] 655 % mk::get db.dirs!90.files!0 -size contents 655 % </verbatim>
- Appended to comment:
Ticket change [ed7db63c32] (rid 859) by rkeene on 2010-10-13 15:52:42:
- Appended to comment:
<hr /><i>rkeene added on 2010-10-13 15:52:42:</i><br /> Oh, wait I did "-encoding binary" in my second test where it should have been "-translation binary". Using "-translation binary" causes it to be read correctly. <verbatim> % set fd [open cross.png r] mk7 % fconfigure $fd -translation binary % set data [read $fd]; puts [string length $data] 655 % binary scan $data H* data_hex 1 </verbatim>
- Appended to comment:
Ticket change [e49f89ab8d] (rid 863) by rkeene on 2010-10-16 21:12:41:
- Appended to comment:
<hr /><i>rkeene added on 2010-10-16 21:12:41:</i><br /> The issue only occurs when using [fcopy] and mk4vfs channels without direct mode. Simple test: <verbatim> vfs::mk4::Mount test.mk /TEST set fd [open /TEST/cross.png] fconfigure $fd -translation binary set out [open /dev/null w] set ::fcopy_complete 0 proc fcopy_complete {args} { set ::fcopy_complete 1 } fcopy $fd $out -command fcopy_complete after 3000 update puts "FCOPY: $fcopy_complete" </verbatim>
- subsystem changed to: "Mk4tcl"
- Appended to comment:
Ticket change [8761fe6055] (rid 864) by rkeene on 2010-10-16 21:13:32:
- comment changed to:
Reported by JDC: http://groups.google.com/group/starkit/browse_frm/thread/5827418f4a2b80e7 PNG files read from an mk4vfs can fail to be read. Likely an issue in vfs::zstreamed in tclvfs. It happens on non-KitCreator Tclkits too. <hr /><i>rkeene added on 2010-10-13 15:29:31:</i><br /> <ol> <li> Create mk4vfs <ol> <li><tt>$ mkdir x.vfs</tt></li> <li><tt>$ cp cross.png x.vfs/</tt></li> <li><tt>$ ./tclkit-8.5.9-linux-i686 sdx.kit wrap x</tt></li> <li><tt>1 updates applied</tt></li> </ol> </li> <li> Test reading "cross.png" from the mk4vfs <ol> <li><tt>% vfs::mk4::Mount x x</li></tt> <li><tt>mk4vfs1</li></tt> <li><tt>% cd x</li></tt> <li><tt>% glob *</li></tt> <li><tt>cross.png</li></tt> <li><tt>% set fd <nowiki>[open cross.png]</nowiki></li></tt> <li><tt>mk7</li></tt> <li><tt>% fconfigure $fd -translation binary</li></tt> <li><tt>% set data <nowiki>[read $fd]</nowiki>; puts <nowiki>[string length $data]</nowiki></li></tt> <li><tt>655</li></tt> <li><tt>% binary scan $data H* data_hex</li></tt> <li><tt>1</li></tt> <li><tt>% puts $data_hex</li></tt> <li><tt>89504e470d0a1a0a0000000d49484452</li></tt> <li><tt>000000100000001008060000001ff3ff</li></tt> <li><tt>610000000467414d410000afc837058a</li></tt> <li><tt>e90000001974455874536f6674776172</li></tt> <li><tt>650041646f626520496d616765526561</li></tt> <li><tt>647971c9653c000002214944415438cb</li></tt> <li><tt>9593eb4e135114858989c989cfa05689</li></tt> <li><tt>86c89180c41b425b0628ad0d0826d0fb</li></tt> <li><tt>855ea480b4a5eda44da136ea0f4d7c12</li></tt> <li><tt>9f0b44c5deb0d299763ad3e5ae984a2d</li></tt> <li><tt>25e1c74ece64cefaf6acb5f70c0018b8</li></tt> <li><tt>4cd5d742d7ce3e775f10333a2ade57ec</li></tt> <li><tt>0f72d9ed8dd76c4e432fa02dceeca295</li></tt> <li><tt>ce428b277b20755f80d703613436b6f0</li></tt> <li><tt>ebe5cae7eae2d2bd7f80bf62e4dfa145</li></tt> <li><tt>a525443437b73b10d9bbc6a93b9ad138</li></tt> <li><tt>90cba37d3e365be3e519d39553402acd</li></tt> <li><tt>5a09516bedbe013e7e8296cdb5016804</li></tt> <li><tt>425cf6f8397587b21d03e8bdec0fe078</li></tt> <li><tt>feb95a16e6ae7659d06209a6be8ea99a</li></tt> <li><tt>9801de7f809a4aa31e0c83ba43d98a02</li></tt> <li><tt>d9bd3fe78ac942e259766e88cdc8266b</li></tt> <li><tt>84d6d5667487ecbc05f6f224cc01992c</li></tt> <li><tt>648f0f9539b35a9e9e61fda7701a1693</li></tt> <li><tt>5c5e0d59b2e3f6010e3720a651999dd7</li></tt> <li><tt>4a4681fd7fbf0720393ded5101340dd8</li></tt> <li><tt>9cc08a1dd849926f0b0a1353fc4280e4</li></tt> <li><tt>7073c9e581128e004991842920467628</li></tt> <li><tt>4079d58eb2de88ef63e3fc5c40cdeee2</li></tt> <li><tt>92d30d25b40ed01825870b14965a9c32</li></tt> <li><tt>68278bcb406403b517cb283c7c8cc3a1</li></tt> <li><tt>61de05a0cde2d41d4af015754d40a24f</li></tt> <li><tt>a7b0d4e2a481159e4cb0a3f1476ad564</li></tt> <li><tt>0682219c58ac381a19c5c1ad41de01d0</li></tt> <li><tt>6609359b034a200469d5010a4b2d3ed3</li></tt> <li><tt>7702fb3632c6be0edf577f1a0548d605</li></tt> <li><tt>fc187d80fd1b3aa1cb026d96505d5842</li></tt> <li><tt>c930ad51583d691fde1d625f06efa867</li></tt> <li><tt>c53d2196f446a1f07492f5fb990e74b7</li></tt> <li><tt>d9fef59bc28563bc6cfd0672bba4c7db</li></tt> <li><tt>edbe140000000049454e44ae426082</li></tt> </ol> </li> </ol> <hr /><i>rkeene added on 2010-10-13 15:42:47:</i><br /> It works in the trivial case posted previously, but fails with the following kit: http://code.google.com/p/wubwikit/downloads/detail?name=wub-20100922.kit In the kit: <verbatim> % set fd [open cross.png] mk7 % fconfigure $fd -encoding binary % set data [read $fd]; puts [string length $data] 654 % file stat cross.png x % parray x x(atime) = 1285147347 x(blksize) = 135312827 x(blocks) = 583863729869319636 x(ctime) = 1285147347 x(dev) = -143965300 x(gid) = 0 x(ino) = 0 x(mode) = 33279 x(mtime) = 1285147347 x(nlink) = 1 x(size) = 655 x(type) = file x(uid) = 0 </verbatim> <hr /><i>rkeene added on 2010-10-13 15:45:53:</i><br /> Still not sure where this is failing. <verbatim> % mk::loop x db.dirs!90.files { puts "$x, [mk::get $x name]" } db.dirs!90.files!0, cross.png db.dirs!90.files!1, tick.png db.dirs!90.files!2, tclp.gif % mk::view info db.dirs!90.files name size:I date:I contents:B % mk::get db.dirs!90.files!0 size 655 % string length [mk::get db.dirs!90.files!0 contents] 655 % mk::get db.dirs!90.files!0 -size contents 655 % </verbatim> <hr /><i>rkeene added on 2010-10-13 15:52:42:</i><br /> Oh, wait I did "-encoding binary" in my second test where it should have been "-translation binary". Using "-translation binary" causes it to be read correctly. <verbatim> % set fd [open cross.png r] mk7 % fconfigure $fd -translation binary % set data [read $fd]; puts [string length $data] 655 % binary scan $data H* data_hex 1 </verbatim> <hr /><i>rkeene added on 2010-10-16 21:12:41:</i><br /> The issue only occurs when using <nowiki>[fcopy]</nowiki> and mk4vfs channels without direct mode. Simple test: <verbatim> vfs::mk4::Mount test.mk /TEST set fd [open /TEST/cross.png] fconfigure $fd -translation binary set out [open /dev/null w] set ::fcopy_complete 0 proc fcopy_complete {args} { set ::fcopy_complete 1 } fcopy $fd $out -command fcopy_complete after 3000 update puts "FCOPY: $fcopy_complete" </verbatim>
- comment changed to:
Ticket change [291f22cf85] (rid 865) by rkeene on 2010-10-16 21:14:10:
- Appended to comment:
<hr /><i>rkeene added on 2010-10-16 21:14:10:</i><br /> P. Thoyts came up with a patch for this: http://github.com/patthoyts/kitgen/commit/3ee246892b79bb83c8c96a2646124c6da94bbd3e
- Appended to comment:
Ticket change [02bfa82328] (rid 866) by rkeene on 2010-10-16 21:15:12:
- Appended to comment:
<hr /><i>rkeene added on 2010-10-16 21:15:12:</i><br /> Patch from P. Thoyts fixes the problem, but the test case segfaults on exit. Backtrace follows: <verbatim> (gdb) bt #0 0x08075599 in Tcl_GetAssocData () #1 0x0804d67a in mkClose (instanceData=0x8170380, interp=0x0) at ../tcl/mk4tcl.cpp:326 #2 0x080b86de in TclFinalizeIOSubsystem () #3 0x0809d004 in Tcl_FinalizeThread () #4 0x0809d160 in Tcl_Finalize () #5 0x0809d518 in Tcl_Exit () #6 0x08080274 in Tcl_ExitObjCmd () #7 0x08077903 in TclEvalObjvInternal () #8 0x0807857d in Tcl_EvalEx () #9 0x080bf7d7 in Tcl_FSEvalFile () #10 0x080c2d52 in Tcl_Main () #11 0x0804c2aa in main (argc=135724192, argv=0x2004) at main.c:11 (gdb) </verbatim>
- Appended to comment:
Ticket change [0cf55f14c8] (rid 867) by rkeene on 2010-10-16 21:17:26:
- comment changed to:
Reported by JDC: http://groups.google.com/group/starkit/browse_frm/thread/5827418f4a2b80e7 PNG files read from an mk4vfs can fail to be read. Likely an issue in vfs::zstreamed in tclvfs. It happens on non-KitCreator Tclkits too. <hr /><i>rkeene added on 2010-10-13 15:29:31:</i><br /> <ol> <li> Create mk4vfs <ol> <li><tt>$ mkdir x.vfs</tt></li> <li><tt>$ cp cross.png x.vfs/</tt></li> <li><tt>$ ./tclkit-8.5.9-linux-i686 sdx.kit wrap x</tt></li> <li><tt>1 updates applied</tt></li> </ol> </li> <li> Test reading "cross.png" from the mk4vfs <ol> <li><tt>% vfs::mk4::Mount x x</tt></li> <li><tt>mk4vfs1</tt></li> <li><tt>% cd x</tt></li> <li><tt>% glob *</tt></li> <li><tt>cross.png</tt></li> <li><tt>% set fd <nowiki>[open cross.png]</nowiki></tt></li> <li><tt>mk7</tt></li> <li><tt>% fconfigure $fd -translation binary</tt></li> <li><tt>% set data <nowiki>[read $fd]</nowiki>; puts <nowiki>[string length $data]</nowiki></tt></li> <li><tt>655</tt></li> <li><tt>% binary scan $data H* data_hex</tt></li> <li><tt>1</tt></li> <li><tt>% puts $data_hex</tt></li> <li><tt>89504e470d0a1a0a0000000d49484452</tt></li> <li><tt>...</tt></li> <li><tt>d9fef59bc28563bc6cfd0672bba4c7db</tt></li> <li><tt>edbe140000000049454e44ae426082</tt></li> </ol> </li> </ol> <hr /><i>rkeene added on 2010-10-13 15:42:47:</i><br /> It works in the trivial case posted previously, but fails with the following kit: http://code.google.com/p/wubwikit/downloads/detail?name=wub-20100922.kit In the kit: <verbatim> % set fd [open cross.png] mk7 % fconfigure $fd -encoding binary % set data [read $fd]; puts [string length $data] 654 % file stat cross.png x % parray x x(atime) = 1285147347 x(blksize) = 135312827 x(blocks) = 583863729869319636 x(ctime) = 1285147347 x(dev) = -143965300 x(gid) = 0 x(ino) = 0 x(mode) = 33279 x(mtime) = 1285147347 x(nlink) = 1 x(size) = 655 x(type) = file x(uid) = 0 </verbatim> <hr /><i>rkeene added on 2010-10-13 15:45:53:</i><br /> Still not sure where this is failing. <verbatim> % mk::loop x db.dirs!90.files { puts "$x, [mk::get $x name]" } db.dirs!90.files!0, cross.png db.dirs!90.files!1, tick.png db.dirs!90.files!2, tclp.gif % mk::view info db.dirs!90.files name size:I date:I contents:B % mk::get db.dirs!90.files!0 size 655 % string length [mk::get db.dirs!90.files!0 contents] 655 % mk::get db.dirs!90.files!0 -size contents 655 % </verbatim> <hr /><i>rkeene added on 2010-10-13 15:52:42:</i><br /> Oh, wait I did "-encoding binary" in my second test where it should have been "-translation binary". Using "-translation binary" causes it to be read correctly. <verbatim> % set fd [open cross.png r] mk7 % fconfigure $fd -translation binary % set data [read $fd]; puts [string length $data] 655 % binary scan $data H* data_hex 1 </verbatim> <hr /><i>rkeene added on 2010-10-16 21:12:41:</i><br /> The issue only occurs when using <nowiki>[fcopy]</nowiki> and mk4vfs channels without direct mode. Simple test: <verbatim> vfs::mk4::Mount test.mk /TEST set fd [open /TEST/cross.png] fconfigure $fd -translation binary set out [open /dev/null w] set ::fcopy_complete 0 proc fcopy_complete {args} { set ::fcopy_complete 1 } fcopy $fd $out -command fcopy_complete after 3000 update puts "FCOPY: $fcopy_complete" </verbatim> <hr /><i>rkeene added on 2010-10-16 21:14:10:</i><br /> P. Thoyts came up with a patch for this: http://github.com/patthoyts/kitgen/commit/3ee246892b79bb83c8c96a2646124c6da94bbd3e <hr /><i>rkeene added on 2010-10-16 21:15:12:</i><br /> Patch from P. Thoyts fixes the problem, but the test case segfaults on exit. Backtrace follows: <verbatim> (gdb) bt #0 0x08075599 in Tcl_GetAssocData () #1 0x0804d67a in mkClose (instanceData=0x8170380, interp=0x0) at ../tcl/mk4tcl.cpp:326 #2 0x080b86de in TclFinalizeIOSubsystem () #3 0x0809d004 in Tcl_FinalizeThread () #4 0x0809d160 in Tcl_Finalize () #5 0x0809d518 in Tcl_Exit () #6 0x08080274 in Tcl_ExitObjCmd () #7 0x08077903 in TclEvalObjvInternal () #8 0x0807857d in Tcl_EvalEx () #9 0x080bf7d7 in Tcl_FSEvalFile () #10 0x080c2d52 in Tcl_Main () #11 0x0804c2aa in main (argc=135724192, argv=0x2004) at main.c:11 (gdb) </verbatim>
- comment changed to:
Ticket change [950cd89836] (rid 872) by rkeene on 2010-10-16 21:29:57:
- Appended to comment:
<hr /><i>rkeene added on 2010-10-16 21:29:57:</i><br /> Fixed in [ae7d9fc61b].
- resolution changed to: "Fixed"
- status changed to: "Closed"
- Appended to comment: