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\nrkeene\sadded\son\s2010-10-13\s15:29:31:\r\n
    \r\n\s\s
  1. \r\n\s\s\s\sCreate\smk4vfs\r\n\s\s\s\s
      \r\n\s\s\s\s\s\s
    1. $\smkdir\sx.vfs
    2. \r\n\s\s\s\s\s\s
    3. $\scp\scross.png\sx.vfs/
    4. \r\n\s\s\s\s\s\s
    5. $\s./tclkit-8.5.9-linux-i686\ssdx.kit\swrap\sx
    6. \r\n\s\s\s\s\s\s
    7. 1\supdates\sapplied
    8. \r\n\s\s\s\s
    \r\n\s\s
  2. \r\n\s\s
  3. \r\n\s\s\s\sTest\sreading\s"cross.png"\sfrom\sthe\smk4vfs\r\n\s\s\s\s
      \r\n\s\s\s\s\s\s
    1. %\svfs::mk4::Mount\sx\sx
    2. \r\n\s\s\s\s\s\s
    3. mk4vfs1
    4. \r\n\s\s\s\s\s\s
    5. %\scd\sx
    6. \r\n\s\s\s\s\s\s
    7. %\sglob\s*
    8. \r\n\s\s\s\s\s\s
    9. cross.png
    10. \r\n\s\s\s\s\s\s
    11. %\sset\sfd\s[open\scross.png]
    12. \r\n\s\s\s\s\s\s
    13. mk7
    14. \r\n\s\s\s\s\s\s
    15. %\sfconfigure\s$fd\s-translation\sbinary
    16. \r\n\s\s\s\s\s\s
    17. %\sset\sdata\s[read\s$fd];\sputs\s[string\slength\s$data]
    18. \r\n\s\s\s\s\s\s
    19. 655
    20. \r\n\s\s\s\s\s\s
    21. %\sbinary\sscan\s$data\sH*\sdata_hex
    22. \r\n\s\s\s\s\s\s
    23. 1
    24. \r\n\s\s\s\s\s\s
    25. %\sputs\s$data_hex
    26. \r\n\s\s\s\s\s\s
    27. 89504e470d0a1a0a0000000d49484452
    28. \r\n\s\s\s\s\s\s
    29. ...
    30. \r\n\s\s\s\s\s\s
    31. d9fef59bc28563bc6cfd0672bba4c7db
    32. \r\n\s\s\s\s\s\s
    33. edbe140000000049454e44ae426082
    34. \r\n\s\s\s\s
    \r\n\s\s
  4. \r\n
\r\n\r\n\r\nrkeene\sadded\son\s2010-10-13\s15:42:47:\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\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\r\n\r\nrkeene\sadded\son\s2010-10-13\s15:45:53:\r\nStill\snot\ssure\swhere\sthis\sis\sfailing.\r\n\r\n\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\r\n\r\nrkeene\sadded\son\s2010-10-13\s15:52:42:\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\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\r\n\r\nrkeene\sadded\son\s2010-10-16\s21:12:41:\r\nThe\sissue\sonly\soccurs\swhen\susing\s[fcopy]\sand\smk4vfs\schannels\swithout\sdirect\smode.\r\n\r\nSimple\stest:\r\n\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\r\n\r\nrkeene\sadded\son\s2010-10-16\s21:14:10:\r\nP.\sThoyts\scame\sup\swith\sa\spatch\sfor\sthis:\s\shttp://github.com/patthoyts/kitgen/commit/3ee246892b79bb83c8c96a2646124c6da94bbd3e\r\n\r\nrkeene\sadded\son\s2010-10-16\s21:15:12:\r\nPatch\sfrom\sP.\sThoyts\sfixes\sthe\sproblem,\sbut\sthe\stest\scase\ssegfaults\son\sexit.\r\n\r\nBacktrace\sfollows:\r\n\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 K 0990f53b1a77cacafccaf440d277edeae0cab70a U rkeene Z fc3fd3f493dda9f25851618a5aec8a3b