Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash when path not exists #204

Closed
ylxdzsw opened this issue Dec 30, 2017 · 2 comments
Closed

crash when path not exists #204

ylxdzsw opened this issue Dec 30, 2017 · 2 comments

Comments

@ylxdzsw
Copy link

ylxdzsw commented Dec 30, 2017

I'm using JLD on Windows. It crashes if the file path does not exist.

julia> using JLD

julia> versioninfo()
Julia Version 0.6.1
Commit 0d7248e2ff* (2017-10-24 22:15 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: AMD Ryzen 7 1700 Eight-Core Processor
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Barcelona)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, generic)

julia> save("../non_exist/w.jld", "w", [2])
HDF5-DIAG: Error detected in HDF5 (1.8.13) thread 0:
  #000: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5F.c line 1512 in H5Fcreate(): unable to create file
    major: File accessibilty
    minor: Unable to open file
  #001: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5F.c line 1301 in H5F_open(): unable to open file: time = Sun Dec 31 00:14:01 2017
, name = '../non_exist/w.jld', tent_flags = 13
    major: File accessibilty
    minor: Unable to open file
  #002: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5FD.c line 985 in H5FD_open(): open failed
    major: Virtual File Layer
    minor: Unable to initialize object
  #003: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5FDsec2.c line 343 in H5FD_sec2_open(): unable to open file: name = '../non_exist/w.jld', errno = 2, error message = 'No such file or directory', flags = 13, o_flags = 302
    major: File accessibilty
    minor: Unable to open file

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x64f1f284 -- jl_f_tuple at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\builtins.c:567
while loading no file, in expression starting on line 0
jl_f_tuple at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\builtins.c:567
eval_user_input at .\REPL.jl:78
unknown function (ip: 0000000061D25135)
jl_call_fptr_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:339 [inlined]
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:358 [inlined]
jl_apply_generic at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\gf.c:1926
macro expansion at .\REPL.jl:97 [inlined]
#1 at .\event.jl:73
unknown function (ip: 000000000BC324D3)
jl_call_fptr_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:339 [inlined]
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:358 [inlined]
jl_apply_generic at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\gf.c:1926
jl_apply at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia.h:1424 [inlined]
start_task at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\task.c:267
Allocations: 4715688 (Pool: 4713995; Big: 1693); GC: 8

This behaviour might be reasonable, but I lost all my work when I trying to save them in a REPL. If JLD is meant to be something like .mat, it shouldn't be so fragile to crash all works with a single mistake.

@ararslan
Copy link
Member

Does it work with JLD2?

@ylxdzsw
Copy link
Author

ylxdzsw commented Dec 31, 2017

Yes, It just throws an error. No crash occurs.
Thanks for pointing JLD2. It seems very good. I will use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants