DataFrame/JLD2 @load crashes Julia 0.7

Where should I file this bug?

julia> using DataFrames, JLD2

julia> df = DataFrame(a=1:10, b=rand(10))
10×2 DataFrame
│ Row │ a  │ b        │
├─────┼────┼──────────┤
│ 1   │ 1  │ 0.332317 │
│ 2   │ 2  │ 0.114318 │
│ 3   │ 3  │ 0.789327 │
│ 4   │ 4  │ 0.725226 │
│ 5   │ 5  │ 0.651352 │
│ 6   │ 6  │ 0.20399  │
│ 7   │ 7  │ 0.456811 │
│ 8   │ 8  │ 0.567357 │
│ 9   │ 9  │ 0.534113 │
│ 10  │ 10 │ 0.959745 │

julia> @save "test_df.jld2" df

julia> @load "test_df.jld2" df

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 0x29b661c1 -- getproperty at .\sysimg.jl:18 [inlined]
length at C:\Users\TKwong\.julia\packages\DataFrames\QYzTe\src\other\index.jl:17 [inlined]
ncol at C:\Users\TKwong\.julia\packages\DataFrames\QYzTe\src\dataframe\dataframe.jl:229 [inlined]
insert_single_column! at C:\Users\TKwong\.julia\packages\DataFrames\QYzTe\src\dataframe\dataframe.jl:336
in expression starting at no file:0
index at C:\Users\TKwong\.julia\packages\DataFrames\QYzTe\src\dataframe\dataframe.jl:224 [inlined]
ncol at C:\Users\TKwong\.julia\packages\DataFrames\QYzTe\src\dataframe\dataframe.jl:229 [inlined]
insert_single_column! at C:\Users\TKwong\.julia\packages\DataFrames\QYzTe\src\dataframe\dataframe.jl:336
setindex! at C:\Users\TKwong\.julia\packages\DataFrames\QYzTe\src\dataframe\dataframe.jl:391 [inlined]
setproperty! at C:\Users\TKwong\.julia\packages\DataFrames\QYzTe\src\abstractdataframe\abstractdataframe.jl:241
jl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:1829
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2182
macro expansion at C:\Users\TKwong\.julia\packages\JLD2\IASHd\src\data.jl:1276 [inlined]
jlconvert at C:\Users\TKwong\.julia\packages\JLD2\IASHd\src\data.jl:1232
read_data at C:\Users\TKwong\.julia\packages\JLD2\IASHd\src\dataio.jl:37
jl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:1829
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2182
read_data at C:\Users\TKwong\.julia\packages\JLD2\IASHd\src\datasets.jl:149
load_dataset at C:\Users\TKwong\.julia\packages\JLD2\IASHd\src\datasets.jl:92
getindex at C:\Users\TKwong\.julia\packages\JLD2\IASHd\src\groups.jl:108
jl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:1829
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2182
read at C:\Users\TKwong\.julia\packages\JLD2\IASHd\src\JLD2.jl:326
#3 at C:\Users\TKwong\.julia\packages\JLD2\IASHd\src\loadsave.jl:77 [inlined]
#jldopen#31 at C:\Users\TKwong\.julia\packages\JLD2\IASHd\src\loadsave.jl:4
jl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:1829
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2182
jldopen at C:\Users\TKwong\.julia\packages\JLD2\IASHd\src\loadsave.jl:2
jl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:1829
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2182
do_call at /home/Administrator/buildbot/worker/package_win64/build/src\interpreter.c:324
eval_value at /home/Administrator/buildbot/worker/package_win64/build/src\interpreter.c:428
eval_stmt_value at /home/Administrator/buildbot/worker/package_win64/build/src\interpreter.c:363 [inlined]
eval_body at /home/Administrator/buildbot/worker/package_win64/build/src\interpreter.c:682
jl_interpret_toplevel_thunk_callback at /home/Administrator/buildbot/worker/package_win64/build/src\interpreter.c:799
unknown function (ip: FFFFFFFFFFFFFFFE)
unknown function (ip: 00000000112D1A4F)
unknown function (ip: 0000000000000006)
jl_toplevel_eval_flex at /home/Administrator/buildbot/worker/package_win64/build/src\toplevel.c:831
jl_toplevel_eval_in at /home/Administrator/buildbot/worker/package_win64/build/src\builtins.c:633
eval at .\boot.jl:319
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2182
eval_user_input at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\REPL\src\REPL.jl:85
macro expansion at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\REPL\src\REPL.jl:117 [inlined]
#28 at .\task.jl:262
jl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:1829
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2182
jl_apply at /home/Administrator/buildbot/worker/package_win64/build/src\julia.h:1538 [inlined]
start_task at /home/Administrator/buildbot/worker/package_win64/build/src\task.c:268
Allocations: 28880338 (Pool: 28874207; Big: 6131); GC: 61

Version Info:

julia> versioninfo()
Julia Version 0.7.0
Commit a4cb80f3ed (2018-08-08 06:46 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, skylake)

Same thing on Ubuntu Linux in REPL,
and in IJulia with “The kernel appears to have died. It will restart automatically.”

julia> versioninfo()
Julia Version 0.7.0
Commit a4cb80f3ed (2018-08-08 06:46 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-6770HQ CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, skylake)
(v0.7) pkg> build DataFrames
  Building CodecZlib → `~/.julia/packages/CodecZlib/wwgbh/deps/build.log`

julia> using DataFrames
[ Info: Recompiling stale cache file /home/gary/.julia/compiled/v0.7/DataFrames/AR9oZ.ji for DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0]
(v0.7) pkg> build JLD2
  Building CodecZlib → `~/.julia/packages/CodecZlib/wwgbh/deps/build.log`

julia> using JLD2
[ Info: Recompiling stale cache file /home/gary/.julia/compiled/v0.7/JLD2/O1EyT.ji for JLD2 [033835bb-8acc-5ee8-8aae-3f567f8a3819]

Someone just filed an issue:

https://github.com/simonster/JLD2.jl/issues/101

I have proposed a solution to the issue so hopefully this can be fixed soon - let us wait what package maintainers think (it affects all types that override setproperty!).

1 Like

Your fix works perfectly! Thanks!