-
Notifications
You must be signed in to change notification settings - Fork 36
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
Writing a Raster
to tif crashes Julia on apple M2
#343
Comments
I can't reproduce this, could it be an apple M2/rosetta problem? (likely in the netcdf binary rather than this package) |
Raster
to disk crashes JuliaRaster
to netcdf crashes Julia on apple M2
Yes. It is certainly a M2 related issue. Where should the issue then be reported precisely? |
Maybe try writing the same thing with NCDatasets.jl without using Rasters.jl. If it happens there too then that's the place. But even then, it might be in the C code binary NCDatasets.jl is calling |
Thanks. Will do so! |
Interestingly, using only NCDatasets.jl generates an error if not using absolute path julia> ds = NCDataset("./tmp/test.nc","c")
ERROR: NetCDF error: Permission denied (NetCDF error code: 13)
Stacktrace:
[1] check
@ ~/.julia/packages/NCDatasets/h1epE/src/errorhandling.jl:25 [inlined]
[2] nc_create(path::String, cmode::UInt16)
@ NCDatasets ~/.julia/packages/NCDatasets/h1epE/src/netcdf_c.jl:255
[3] NCDataset(filename::String, mode::String; format::Symbol, share::Bool, diskless::Bool, persist::Bool, memory::Nothing, attrib::Vector{Any})
@ NCDatasets ~/.julia/packages/NCDatasets/h1epE/src/dataset.jl:222
[4] NCDataset(filename::String, mode::String)
@ NCDatasets ~/.julia/packages/NCDatasets/h1epE/src/dataset.jl:163
[5] top-level scope
@ REPL[6]:3 However, using absolute path works. Trying to use absolute path in julia> write(joinpath(@__DIR__, "out_1.tif"), a)
signal (10): Bus error: 10
in expression starting at REPL[7]:1
unknown function (ip: 0x126e48af8)
Allocations: 52762119 (Pool: 52741466; Big: 20653); GC: 29
zsh: bus error |
Does Rasters.jl directly use |
Yes it's using NCDatasets.jl to write. But maybe some different options are triggering this bug. I'll have a look to see what it could be, but it will be hard without a mac handy. Is that the full error message? If I can see a stack trace we can maybe find out a bit more. |
In Julia yes. I don't know if I can get more out of Bus error from e.g. system logs or so. |
Yes it's hard to debug without a stack trace |
@luraess Could you test on say, 1.8.1? This feels like JuliaLang/julia#47193, although that turned out to be a problem in ArchGDAL (which was triggered by some changes in Julia itself). |
Turns out I was thrown by the inccorect issue title and mix of .nc and .tif extenstions being used - this is actually ArchGDAL.jl writing. |
Raster
to netcdf crashes Julia on apple M2Raster
to tif crashes Julia on apple M2
In that case, it should be fixed when using ArchGDAL >=0.9.4 |
I may do something not optimal here, but writing any Raster to disk results in the following
Bus error
leading to the crash of Julia.This is on M2 chip Mac:
The text was updated successfully, but these errors were encountered: