fhs / ZipFile.jl

Read/Write ZIP archives in Julia
Other
50 stars 45 forks source link

EXCEPTION_ACCESS_VIOLATION when writing on Deflate mode on windows #51

Open felipenoris opened 5 years ago

felipenoris commented 5 years ago

I'm getting very weird errors when saving a file on Deflate mode on windows. It happens on Julia v1.0, but does not happen on Julia nightly. Also, on Store mode it works fine.

See https://ci.appveyor.com/project/felipenoris/xlsx-jl/builds/22387957/job/e9ljpdyq7okdjh0w .

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 0x7ffd3c0e1841 -- memmove at C:\windows\system32\msvcrt.dll (unknown line)
in expression starting at C:\projects\xlsx-jl\test\runtests.jl:1009
memmove at C:\windows\system32\msvcrt.dll (unknown line)
read_buf at C:\Users\appveyor\.julia\packages\ZipFile\p60bh\deps\usr\bin\libz-1.2.11.dll (unknown line)
fill_window at C:\Users\appveyor\.julia\packages\ZipFile\p60bh\deps\usr\bin\libz-1.2.11.dll (unknown line)
deflate_slow at C:\Users\appveyor\.julia\packages\ZipFile\p60bh\deps\usr\bin\libz-1.2.11.dll (unknown line)
deflate at C:\Users\appveyor\.julia\packages\ZipFile\p60bh\deps\usr\bin\libz-1.2.11.dll (unknown line)
write at C:\Users\appveyor\.julia\packages\ZipFile\p60bh\src\Zlib.jl:138
write at C:\Users\appveyor\.julia\packages\ZipFile\p60bh\src\Zlib.jl:156 [inlined]
write at C:\Users\appveyor\.julia\packages\ZipFile\p60bh\src\Zlib.jl:194 [inlined]
unsafe_write at .\io.jl:197
unknown function (ip: 00000000144FC3E9)
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2184
unsafe_write at C:\Users\appveyor\.julia\packages\ZipFile\p60bh\src\ZipFile.jl:543
macro expansion at .\gcutils.jl:87 [inlined]
write at .\strings\io.jl:164 [inlined]
print at .\strings\io.jl:166 [inlined]
dump_node at C:\Users\appveyor\.julia\packages\EzXML\DUxj7\src\node.jl:334
print at C:\Users\appveyor\.julia\packages\EzXML\DUxj7\src\node.jl:304 [inlined]
print at C:\Users\appveyor\.julia\packages\EzXML\DUxj7\src\document.jl:55 [inlined]
#writexlsx#33 at C:\projects\xlsx-jl\src\write.jl:59
#writexlsx at .\none:0
unknown function (ip: 000000001450366E)
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2184
macro expansion at C:\projects\xlsx-jl\test\runtests.jl:1014 [inlined]
macro expansion at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Test\src\Test.jl:1083 [inlined]
top-level scope at C:\projects\xlsx-jl\test\runtests.jl:1010
jl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:1831
jl_toplevel_eval_flex at /home/Administrator/buildbot/worker/package_win64/build/src\toplevel.c:799
jl_parse_eval_all at /home/Administrator/buildbot/worker/package_win64/build/src\ast.c:838
jl_load at /home/Administrator/buildbot/worker/package_win64/build/src\toplevel.c:839 [inlined]
jl_load_ at /home/Administrator/buildbot/worker/package_win64/build/src\toplevel.c:846
include at .\boot.jl:317 [inlined]
include_relative at .\loading.jl:1044
include at .\sysimg.jl:29
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2184
include at .\client.jl:392
jl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:1831
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2184
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:430
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:678
jl_interpret_toplevel_thunk_callback at /home/Administrator/buildbot/worker/package_win64/build/src\interpreter.c:806
unknown function (ip: FFFFFFFFFFFFFFFE)
unknown function (ip: 000000000301918F)
unknown function (ip: FFFFFFFFFFFFFFFF)
jl_toplevel_eval_flex at /home/Administrator/buildbot/worker/package_win64/build/src\toplevel.c:805
jl_toplevel_eval_flex at /home/Administrator/buildbot/worker/package_win64/build/src\toplevel.c:754
jl_toplevel_eval_in at /home/Administrator/buildbot/worker/package_win64/build/src\builtins.c:622
eval at .\boot.jl:319
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2184
exec_options at .\client.jl:243
_start at .\client.jl:425
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2184
jl_apply at /home/Administrator/buildbot/worker/package_win64/build/src\julia.h:1537 [inlined]
true_main at /home/Administrator/buildbot/worker/package_win64/build/ui\repl.c:112
wmain at /home/Administrator/buildbot/worker/package_win64/build/ui\repl.c:233
__tmainCRTStartup at /usr/src/debug/mingw64-x86_64-runtime-5.0.3-1/crt\crtexe.c:329
mainCRTStartup at /usr/src/debug/mingw64-x86_64-runtime-5.0.3-1/crt\crtexe.c:212
BaseThreadInitThunk at C:\windows\system32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\windows\SYSTEM32\ntdll.dll (unknown line)
Allocations: 34813193 (Pool: 34806630; Big: 6563); GC: 83
ERROR: Package XLSX errored during testing
Stacktrace:
 [1] pkgerror(::String, ::Vararg{String,N} where N) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Types.jl:120
 [2] #test#65(::Bool, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1357
 [3] #test at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:0 [inlined]
 [4] #test#42(::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:273
 [5] #test#41 at .\none:0 [inlined]
 [6] #test at .\none:0 [inlined]
 [7] #test#38 at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:252 [inlined]
 [8] (::getfield(Pkg.API, Symbol("#kw##test")))(::NamedTuple{(:coverage,),Tuple{Bool}}, ::typeof(Pkg.API.test)) at .\none:0
 [9] top-level scope at none:0
Command exited with code 1
norru commented 4 years ago

Can reproduce on Windows 10 too. Same code on Linux runs fine.

Julia 1.3.1 ZipFile v0.9.0

norru commented 4 years ago

I guess ZLib is being built against a version of msvcrt which doesn't match the one in the system. Can Zlib.dll be built with static linking?

c42f commented 4 years ago

Does #72 help with this?