.
D 2010-10-16T21:17:26
J comment Reported\sby\sJDC:\r\n\s\s\s\shttp://groups.google.com/group/starkit/browse_frm/thread/5827418f4a2b80e7\r\n\r\nPNG\sfiles\sread\sfrom\san\smk4vfs\scan\sfail\sto\sbe\sread.\s\sLikely\san\sissue\sin\svfs::zstreamed\sin\stclvfs.\r\n\r\nIt\shappens\son\snon-KitCreator\sTclkits\stoo.\r\n\r\n<hr\s/><i>rkeene\sadded\son\s2010-10-13\s15:29:31:</i><br\s/>\r\n<ol>\r\n\s\s<li>\r\n\s\s\s\sCreate\smk4vfs\r\n\s\s\s\s<ol>\r\n\s\s\s\s\s\s<li><tt>$\smkdir\sx.vfs</tt></li>\r\n\s\s\s\s\s\s<li><tt>$\scp\scross.png\sx.vfs/</tt></li>\r\n\s\s\s\s\s\s<li><tt>$\s./tclkit-8.5.9-linux-i686\ssdx.kit\swrap\sx</tt></li>\r\n\s\s\s\s\s\s<li><tt>1\supdates\sapplied</tt></li>\r\n\s\s\s\s</ol>\r\n\s\s</li>\r\n\s\s<li>\r\n\s\s\s\sTest\sreading\s"cross.png"\sfrom\sthe\smk4vfs\r\n\s\s\s\s<ol>\r\n\s\s\s\s\s\s<li><tt>%\svfs::mk4::Mount\sx\sx</tt></li>\r\n\s\s\s\s\s\s<li><tt>mk4vfs1</tt></li>\r\n\s\s\s\s\s\s<li><tt>%\scd\sx</tt></li>\r\n\s\s\s\s\s\s<li><tt>%\sglob\s*</tt></li>\r\n\s\s\s\s\s\s<li><tt>cross.png</tt></li>\r\n\s\s\s\s\s\s<li><tt>%\sset\sfd\s<nowiki>[open\scross.png]</nowiki></tt></li>\r\n\s\s\s\s\s\s<li><tt>mk7</tt></li>\r\n\s\s\s\s\s\s<li><tt>%\sfconfigure\s$fd\s-translation\sbinary</tt></li>\r\n\s\s\s\s\s\s<li><tt>%\sset\sdata\s<nowiki>[read\s$fd]</nowiki>;\sputs\s<nowiki>[string\slength\s$data]</nowiki></tt></li>\r\n\s\s\s\s\s\s<li><tt>655</tt></li>\r\n\s\s\s\s\s\s<li><tt>%\sbinary\sscan\s$data\sH*\sdata_hex</tt></li>\r\n\s\s\s\s\s\s<li><tt>1</tt></li>\r\n\s\s\s\s\s\s<li><tt>%\sputs\s$data_hex</tt></li>\r\n\s\s\s\s\s\s<li><tt>89504e470d0a1a0a0000000d49484452</tt></li>\r\n\s\s\s\s\s\s<li><tt>...</tt></li>\r\n\s\s\s\s\s\s<li><tt>d9fef59bc28563bc6cfd0672bba4c7db</tt></li>\r\n\s\s\s\s\s\s<li><tt>edbe140000000049454e44ae426082</tt></li>\r\n\s\s\s\s</ol>\r\n\s\s</li>\r\n</ol>\r\n\r\n\r\n<hr\s/><i>rkeene\sadded\son\s2010-10-13\s15:42:47:</i><br\s/>\r\nIt\sworks\sin\sthe\strivial\scase\sposted\spreviously,\sbut\sfails\swith\sthe\sfollowing\skit:\r\nhttp://code.google.com/p/wubwikit/downloads/detail?name=wub-20100922.kit\r\n\r\nIn\sthe\skit:\r\n<verbatim>\r\n%\sset\sfd\s[open\scross.png]\r\nmk7\r\n%\sfconfigure\s$fd\s-encoding\sbinary\r\n%\sset\sdata\s[read\s$fd];\sputs\s[string\slength\s$data]\r\n654\r\n%\sfile\sstat\scross.png\sx\r\n%\sparray\sx\r\nx(atime)\s\s\s=\s1285147347\r\nx(blksize)\s=\s135312827\r\nx(blocks)\s\s=\s583863729869319636\r\nx(ctime)\s\s\s=\s1285147347\r\nx(dev)\s\s\s\s\s=\s-143965300\r\nx(gid)\s\s\s\s\s=\s0\r\nx(ino)\s\s\s\s\s=\s0\r\nx(mode)\s\s\s\s=\s33279\r\nx(mtime)\s\s\s=\s1285147347\r\nx(nlink)\s\s\s=\s1\r\nx(size)\s\s\s\s=\s655\r\nx(type)\s\s\s\s=\sfile\r\nx(uid)\s\s\s\s\s=\s0\r\n</verbatim>\r\n\r\n<hr\s/><i>rkeene\sadded\son\s2010-10-13\s15:45:53:</i><br\s/>\r\nStill\snot\ssure\swhere\sthis\sis\sfailing.\r\n\r\n<verbatim>\r\n%\smk::loop\sx\sdb.dirs!90.files\s{\sputs\s"$x,\s[mk::get\s$x\sname]"\s}\r\ndb.dirs!90.files!0,\scross.png\r\ndb.dirs!90.files!1,\stick.png\r\ndb.dirs!90.files!2,\stclp.gif\r\n%\smk::view\sinfo\sdb.dirs!90.files\s\s\r\nname\ssize:I\sdate:I\scontents:B\r\n%\smk::get\sdb.dirs!90.files!0\ssize\r\n655\r\n%\sstring\slength\s[mk::get\sdb.dirs!90.files!0\scontents]\r\n655\r\n%\smk::get\sdb.dirs!90.files!0\s-size\scontents\r\n655\r\n%\r\n</verbatim>\r\n\r\n<hr\s/><i>rkeene\sadded\son\s2010-10-13\s15:52:42:</i><br\s/>\r\nOh,\swait\sI\sdid\s"-encoding\sbinary"\sin\smy\ssecond\stest\swhere\sit\sshould\shave\sbeen\s"-translation\sbinary".\r\n\r\nUsing\s"-translation\sbinary"\scauses\sit\sto\sbe\sread\scorrectly.\r\n\r\n<verbatim>\r\n%\sset\sfd\s[open\scross.png\sr]\r\nmk7\r\n%\sfconfigure\s$fd\s-translation\sbinary\s\s\s\s\s\s\s\s\s\r\n%\sset\sdata\s[read\s$fd];\sputs\s[string\slength\s$data]\r\n655\r\n%\sbinary\sscan\s$data\sH*\sdata_hex\r\n1\r\n</verbatim>\r\n\r\n<hr\s/><i>rkeene\sadded\son\s2010-10-16\s21:12:41:</i><br\s/>\r\nThe\sissue\sonly\soccurs\swhen\susing\s<nowiki>[fcopy]</nowiki>\sand\smk4vfs\schannels\swithout\sdirect\smode.\r\n\r\nSimple\stest:\r\n<verbatim>\r\nvfs::mk4::Mount\stest.mk\s/TEST\r\nset\sfd\s[open\s/TEST/cross.png]\r\nfconfigure\s$fd\s-translation\sbinary\r\nset\sout\s[open\s/dev/null\sw]\r\nset\s::fcopy_complete\s0\r\nproc\sfcopy_complete\s{args}\s{\sset\s::fcopy_complete\s1\s}\r\nfcopy\s$fd\s$out\s-command\sfcopy_complete\r\nafter\s3000\r\nupdate\r\nputs\s"FCOPY:\s$fcopy_complete"\r\n</verbatim>\r\n\r\n<hr\s/><i>rkeene\sadded\son\s2010-10-16\s21:14:10:</i><br\s/>\r\nP.\sThoyts\scame\sup\swith\sa\spatch\sfor\sthis:\s\shttp://github.com/patthoyts/kitgen/commit/3ee246892b79bb83c8c96a2646124c6da94bbd3e\r\n\r\n<hr\s/><i>rkeene\sadded\son\s2010-10-16\s21:15:12:</i><br\s/>\r\nPatch\sfrom\sP.\sThoyts\sfixes\sthe\sproblem,\sbut\sthe\stest\scase\ssegfaults\son\sexit.\r\n\r\nBacktrace\sfollows:\r\n<verbatim>\r\n(gdb)\sbt\r\n#0\s\s0x08075599\sin\sTcl_GetAssocData\s()\r\n#1\s\s0x0804d67a\sin\smkClose\s(instanceData=0x8170380,\sinterp=0x0)\sat\s../tcl/mk4tcl.cpp:326\r\n#2\s\s0x080b86de\sin\sTclFinalizeIOSubsystem\s()\r\n#3\s\s0x0809d004\sin\sTcl_FinalizeThread\s()\r\n#4\s\s0x0809d160\sin\sTcl_Finalize\s()\r\n#5\s\s0x0809d518\sin\sTcl_Exit\s()\r\n#6\s\s0x08080274\sin\sTcl_ExitObjCmd\s()\r\n#7\s\s0x08077903\sin\sTclEvalObjvInternal\s()\r\n#8\s\s0x0807857d\sin\sTcl_EvalEx\s()\r\n#9\s\s0x080bf7d7\sin\sTcl_FSEvalFile\s()\r\n#10\s0x080c2d52\sin\sTcl_Main\s()\r\n#11\s0x0804c2aa\sin\smain\s(argc=135724192,\sargv=0x2004)\sat\smain.c:11\r\n(gdb)\s\r\n</verbatim>
K 0990f53b1a77cacafccaf440d277edeae0cab70a
U rkeene
Z fc3fd3f493dda9f25851618a5aec8a3b