{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/JLD.jl/issues/53","labels_url":"https://api.github.com/repos/JuliaLang/JLD.jl/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/JLD.jl/issues/53/comments","events_url":"https://api.github.com/repos/JuliaLang/JLD.jl/issues/53/events","html_url":"https://github.com/JuliaLang/JLD.jl/issues/53","id":130309032,"number":53,"title":"Multiple writes of complex types stop load from working","user":{"login":"oxinabox","id":5127634,"avatar_url":"https://avatars.githubusercontent.com/u/5127634?v=3","gravatar_id":"","url":"https://api.github.com/users/oxinabox","html_url":"https://github.com/oxinabox","followers_url":"https://api.github.com/users/oxinabox/followers","following_url":"https://api.github.com/users/oxinabox/following{/other_user}","gists_url":"https://api.github.com/users/oxinabox/gists{/gist_id}","starred_url":"https://api.github.com/users/oxinabox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxinabox/subscriptions","organizations_url":"https://api.github.com/users/oxinabox/orgs","repos_url":"https://api.github.com/users/oxinabox/repos","events_url":"https://api.github.com/users/oxinabox/events{/privacy}","received_events_url":"https://api.github.com/users/oxinabox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-01T09:34:30Z","updated_at":"2016-02-01T10:10:04Z","closed_at":null,"body":"Hi,\r\nIt seems there is a way to break type saving/loading,\r\nif you do multiple writes of a suitably complex type:\r\n\r\nThe MWE I could create is:\r\n\r\n```\r\nusing JLD\r\nusing HDF5\r\n\r\njldopen(\"example.jld\", \"w\") do fh\r\n    write(fh, \"weights\", [(:Heavy,100), (:Light,50)])\r\nend\r\njldopen(\"example.jld\", \"r+\") do fh\r\n    write(fh, \"otherweights\", [(:VeryHeavy, 200), (:VeryLight, 25)])\r\n\r\nend\r\nload(\"example.jld\")\r\n\r\n```\r\n\r\nwhen you try to do the load you get:\r\n```\r\nLoadError: stored type Core.Tuple{Core.Symbol,Core.Int64} does not match currently loaded type\r\nwhile loading In[5], in expression starting on line 9\r\n\r\n in jldatatype at /home/ubuntu/.julia/v0.5/JLD/src/jld_types.jl:689\r\n in read at /home/ubuntu/.julia/v0.5/JLD/src/JLD.jl:370\r\n in read_ref at /home/ubuntu/.julia/v0.5/JLD/src/JLD.jl:498\r\n in read_refs at /home/ubuntu/.julia/v0.5/JLD/src/JLD.jl:471\r\n in read_array at /home/ubuntu/.julia/v0.5/JLD/src/JLD.jl:407\r\n in read at /home/ubuntu/.julia/v0.5/JLD/src/JLD.jl:372\r\n in read at /home/ubuntu/.julia/v0.5/JLD/src/JLD.jl:346\r\n in anonymous at /home/ubuntu/.julia/v0.5/JLD/src/JLD.jl:1185\r\n in jldopen at /home/ubuntu/.julia/v0.5/JLD/src/JLD.jl:245\r\n [inlined code] from /home/ubuntu/.julia/v0.5/JLD/src/JLD.jl:243\r\n in load at /home/ubuntu/.julia/v0.5/JLD/src/JLD.jl:1184\r\n in load at /home/ubuntu/.julia/v0.5/FileIO/src/loadsave.jl:42\r\n [inlined code] from essentials.jl:114\r\n```\r\n\r\nhowever both `load(\"example.jld\",\"weights\")` and `load(\"example.jld\",\"otherweights\")` work.\r\nIt also works fine if they are both written at the same time.\r\n\r\n\r\nA few more examples of things that work leading up to it\r\nare on https://gist.github.com/oxinabox/95f71548345e8fc583\r\n\r\nThis is with \r\n\r\n> Julia Version 0.5.0-dev+1331\r\n> Commit 9d6dee5 (2015-11-18 04:38 UTC)\r\n> Platform Info:\r\n>   System: Linux (x86_64-linux-gnu)\r\n>   CPU: AMD Opteron 63xx class CPU\r\n>   WORD_SIZE: 64\r\n>   BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Piledriver)\r\n>   LAPACK: libopenblas64_\r\n>   LIBM: libopenlibm\r\n>   LLVM: libLLVM-3.3\r\n> \r\n> JLD                           0.5.7\r\n> HDF5                          0.5.7"},"comment":{"url":"https://api.github.com/repos/JuliaLang/JLD.jl/issues/comments/177890137","html_url":"https://github.com/JuliaLang/JLD.jl/issues/53#issuecomment-177890137","issue_url":"https://api.github.com/repos/JuliaLang/JLD.jl/issues/53","id":177890137,"user":{"login":"oxinabox","id":5127634,"avatar_url":"https://avatars.githubusercontent.com/u/5127634?v=3","gravatar_id":"","url":"https://api.github.com/users/oxinabox","html_url":"https://github.com/oxinabox","followers_url":"https://api.github.com/users/oxinabox/followers","following_url":"https://api.github.com/users/oxinabox/following{/other_user}","gists_url":"https://api.github.com/users/oxinabox/gists{/gist_id}","starred_url":"https://api.github.com/users/oxinabox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxinabox/subscriptions","organizations_url":"https://api.github.com/users/oxinabox/orgs","repos_url":"https://api.github.com/users/oxinabox/repos","events_url":"https://api.github.com/users/oxinabox/events{/privacy}","received_events_url":"https://api.github.com/users/oxinabox/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T10:10:04Z","updated_at":"2016-02-01T10:10:04Z","body":"Possibly related to https://github.com/JuliaLang/JLD.jl/issues/12\r\n\r\nPossibly identical\r\n"}}