Giter Club home page Giter Club logo

pngfiles.jl's Introduction

PNGFiles.jl

FileIO.jl integration for PNG files

Build Status Codecov

Installation

Installation is recommended via the ImageIO thin IO wrapper for FileIO:

pkg> add ImageIO  # Press ']' to enter te Pkg REPL mode.

Usage

Once ImageIO is installed, usage is as simple as:

using FileIO
save("img.png", rand(Gray, 100, 100))
img = load("img.png")

Or direct usage, if PNGFiles has been directly installed:

using PNGFiles
PNGFiles.save("img.png", rand(Gray, 100, 100))
img = PNGFiles.load("img.png")

pngfiles.jl's People

Contributors

contradict avatar dependabot[bot] avatar drvi avatar github-actions[bot] avatar gunnarfarneback avatar ianbutterworth avatar jaakkor2 avatar johnnychen94 avatar lwabeke avatar melonedo avatar ranocha avatar simondanisch avatar sjkelly avatar t-bltg avatar timholy avatar vtjnash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pngfiles.jl's Issues

Different png RGBA values using Julia, C or Python

Per https://discourse.julialang.org/t/reading-png-rgb-channels-julia-vs-python/73599.

Reproducer at https://github.com/t-bltg/PngPixel.jl.

Xref: JuliaIO/ImageIO.jl#41 (comment), @johnnychen94.
For reference, the image used here is a scaled version of toucan.png from TestImages.jl: $ convert toucan.png -scale 5% img.png.

Tested with #47 but still fails on 1.6.5 or 1.7.1 (official binaries):

(@v1.6) pkg> st
      Status `~/.julia/environments/v1.6/Project.toml`
  [3da002f7] ColorTypes v0.11.0
  [6218d12a] ImageMagick v1.2.2
  [f57f5aa1] PNGFiles v0.3.12 `https://github.com/JuliaIO/PNGFiles.jl.git#paletted_images_fix`
  [295af30f] Revise v3.2.1

julia> versioninfo()
Julia Version 1.6.5
Commit 9058264a69 (2021-12-19 12:30 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, sandybridge)

julia> using PNGFiles, Downloads

julia> (x->(Int(x.r.i), Int(x.g.i), Int(x.b.i), Int(x.alpha.i)))(PNGFiles.load(Downloads.download("https://aws1.discourse-cdn.com/business5/uploads/julialang/original/3X/5/c/5c5cdaa477dcae516c7183c3e710ef65a0bb6ab0.png"))[3,3])
(233, 173, 4, 244)  # correct

julia> (x->(Int(x.r.i), Int(x.g.i), Int(x.b.i), Int(x.alpha.i)))(PNGFiles.load(Downloads.download("https://raw.githubusercontent.com/t-bltg/PngPixel.jl/master/img.png"))[3,3])
(245, 214, 39, 244)  # please use this url, somehow, the .png files are different in size ^^^^^^^^^^^^^^^^

@Drvi , this is getting weird, maybe I changed the file when uploading to discourse, sorry about the confusion:

$ identify -verbose img.png | grep Filesize
  Filesize: 481B
$ convert img.png txt:- | grep '2,2:'
2,2: (59881,44461,1028,62708)  #E9AD04F4  rgba(233,173,4,0.956863)
$ identify -verbose 5c5cdaa477dcae516c7183c3e710ef65a0bb6ab0.png | grep Filesize
  Filesize: 329B
$ convert 5c5cdaa477dcae516c7183c3e710ef65a0bb6ab0.png txt:- | grep '2,2:'
2,2: (59881,44461,1028,62708)  #E9AD04F4  srgba(233,173,4,0.956863)

OK, so this a Srgba vs rgba thing, let's use the SRGB -> linear transformation (https://en.wikipedia.org/wiki/SRGB#Transformation) (sorry i'm not very familiar with images theory, is that correct ?)

julia> using PNGFiles, Downloads
julia> lin(x) = x > .04045 ? ((x + .055) / 1.055)^2.4 : x / 12.92
julia> img = PNGFiles.load(Downloads.download("https://raw.githubusercontent.com/t-bltg/PngPixel.jl/master/img.png"))
julia> round.(Int, 255lin.([img[3,3].r, img[3,3].g, img[3,3].b]))
3-element Vector{Int64}:
 233
 171  # NOK
   5  # NOK

GC error (EXCEPTION_ACCESS_VIOLATION) from libpng.dll?

While trying to display a bunch of images sequentially (like a movie) in Pluto.jl, I've been getting occasional (hard-to-reproduce) crashes on Windows 10, Julia 1.6-beta, PNGFiles.jl 0.3.5. I'm not even sure where to start with this stacktrace:

      From worker 6:
      From worker 6:    Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
      From worker 6:    Exception: EXCEPTION_ACCESS_VIOLATION at 0x278a061 -- jl_object_id_ at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:366 [inlined]
      From worker 6:    jl_object_id_ at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:343 [inlined]
      From worker 6:    jl_object_id at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:373
      From worker 6:    in expression starting at none:1
      From worker 6:    jl_object_id_ at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:366 [inlined]
      From worker 6:    jl_object_id_ at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:343 [inlined]
      From worker 6:    jl_object_id at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:373
      From worker 6:    type_hash at /cygdrive/c/buildbot/worker/package_win64/build/src\jltypes.c:981
      From worker 6:    typekey_hash at /cygdrive/c/buildbot/worker/package_win64/build/src\jltypes.c:993 [inlined]
      From worker 6:    lookup_type at /cygdrive/c/buildbot/worker/package_win64/build/src\jltypes.c:585
      From worker 6:    inst_datatype_inner at /cygdrive/c/buildbot/worker/package_win64/build/src\jltypes.c:1157
      From worker 6:    jl_inst_arg_tuple_type at /cygdrive/c/buildbot/worker/package_win64/build/src\jltypes.c:1424
      From worker 6:    arg_type_tuple at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:1823 [inlined]
      From worker 6:    jl_lookup_generic_ at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:2350
      From worker 6:    jl_apply_generic at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:2402
      From worker 6:    _writecallback at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:422
      From worker 6:    unknown function (ip: 0000000001338805)
      From worker 6:    .text at C:\Users\alexa\.julia\artifacts\0407eb942f4c6c53c9bcc1eeccf3def7b46d6cc7\bin\libpng16.dll (unknown line)
      From worker 6:    png_write_chunk_header at C:\Users\alexa\.julia\artifacts\0407eb942f4c6c53c9bcc1eeccf3def7b46d6cc7\bin\libpng16.dll (unknown line)
      From worker 6:    png_write_complete_chunk at C:\Users\alexa\.julia\artifacts\0407eb942f4c6c53c9bcc1eeccf3def7b46d6cc7\bin\libpng16.dll (unknown line)
      From worker 6:    png_compress_IDAT at C:\Users\alexa\.julia\artifacts\0407eb942f4c6c53c9bcc1eeccf3def7b46d6cc7\bin\libpng16.dll (unknown line)
      From worker 6:    png_write_filtered_row at C:\Users\alexa\.julia\artifacts\0407eb942f4c6c53c9bcc1eeccf3def7b46d6cc7\bin\libpng16.dll (unknown line)
      From worker 6:    png_write_find_filter at C:\Users\alexa\.julia\artifacts\0407eb942f4c6c53c9bcc1eeccf3def7b46d6cc7\bin\libpng16.dll (unknown line)
      From worker 6:    png_write_row at C:\Users\alexa\.julia\artifacts\0407eb942f4c6c53c9bcc1eeccf3def7b46d6cc7\bin\libpng16.dll (unknown line)
      From worker 6:    png_write_image at C:\Users\alexa\.julia\artifacts\0407eb942f4c6c53c9bcc1eeccf3def7b46d6cc7\bin\libpng16.dll (unknown line)
      From worker 6:    _write_image at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:426 [inlined]
      From worker 6:    #_save#15 at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:414
      From worker 6:    _save##kw at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:344
      From worker 6:    #13 at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:326
      From worker 6:    maybe_lock at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:36 [inlined]
      From worker 6:    maybe_lock at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:38 [inlined]
      From worker 6:    #save#12 at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:323
      From worker 6:    save at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:315
      From worker 6:    jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
      From worker 6:    do_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:672
      From worker 6:    jl_f__apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:686 [inlined]
      From worker 6:    jl_f__apply_latest at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:722
      From worker 6:    #invokelatest#2 at .\essentials.jl:707
      From worker 6:    jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
      From worker 6:    do_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:672
      From worker 6:    invokelatest at .\essentials.jl:706
      From worker 6:    jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
      From worker 6:    do_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:672
      From worker 6:    #save#7 at C:\Users\alexa\.julia\packages\ImageIO\uPn5K\src\ImageIO.jl:46
      From worker 6:    save##kw at C:\Users\alexa\.julia\packages\ImageIO\uPn5K\src\ImageIO.jl:41
      From worker 6:    inner at .\essentials.jl:710
      From worker 6:    unknown function (ip: 0000000001336633)
      From worker 6:    jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
      From worker 6:    do_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:672
      From worker 6:    jl_f__apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:686 [inlined]
      From worker 6:    jl_f__apply_latest at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:722
      From worker 6:    #invokelatest#2 at .\essentials.jl:711
      From worker 6:    jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
      From worker 6:    do_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:672
      From worker 6:    invokelatest##kw at .\essentials.jl:706
      From worker 6:    #save#33 at C:\Users\alexa\.julia\packages\FileIO\TyKdX\src\loadsave.jl:233
      From worker 6:    save##kw at C:\Users\alexa\.julia\packages\FileIO\TyKdX\src\loadsave.jl:217
      From worker 6:    #show#13 at C:\Users\alexa\.julia\packages\ImageShow\9kpaq\src\showmime.jl:43
      From worker 6:    unknown function (ip: 000000000134af2b)
      From worker 6:    show at C:\Users\alexa\.julia\packages\ImageShow\9kpaq\src\showmime.jl:28
      From worker 6:    unknown function (ip: 000000000134a684)
      From worker 6:    show_richest at C:\Users\alexa\.julia\packages\Pluto\luIaC\src\runner\PlutoRunner.jl:601
      From worker 6:    unknown function (ip: 000000005f3455b4)
      From worker 6:    #sprint_withreturned#28 at C:\Users\alexa\.julia\packages\Pluto\luIaC\src\runner\PlutoRunner.jl:549
      From worker 6:    sprint_withreturned##kw at C:\Users\alexa\.julia\packages\Pluto\luIaC\src\runner\PlutoRunner.jl:548
      From worker 6:    unknown function (ip: 000000000134a398)
      From worker 6:    format_output_default at C:\Users\alexa\.julia\packages\Pluto\luIaC\src\runner\PlutoRunner.jl:474
      From worker 6:    #format_output#17 at C:\Users\alexa\.julia\packages\Pluto\luIaC\src\runner\PlutoRunner.jl:491 [inlined]
      From worker 6:    format_output##kw at C:\Users\alexa\.julia\packages\Pluto\luIaC\src\runner\PlutoRunner.jl:491
      From worker 6:    unknown function (ip: 000000005f341e04)
      From worker 6:    formatted_result_of at C:\Users\alexa\.julia\packages\Pluto\luIaC\src\runner\PlutoRunner.jl:416
      From worker 6:    unknown function (ip: 000000005f337666)
      From worker 6:    jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
      From worker 6:    do_call at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:115
      From worker 6:    eval_value at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:204
      From worker 6:    eval_stmt_value at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:155 [inlined]
      From worker 6:    eval_body at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:575
      From worker 6:    jl_interpret_toplevel_thunk at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:669
      From worker 6:    jl_toplevel_eval_flex at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:879
      From worker 6:    jl_toplevel_eval at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:888 [inlined]
      From worker 6:    jl_toplevel_eval_in at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:931
      From worker 6:    eval at .\boot.jl:360
      From worker 6:    jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
      From worker 6:    do_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:672
      From worker 6:    #106 at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Distributed\src\process_messages.jl:278
      From worker 6:    run_work_thunk at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Distributed\src\process_messages.jl:63
      From worker 6:    macro expansion at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Distributed\src\process_messages.jl:278 [inlined]
      From worker 6:    #105 at .\task.jl:406
      From worker 6:    unknown function (ip: 000000005f330ae3)
      From worker 6:    jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
      From worker 6:    start_task at /cygdrive/c/buildbot/worker/package_win64/build/src\task.c:839
      From worker 6:    Allocations: 266574933 (Pool: 266499444; Big: 75489); GC: 232
      From worker 6:    GC error (probable corruption) :
      From worker 6:    Allocations: 266913264 (Pool: 266837633; Big: 75631); GC: 232
      From worker 6:    <?#000000007c589f80::0000000000000000>
      From worker 6:    0000000091007040: Queued root: 000000001b8a0970 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    0000000091007058: Queued root: 000000001d089ed0 :: 0000000010348fb0 (bits: 3)
      From worker 6:            of type Base.IdDict{Any, Any}
      From worker 6:    0000000091007070: Queued root: 0000000019b30650 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    0000000091007088: Queued root: 0000000013500c70 :: 000000001072fd50 (bits: 3)
      From worker 6:            of type Base.Dict{Distributed.RRID, Any}
      From worker 6:    00000000910070a0: Queued root: 000000007a011f50 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    00000000910070b8: Queued root: 000000007a31d910 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    00000000910070d0: Queued root: 00000000b2052240 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910070e8: Queued root: 00000000b205a140 :: 000000001a4ff850 (bits: 3)
      From worker 6:            of type Array{Base.Dict{Tuple{UInt64, Int64}, Int64}, 1}
      From worker 6:    0000000091007100: Queued root: 000000001d180eb0 :: 0000000010115cb0 (bits: 3)
      From worker 6:            of type Module
      From worker 6:    0000000091007118: Queued root: 000000001c8f9910 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    0000000091007130: Queued root: 000000007ab5f5a0 :: 00000000102b74d0 (bits: 3)
      From worker 6:            of type Core.Box
      From worker 6:    0000000091007148: Queued root: 0000000013daf330 :: 0000000010348fb0 (bits: 3)
      From worker 6:            of type Base.IdDict{Any, Any}
      From worker 6:    0000000091007160: Queued root: 000000001c743080 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    0000000091007178: Queued root: 000000001028f900 :: 0000000010115cb0 (bits: 3)
      From worker 6:            of type Module
      From worker 6:    0000000091007190: Queued root: 0000000019c40010 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    00000000910071a8: Queued root: 000000008270dc30 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    00000000910071c0: Queued root: 0000000019c3c010 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    00000000910071d8: Queued root: 000000008270d910 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    00000000910071f0: Queued root: 0000000019c38010 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    0000000091007208: Queued root: 000000008270e590 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    0000000091007220: Queued root: 0000000019c34010 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    0000000091007238: Queued root: 000000008270ddc0 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    0000000091007250: Queued root: 0000000019c30010 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    0000000091007268: Queued root: 000000008270d5f0 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    0000000091007280: Queued root: 0000000019c2c010 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    0000000091007298: Queued root: 000000008270daa0 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    00000000910072b0: Queued root: 0000000019c28010 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    00000000910072c8: Queued root: 000000008270e0e0 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    00000000910072e0: Queued root: 0000000019b30010 :: 0000000010361610 (bits: 3)
      From worker 6:            of type Task
      From worker 6:    00000000910072f8: Queued root: 000000001c4511f0 :: 00000000102467d0 (bits: 3)
      From worker 6:            of type Method
      From worker 6:    0000000091007310: Queued root: 00000000818be470 :: 0000000010115e80 (bits: 3)
      From worker 6:            of type Core.MethodTable
      From worker 6:    0000000091007328: Queued root: 000000001c666ab0 :: 00000000102467d0 (bits: 3)
      From worker 6:            of type Method
      From worker 6:    0000000091007340: Queued root: 0000000081953cd0 :: 0000000010115e80 (bits: 3)
      From worker 6:            of type Core.MethodTable
      From worker 6:    0000000091007358: Queued root: 00000000101453c0 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007370: Queued root: 000000007b10a6d0 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007388: Queued root: 000000009d9cf480 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910073a0: Queued root: 0000000012a450c0 :: 00000000102467d0 (bits: 3)
      From worker 6:            of type Method
      From worker 6:    00000000910073b8: Queued root: 000000009e556240 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910073d0: Queued root: 000000007c492210 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    00000000910073e8: Queued root: 00000000b21c36c0 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007400: Queued root: 0000000012a448f0 :: 00000000102467d0 (bits: 3)
      From worker 6:            of type Method
      From worker 6:    0000000091007418: Queued root: 000000001bb16590 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007430: Queued root: 000000007c73acb0 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007448: Queued root: 000000001cff0bf0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007460: Queued root: 0000000012a443b0 :: 00000000102467d0 (bits: 3)
      From worker 6:            of type Method
      From worker 6:    0000000091007478: Queued root: 0000000012a51980 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007490: Queued root: 0000000012a4ab70 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910074a8: Queued root: 00000000120f0fa0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910074c0: Queued root: 0000000011ccfa30 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    00000000910074d8: Queued root: 0000000013b133a0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910074f0: Queued root: 00000000b23de700 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007508: Queued root: 000000008a3ffda0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007520: Queued root: 0000000011ccee40 :: 00000000102467d0 (bits: 3)
      From worker 6:            of type Method
      From worker 6:    0000000091007538: Queued root: 000000007a2d44a0 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007550: Queued root: 0000000011cb4d20 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007568: Queued root: 0000000084917eb0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007580: Queued root: 00000000133fbc70 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007598: Queued root: 000000001248a430 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910075b0: Queued root: 0000000010b3ffa0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910075c8: Queued root: 000000001b7eafb0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910075e0: Queued root: 0000000011ca11e0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910075f8: Queued root: 0000000012fc93c0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007610: Queued root: 0000000011f7efa0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007628: Queued root: 0000000013064aa0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007640: Queued root: 000000001374dcf0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007658: Queued root: 000000001c666c10 :: 00000000102467d0 (bits: 3)
      From worker 6:            of type Method
      From worker 6:    0000000091007670: Queued root: 0000000081953df0 :: 0000000010115e80 (bits: 3)
      From worker 6:            of type Core.MethodTable
      From worker 6:    0000000091007688: Queued root: 0000000011515760 :: 00000000102467d0 (bits: 3)
      From worker 6:            of type Method
      From worker 6:    00000000910076a0: Queued root: 000000008c41c930 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910076b8: Queued root: 000000008c78a620 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    00000000910076d0: Queued root: 0000000011515440 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910076e8: Queued root: 00000000882b1ba0 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007700: Queued root: 0000000010cd1730 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007718: Queued root: 000000007cc90bb0 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007730: Queued root: 00000000a43d0ec0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007748: Queued root: 000000007e2e2800 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007760: Queued root: 000000001d870240 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007778: Queued root: 000000007e55d8c0 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007790: Queued root: 000000007e4c2740 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    00000000910077a8: Queued root: 000000001cc63f30 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910077c0: Queued root: 00000000ab402180 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    00000000910077d8: Queued root: 000000007e4d2500 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910077f0: Queued root: 000000007e2daf80 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007808: Queued root: 000000001b3a2fe0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007820: Queued root: 000000009d291780 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007838: Queued root: 0000000067b6ff80 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007850: Queued root: 0000000011c688b0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007868: Queued root: 00000000132d7d20 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007880: Queued root: 0000000014470020 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007898: Queued root: 00000000117e8f20 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910078b0: Queued root: 000000009da91a00 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    00000000910078c8: Queued root: 0000000067b74040 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910078e0: Queued root: 0000000010484310 :: 00000000102467d0 (bits: 3)
      From worker 6:            of type Method
      From worker 6:    00000000910078f8: Queued root: 00000000131b8950 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007910: Queued root: 00000000852ea920 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007928: Queued root: 000000007eee46c0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007940: Queued root: 000000006798c0c0 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007958: Queued root: 00000000b56abf80 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007970: Queued root: 00000000231184c0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007988: Queued root: 0000000085302490 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    00000000910079a0: Queued root: 00000000b27cebc0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910079b8: Queued root: 00000000796b3b60 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    00000000910079d0: Queued root: 000000009d9bbe80 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910079e8: Queued root: 00000000ab4c0c00 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007a00: Queued root: 000000009e8c4080 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007a18: Queued root: 0000000012b45ce0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007a30: Queued root: 0000000082efe490 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007a48: Queued root: 000000009e8c8140 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007a60: Queued root: 000000007a2316e0 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007a78: Queued root: 00000000106e94d0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007a90: Queued root: 0000000012845af0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007aa8: Queued root: 00000000132b3f50 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007ac0: Queued root: 0000000085302920 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007ad8: Queued root: 000000007ebffec0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007af0: Queued root: 0000000082bc6650 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007b08: Queued root: 0000000014509d60 :: 00000000102467d0 (bits: 3)
      From worker 6:            of type Method
      From worker 6:    0000000091007b20: Queued root: 000000001d642cb0 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007b38: Queued root: 00000000ab1df280 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007b50: Queued root: 0000000082effb60 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007b68: Queued root: 00000000ab4c5280 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007b80: Queued root: 000000001317c900 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007b98: Queued root: 000000001318c160 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007bb0: Queued root: 00000000105ad290 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007bc8: Queued root: 0000000011524df0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007be0: Queued root: 00000000112e6340 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007bf8: Queued root: 0000000012492620 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007c10: Queued root: 00000000121dde10 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007c28: Queued root: 0000000012a022a0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007c40: Queued root: 000000001151e980 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007c58: Queued root: 0000000084917790 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007c70: Queued root: 000000001169ed30 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007c88: Queued root: 0000000084917c70 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007ca0: Queued root: 000000001151a7a0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007cb8: Queued root: 000000001b6ef8b0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007cd0: Queued root: 000000001151a050 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007ce8: Queued root: 000000008369fc70 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007d00: Queued root: 0000000010b3c6d0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007d18: Queued root: 000000008ca28710 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007d30: Queued root: 000000001d9f4850 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007d48: Queued root: 0000000011e78bd0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007d60: Queued root: 000000008ca28630 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007d78: Queued root: 000000001c77b090 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007d90: Queued root: 0000000013501c50 :: 00000000102467d0 (bits: 3)
      From worker 6:            of type Method
      From worker 6:    0000000091007da8: Queued root: 0000000013501b10 :: 0000000010115e80 (bits: 3)
      From worker 6:            of type Core.MethodTable
      From worker 6:    0000000091007dc0: Queued root: 000000002291f1c0 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007dd8: Queued root: 000000007e58b100 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007df0: Queued root: 0000000014873950 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007e08: Queued root: 000000007d9c7f40 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007e20: Queued root: 000000007e589ac0 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007e38: Queued root: 000000001461c0b0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007e50: Queued root: 0000000011b397a0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007e68: Queued root: 0000000013504500 :: 00000000102467d0 (bits: 3)
      From worker 6:            of type Method
      From worker 6:    0000000091007e80: Queued root: 0000000013504320 :: 0000000010115e80 (bits: 3)
      From worker 6:            of type Core.MethodTable
      From worker 6:    0000000091007e98: Queued root: 000000001355cf90 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007eb0: Queued root: 0000000013583f60 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007ec8: Queued root: 000000001355cee0 :: 00000000102467d0 (bits: 3)
      From worker 6:            of type Method
      From worker 6:    0000000091007ee0: Queued root: 000000009df8a400 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007ef8: Queued root: 0000000013c50f50 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007f10: Queued root: 0000000011540170 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007f28: Queued root: 00000000119d0a10 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007f40: Queued root: 00000000145de000 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007f58: Queued root: 000000001b6b17d0 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007f70: Queued root: 000000001abdc160 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091007f88: Queued root: 000000001b0da4f0 :: 0000000010246c10 (bits: 3)
      From worker 6:            of type Core.MethodInstance
      From worker 6:    0000000091007fa0: Queued root: 000000001b0da2c0 :: 0000000010246c10 (bits: 3)
      From worker 6:            of type Core.MethodInstance
      From worker 6:    0000000091007fb8: Queued root: 000000001b04d9b0 :: 0000000010246c10 (bits: 3)
      From worker 6:            of type Core.MethodInstance
      From worker 6:    0000000091007fd0: Queued root: 000000001ab88240 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091007fe8: Queued root: 000000001a408a90 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008000: Queued root: 000000007d9dd440 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091008018: Queued root: 000000007e2debc0 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091008030: Queued root: 000000009fae0d80 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091008048: Queued root: 000000007d8e1600 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091008060: Queued root: 0000000022af6200 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091008078: Queued root: 000000009ffd4080 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091008090: Queued root: 00000000b24422c0 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    00000000910080a8: Queued root: 0000000013160af0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910080c0: Queued root: 00000000130ab4e0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910080d8: Queued root: 0000000012b7b0c0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910080f0: Queued root: 0000000011ecaf00 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008108: Queued root: 000000001b9c48b0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008120: Queued root: 0000000011ece040 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008138: Queued root: 0000000011b37f30 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008150: Queued root: 000000001052c8c0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008168: Queued root: 0000000010445a30 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008180: Queued root: 0000000086c84d90 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008198: Queued root: 0000000012d869c0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910081b0: Queued root: 00000000127e03b0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910081c8: Queued root: 00000000118a6950 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910081e0: Queued root: 000000001456f4b0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910081f8: Queued root: 0000000013726df0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008210: Queued root: 000000001349cbd0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008228: Queued root: 000000001bb0cf10 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008240: Queued root: 000000001197a950 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008258: Queued root: 0000000012aacda0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008270: Queued root: 00000000126fa390 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008288: Queued root: 000000001245b9d0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910082a0: Queued root: 00000000134b00e0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910082b8: Queued root: 00000000134b2bc0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910082d0: Queued root: 0000000012233ec0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910082e8: Queued root: 0000000012f91c50 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008300: Queued root: 00000000114129f0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008318: Queued root: 0000000011412c10 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008330: Queued root: 000000001bb0cf70 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008348: Queued root: 000000001bb0cfd0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008360: Queued root: 000000001279dd90 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008378: Queued root: 00000000127c10f0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008390: Queued root: 000000001bb0d030 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910083a8: Queued root: 000000001bb0d090 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910083c0: Queued root: 000000001bb0d0f0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910083d8: Queued root: 000000001197a6e0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910083f0: Queued root: 0000000014093c10 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008408: Queued root: 00000000128498a0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008420: Queued root: 0000000013267590 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008438: Queued root: 000000001b6cd510 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008450: Queued root: 000000001bb0d1b0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008468: Queued root: 00000000119c1ca0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008480: Queued root: 0000000012826f80 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008498: Queued root: 00000000119248d0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910084b0: Queued root: 0000000012081750 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910084c8: Queued root: 000000001bb0d330 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910084e0: Queued root: 000000001bb0d390 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910084f8: Queued root: 000000001bb0d3f0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008510: Queued root: 00000000133fc920 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008528: Queued root: 0000000014537390 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008540: Queued root: 0000000012d98fc0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008558: Queued root: 0000000012d92640 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008570: Queued root: 00000000135048c0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008588: Queued root: 000000001bc8a290 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910085a0: Queued root: 000000007ae06890 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910085b8: Queued root: 000000001251eab0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910085d0: Queued root: 000000001bb6a3b0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910085e8: Queued root: 00000000114102b0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008600: Queued root: 0000000012e13350 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008618: Queued root: 000000001bb6a470 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008630: Queued root: 0000000013504630 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008648: Queued root: 0000000011f07060 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008660: Queued root: 000000001139f470 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008678: Queued root: 00000000796b1b70 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091008690: Queued root: 000000001341af40 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910086a8: Queued root: 000000001341aa10 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910086c0: Queued root: 0000000011e70ba0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910086d8: Queued root: 000000007b2cc430 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910086f0: Queued root: 0000000011b5ee40 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008708: Queued root: 000000008747fb60 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091008720: Queued root: 0000000012234500 :: 00000000102467d0 (bits: 3)
      From worker 6:            of type Method
      From worker 6:    0000000091008738: Queued root: 00000000852e8010 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    0000000091008750: Queued root: 0000000013546b40 :: 00000000102467d0 (bits: 3)
      From worker 6:            of type Method
      From worker 6:    0000000091008768: Queued root: 00000000135461d0 :: 0000000010115e80 (bits: 3)
      From worker 6:            of type Core.MethodTable
      From worker 6:    0000000091008780: Queued root: 0000000013544c90 :: 0000000010112160 (bits: 3)
      From worker 6:            of type Core.TypeName
      From worker 6:    0000000091008798: Queued root: 000000001bef1250 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    00000000910087b0: Queued root: 000000001bef16e0 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    00000000910087c8: Queued root: 000000001bef1b70 :: 0000000010115d70 (bits: 3)
      From worker 6:            of type Core.SimpleVector
      From worker 6:    00000000910087e0: Queued root: 00000000148a5d20 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910087f8: Queued root: 00000000148c0500 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008810: Queued root: 00000000116f2e20 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008828: Queued root: 0000000013546c80 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008840: Queued root: 000000001279e430 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008858: Queued root: 00000000116f6910 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008870: Queued root: 0000000010aab950 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008888: Queued root: 00000000133d7940 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910088a0: Queued root: 0000000013501e00 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910088b8: Queued root: 000000001ba56530 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910088d0: Queued root: 000000001bc27190 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    00000000910088e8: Queued root: 0000000010b7e470 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008900: Queued root: 0000000010591b70 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008918: Queued root: 000000001223c550 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008930: Queued root: 0000000012f98be0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008948: Queued root: 0000000011b30ae0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008960: Queued root: 00000000134fb5f0 :: 0000000010116430 (bits: 3)
      From worker 6:            of type Array{Any, 1}
      From worker 6:    0000000091008978: Root object: 000000007a3a8e40 :: 00000000101160c0 (bits: 1)
      From worker 6:            of type Int64
      From worker 6:    0000000091008990:  r-- Stack frame 0000000061d6cfc0 -- 0 of 36 (direct)
      From worker 6:
      From worker 6:    signal (22): SIGABRT
      From worker 6:    in expression starting at none:1
      From worker 6:    crt_sig_handler at /cygdrive/c/buildbot/worker/package_win64/build/src\signals-win.c:93
      From worker 6:    raise at C:\WINDOWS\System32\msvcrt.dll (unknown line)
      From worker 6:    abort at C:\WINDOWS\System32\msvcrt.dll (unknown line)
      From worker 6:    gc_assert_datatype_fail at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:1622
      From worker 6:    gc_mark_loop at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:2685
      From worker 6:    _jl_gc_collect at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:3006
      From worker 6:    jl_gc_collect at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:3213
      From worker 6:    gc at .\gcutils.jl:94 [inlined]
      From worker 6:    #temp_cleanup_purge#15 at .\file.jl:515
      From worker 6:    temp_cleanup_purge##kw at .\file.jl:511 [inlined]
      From worker 6:    #787 at .\initdefs.jl:322
      From worker 6:    jfptr_YY.787_25025.clone_1 at C:\Users\alexa\AppData\Local\Programs\Julia-1.6.0-beta1\lib\julia\sys.dll (unknown line)
      From worker 6:    _atexit at .\initdefs.jl:343
      From worker 6:    jfptr__atexit_44479.clone_1 at C:\Users\alexa\AppData\Local\Programs\Julia-1.6.0-beta1\lib\julia\sys.dll (unknown line)
      From worker 6:    jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
      From worker 6:    jl_atexit_hook at /cygdrive/c/buildbot/worker/package_win64/build/src\init.c:223
      From worker 6:    jl_exit at /cygdrive/c/buildbot/worker/package_win64/build/src\jl_uv.c:632
      From worker 6:    jl_exception_handler at /cygdrive/c/buildbot/worker/package_win64/build/src\signals-win.c:318
      From worker 6:    __julia_personality at /cygdrive/c/buildbot/worker/package_win64/build/src/support\win32_ucontext.c:28
      From worker 6:    _chkstk at C:\WINDOWS\SYSTEM32\ntdll.dll (unknown line)
      From worker 6:    RtlImageRvaToSection at C:\WINDOWS\SYSTEM32\ntdll.dll (unknown line)
      From worker 6:    KiUserExceptionDispatcher at C:\WINDOWS\SYSTEM32\ntdll.dll (unknown line)
      From worker 6:    jl_object_id_ at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:359 [inlined]
      From worker 6:    jl_object_id_ at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:343 [inlined]
      From worker 6:    jl_object_id at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:373
      From worker 6:    type_hash at /cygdrive/c/buildbot/worker/package_win64/build/src\jltypes.c:981
      From worker 6:    typekey_hash at /cygdrive/c/buildbot/worker/package_win64/build/src\jltypes.c:993 [inlined]
      From worker 6:    lookup_type at /cygdrive/c/buildbot/worker/package_win64/build/src\jltypes.c:585
      From worker 6:    inst_datatype_inner at /cygdrive/c/buildbot/worker/package_win64/build/src\jltypes.c:1157
      From worker 6:    jl_inst_arg_tuple_type at /cygdrive/c/buildbot/worker/package_win64/build/src\jltypes.c:1424
      From worker 6:    arg_type_tuple at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:1823 [inlined]
      From worker 6:    jl_lookup_generic_ at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:2350
      From worker 6:    jl_apply_generic at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:2402
      From worker 6:    _writecallback at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:422
      From worker 6:    unknown function (ip: 0000000001338805)
      From worker 6:    .text at C:\Users\alexa\.julia\artifacts\0407eb942f4c6c53c9bcc1eeccf3def7b46d6cc7\bin\libpng16.dll (unknown line)
      From worker 6:    png_write_chunk_header at C:\Users\alexa\.julia\artifacts\0407eb942f4c6c53c9bcc1eeccf3def7b46d6cc7\bin\libpng16.dll (unknown line)
      From worker 6:    png_write_complete_chunk at C:\Users\alexa\.julia\artifacts\0407eb942f4c6c53c9bcc1eeccf3def7b46d6cc7\bin\libpng16.dll (unknown line)
      From worker 6:    png_compress_IDAT at C:\Users\alexa\.julia\artifacts\0407eb942f4c6c53c9bcc1eeccf3def7b46d6cc7\bin\libpng16.dll (unknown line)
      From worker 6:    png_write_filtered_row at C:\Users\alexa\.julia\artifacts\0407eb942f4c6c53c9bcc1eeccf3def7b46d6cc7\bin\libpng16.dll (unknown line)
      From worker 6:    png_write_find_filter at C:\Users\alexa\.julia\artifacts\0407eb942f4c6c53c9bcc1eeccf3def7b46d6cc7\bin\libpng16.dll (unknown line)
      From worker 6:    png_write_row at C:\Users\alexa\.julia\artifacts\0407eb942f4c6c53c9bcc1eeccf3def7b46d6cc7\bin\libpng16.dll (unknown line)
      From worker 6:    png_write_image at C:\Users\alexa\.julia\artifacts\0407eb942f4c6c53c9bcc1eeccf3def7b46d6cc7\bin\libpng16.dll (unknown line)
      From worker 6:    _write_image at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:426 [inlined]
      From worker 6:    #_save#15 at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:414
      From worker 6:    _save##kw at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:344
      From worker 6:    #13 at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:326
      From worker 6:    maybe_lock at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:36 [inlined]
      From worker 6:    maybe_lock at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:38 [inlined]
      From worker 6:    #save#12 at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:323
      From worker 6:    save at C:\Users\alexa\.julia\packages\PNGFiles\CQUsD\src\io.jl:315
      From worker 6:    jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
      From worker 6:    do_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:672
      From worker 6:    jl_f__apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:686 [inlined]
      From worker 6:    jl_f__apply_latest at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:722
      From worker 6:    #invokelatest#2 at .\essentials.jl:707
      From worker 6:    jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
      From worker 6:    do_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:672
      From worker 6:    invokelatest at .\essentials.jl:706
      From worker 6:    jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
      From worker 6:    do_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:672
      From worker 6:    #save#7 at C:\Users\alexa\.julia\packages\ImageIO\uPn5K\src\ImageIO.jl:46
      From worker 6:    save##kw at C:\Users\alexa\.julia\packages\ImageIO\uPn5K\src\ImageIO.jl:41
      From worker 6:    inner at .\essentials.jl:710
      From worker 6:    unknown function (ip: 0000000001336633)
      From worker 6:    jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
      From worker 6:    do_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:672
      From worker 6:    jl_f__apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:686 [inlined]
      From worker 6:    jl_f__apply_latest at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:722
      From worker 6:    #invokelatest#2 at .\essentials.jl:711
      From worker 6:    jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
      From worker 6:    do_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:672
      From worker 6:    invokelatest##kw at .\essentials.jl:706
      From worker 6:    #save#33 at C:\Users\alexa\.julia\packages\FileIO\TyKdX\src\loadsave.jl:233
      From worker 6:    save##kw at C:\Users\alexa\.julia\packages\FileIO\TyKdX\src\loadsave.jl:217
      From worker 6:    #show#13 at C:\Users\alexa\.julia\packages\ImageShow\9kpaq\src\showmime.jl:43
      From worker 6:    unknown function (ip: 000000000134af2b)
      From worker 6:    show at C:\Users\alexa\.julia\packages\ImageShow\9kpaq\src\showmime.jl:28
      From worker 6:    unknown function (ip: 000000000134a684)
      From worker 6:    show_richest at C:\Users\alexa\.julia\packages\Pluto\luIaC\src\runner\PlutoRunner.jl:601
      From worker 6:    unknown function (ip: 000000005f3455b4)
      From worker 6:    #sprint_withreturned#28 at C:\Users\alexa\.julia\packages\Pluto\luIaC\src\runner\PlutoRunner.jl:549
      From worker 6:    sprint_withreturned##kw at C:\Users\alexa\.julia\packages\Pluto\luIaC\src\runner\PlutoRunner.jl:548
      From worker 6:    unknown function (ip: 000000000134a398)
      From worker 6:    format_output_default at C:\Users\alexa\.julia\packages\Pluto\luIaC\src\runner\PlutoRunner.jl:474
      From worker 6:    #format_output#17 at C:\Users\alexa\.julia\packages\Pluto\luIaC\src\runner\PlutoRunner.jl:491 [inlined]
      From worker 6:    format_output##kw at C:\Users\alexa\.julia\packages\Pluto\luIaC\src\runner\PlutoRunner.jl:491
      From worker 6:    unknown function (ip: 000000005f341e04)
      From worker 6:    formatted_result_of at C:\Users\alexa\.julia\packages\Pluto\luIaC\src\runner\PlutoRunner.jl:416
      From worker 6:    unknown function (ip: 000000005f337666)
      From worker 6:    jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
      From worker 6:    do_call at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:115
      From worker 6:    eval_value at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:204
      From worker 6:    eval_stmt_value at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:155 [inlined]
      From worker 6:    eval_body at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:575
      From worker 6:    jl_interpret_toplevel_thunk at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:669
      From worker 6:    jl_toplevel_eval_flex at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:879
      From worker 6:    jl_toplevel_eval at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:888 [inlined]
      From worker 6:    jl_toplevel_eval_in at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:931
      From worker 6:    eval at .\boot.jl:360
      From worker 6:    jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
      From worker 6:    do_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:672
      From worker 6:    #106 at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Distributed\src\process_messages.jl:278
      From worker 6:    run_work_thunk at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Distributed\src\process_messages.jl:63
      From worker 6:    macro expansion at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Distributed\src\process_messages.jl:278 [inlined]
      From worker 6:    #105 at .\task.jl:406
      From worker 6:    unknown function (ip: 000000005f330ae3)
      From worker 6:    jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
      From worker 6:    start_task at /cygdrive/c/buildbot/worker/package_win64/build/src\task.c:839
      From worker 6:    Allocations: 266913264 (Pool: 266837633; Big: 75631); GC: 232
Worker 6 terminated.Distributed
.ProcessExitedException(6)
Stacktrace:
  [1] try_yieldto(undo::typeof(Base.ensure_rescheduled))
    @ Base .\task.jl:705
  [2] wait
    @ .\task.jl:764 [inlined]
  [3] wait(c::Base.GenericCondition{ReentrantLock})
    @ Base .\condition.jl:106
  [4] take_buffered(c::Channel{Any})
    @ Base .\channels.jl:389
  [5] take!(c::Channel{Any})
    @ Base .\channels.jl:383
  [6] take!(::Distributed.RemoteValue)
    @ Distributed C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Distributed\src\remotecall.jl:599
  [7] remotecall_fetch(::Function, ::Distributed.Worker, ::Module, ::Vararg{Any, N} where N; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Distributed C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Distributed\src\remotecall.jl:390
  [8] remotecall_fetch(::Function, ::Distributed.Worker, ::Module, ::Vararg{Any, N} where N)
    @ Distributed C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Distributed\src\remotecall.jl:386
  [9] #remotecall_fetch#146
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Distributed\src\remotecall.jl:421 [inlined]
 [10] remotecall_fetch
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Distributed\src\remotecall.jl:421 [inlined]
 [11] remotecall_eval
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Distributed\src\macros.jl:246 [inlined]
 [12] (::Pluto.WorkspaceManager.var"#12#13"{Base.UUID, Bool, Nothing, Pluto.WorkspaceManager.Workspace})()
    @ Pluto.WorkspaceManager ~\.julia\packages\Pluto\luIaC\src\evaluation\WorkspaceManager.jl:260
 [13] withtoken(f::Pluto.WorkspaceManager.var"#12#13"{Base.UUID, Bool, Nothing, Pluto.WorkspaceManager.Workspace}, token::Pluto.Token)
    @ Pluto ~\.julia\packages\Pluto\luIaC\src\evaluation\Tokens.jl:18
 [14] format_fetch_in_workspace
    @ ~\.julia\packages\Pluto\luIaC\src\evaluation\WorkspaceManager.jl:259 [inlined]
 [15] format_fetch_in_workspace
    @ ~\.julia\packages\Pluto\luIaC\src\evaluation\WorkspaceManager.jl:256 [inlined]
 [16] eval_format_fetch_in_workspace(session_notebook::Tuple{Pluto.ServerSession, Pluto.Notebook}, expr::Expr, cell_id::Base.UUID, ends_with_semicolon::Bool, function_wrapped_info::Tuple{Set{Symbol}, Set{Symbol}})
    @ Pluto.WorkspaceManager ~\.julia\packages\Pluto\luIaC\src\evaluation\WorkspaceManager.jl:244
 [17] run_single!(session_notebook::Tuple{Pluto.ServerSession, Pluto.Notebook}, cell::Pluto.Cell, reactive_node::Pluto.ReactiveNode)
    @ Pluto ~\.julia\packages\Pluto\luIaC\src\evaluation\Run.jl:107
 [18] run_reactive!(session::Pluto.ServerSession, notebook::Pluto.Notebook, old_topology::Pluto.NotebookTopology, new_topology::Pluto.NotebookTopology, cells::Vector{Pluto.Cell}; deletion_hook::Function, persist_js_state::Bool)
    @ Pluto ~\.julia\packages\Pluto\luIaC\src\evaluation\Run.jl:78
 [19] macro expansion
    @ ~\.julia\packages\Pluto\luIaC\src\evaluation\Run.jl:13 [inlined]
 [20] (::Pluto.var"#79#81"{Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:deletion_hook, :persist_js_state), Tuple{Pluto.var"#custom_deletion_hook#190"{Pluto.var"#custom_deletion_hook#188#191"{Int64, Symbol}}, Bool}}}, Pluto.ServerSession, Pluto.Notebook, Vector{Pluto.Cell}, Pluto.NotebookTopology, Pluto.NotebookTopology})()
    @ Pluto .\task.jl:406

Plots.jl+pyplot() interacts badly with PNGFiles.jl

using Plots
using FileIO
pyplot() # remove this line and the example works fine
FileIO.load("DSC_999.png")

gives me

Errors encountered while loading "C:\\Users\\jaakkor2\\Work\\Julia\\DSC_999.png".
All errors:
===========================================
ReadOnlyMemoryError()
===========================================
ArgumentError: Package ImageMagick not found in current path:
- Run `import Pkg; Pkg.add("ImageMagick")` to install the ImageMagick package.

===========================================

Fatal error:
ERROR: ReadOnlyMemoryError()
Stacktrace:
 [1] handle_error(::ReadOnlyMemoryError, ::File{DataFormat{:PNG}}) at C:\Users\jaakkor2\.julia\packages\FileIO\wN5rD\src\error_handling.jl:82
 [2] handle_exceptions(::Array{Any,1}, ::String) at C:\Users\jaakkor2\.julia\packages\FileIO\wN5rD\src\error_handling.jl:77
 [3] load(::FileIO.Formatted; options::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at C:\Users\jaakkor2\.julia\packages\FileIO\wN5rD\src\loadsave.jl:207
 [4] load at C:\Users\jaakkor2\.julia\packages\FileIO\wN5rD\src\loadsave.jl:184 [inlined]
 [5] #load#14 at C:\Users\jaakkor2\.julia\packages\FileIO\wN5rD\src\loadsave.jl:133 [inlined]
 [6] load(::String) at C:\Users\jaakkor2\.julia\packages\FileIO\wN5rD\src\loadsave.jl:133
 [7] top-level scope at REPL[4]:1

I do not have ImageMagick.jl installed, but I do have
. Plots.jl v1.6.6
. FileIO v1.4.3
. ImageIO.jl v0.3.0
. PNGFiles v0.3.1

Without the call pyplot() the example works fine.

In issue JuliaIO/FileIO.jl#275 it was guided to open an issue here.

Segfault when saving PNG too often

Here is a MWE. I tried to make it smaller, but it seems like all of these steps are needed:

import Pkg
Pkg.activate(mktempdir())
Pkg.add([
    Pkg.PackageSpec(name="Images", version="0.23.3"), 
    Pkg.PackageSpec(name="ImageIO", version="0.4.1"), 
])

using Images

default_iocontext = IOContext(devnull, :color => false, :limit => true, :displaysize => (18, 88))

io() = IOContext(IOBuffer(), default_iocontext)

img = load(download("https://user-images.githubusercontent.com/6933510/107239146-dcc3fd00-6a28-11eb-8c7b-41aaf6618935.png"))
small = img[1:7,1:7]

for i in 1:10000
    show(io(), MIME"image/png"(), small)
end

Result:

fons@rekenmachine Documents % julia imageieosegfault.jl
 Activating new environment at `/var/folders/v_/fhpj9jn151d4p9c2fdw2gv780000gn/T/jl_OojTpv/Project.toml`
   Updating registry at `~/.julia/registries/General`
  Resolving package versions...
Updating `/private/var/folders/v_/fhpj9jn151d4p9c2fdw2gv780000gn/T/jl_OojTpv/Project.toml`
  [82e4d734] + ImageIO v0.4.1
  [916415d5] + Images v0.23.3
Updating `/private/var/folders/v_/fhpj9jn151d4p9c2fdw2gv780000gn/T/jl_OojTpv/Manifest.toml`
  [621f4979] + AbstractFFTs v1.0.0
  [79e6a3ab] + Adapt v3.2.0
  [4fba245c] + ArrayInterface v3.1.1
  [56f22d72] + Artifacts v1.3.0
  [13072b0f] + AxisAlgorithms v1.0.0
  [39de3d68] + AxisArrays v0.4.3
  [fa961155] + CEnum v0.4.1
  [aafaddc9] + CatIndices v0.2.2
  [d360d2e6] + ChainRulesCore v0.9.29
  [3da002f7] + ColorTypes v0.10.9
  [c3611d14] + ColorVectorSpace v0.8.7
  [5ae59095] + Colors v0.12.6
  [34da2185] + Compat v3.25.0
  [e66e0078] + CompilerSupportLibraries_jll v0.3.4+0
  [ed09eef8] + ComputationalResources v0.3.2
  [150eb455] + CoordinateTransformations v0.6.1
  [dc8bdbbb] + CustomUnitRanges v1.0.1
  [9a962f9c] + DataAPI v1.5.1
  [864edb3b] + DataStructures v0.18.9
  [b4f34e82] + Distances v0.10.2
  [da5c29d0] + EllipsisNotation v1.1.0
  [4f61f5a4] + FFTViews v0.3.1
  [7a1cc6ca] + FFTW v1.3.2
  [f5851436] + FFTW_jll v3.3.9+7
  [5789e2e9] + FileIO v1.4.5
  [53c48c17] + FixedPointNumbers v0.8.4
  [a2bd30eb] + Graphics v1.1.0
  [bbac6d45] + IdentityRanges v0.3.1
  [615f187c] + IfElse v0.1.0
  [2803e5a7] + ImageAxes v0.6.8
  [f332f351] + ImageContrastAdjustment v0.3.6
  [a09fc81d] + ImageCore v0.8.20
  [51556ac3] + ImageDistances v0.2.10
  [6a3955dd] + ImageFiltering v0.6.19
  [82e4d734] + ImageIO v0.4.1
  [bc367c6b] + ImageMetadata v0.9.4
  [787d08f9] + ImageMorphology v0.2.9
  [2996bd0c] + ImageQualityIndexes v0.2.1
  [4e3cecfd] + ImageShow v0.2.3
  [02fcd773] + ImageTransformations v0.8.9
  [916415d5] + Images v0.23.3
  [9b13fd28] + IndirectArrays v0.5.1
  [1d5cc7b8] + IntelOpenMP_jll v2018.0.3+2
  [a98d9a8b] + Interpolations v0.13.1
  [8197267c] + IntervalSets v0.5.2
  [c8e1da08] + IterTools v1.3.0
  [692b3bcd] + JLLWrappers v1.2.0
  [4af54fe1] + LazyArtifacts v1.3.0
  [856f044c] + MKL_jll v2021.1.1+1
  [1914dd2f] + MacroTools v0.5.6
  [dbb5928d] + MappedArrays v0.3.0
  [e1d29d7a] + Missings v0.4.5
  [e94cdb99] + MosaicViews v0.2.4
  [77ba4419] + NaNMath v0.3.5
  [f09324ee] + Netpbm v1.0.0
  [6fe1bfb0] + OffsetArrays v1.5.3
  [efe28fd5] + OpenSpecFun_jll v0.5.3+4
  [bac558e1] + OrderedCollections v1.3.3
  [f57f5aa1] + PNGFiles v0.3.5
  [5432bcbf] + PaddedViews v0.5.8
  [d96e819e] + Parameters v0.12.2
  [b3c3ace0] + RangeArrays v0.3.2
  [c84ed2f1] + Ratios v0.4.0
  [189a3867] + Reexport v1.0.0
  [ae029012] + Requires v1.1.2
  [6038ab10] + Rotations v1.0.2
  [699a6c99] + SimpleTraits v0.9.3
  [a2af1166] + SortingAlgorithms v0.3.1
  [276daf66] + SpecialFunctions v1.2.1
  [90137ffa] + StaticArrays v1.0.1
  [2913bbd2] + StatsBase v0.33.2
  [06e1c1a7] + TiledIteration v0.2.5
  [3a884ed6] + UnPack v1.0.2
  [efce3f68] + WoodburyMatrices v0.5.3
  [83775a58] + Zlib_jll v1.2.11+18
  [b53b4c65] + libpng_jll v1.6.37+6
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8bb1440f] + DelimitedFiles
  [8ba89e20] + Distributed
  [b77e0a4c] + InteractiveUtils
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [44cfe95a] + Pkg
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [1a1011a3] + SharedArrays
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode


signal (11): Segmentation fault: 11
in expression starting at /Users/fons/Documents/imageieosegfault.jl:19
jl_object_id_ at /Users/julia/buildbot/worker/package_macos64/build/src/builtins.c:349
typekey_hash at /Users/julia/buildbot/worker/package_macos64/build/src/jltypes.c:1014 [inlined]
jl_precompute_memoized_dt at /Users/julia/buildbot/worker/package_macos64/build/src/jltypes.c:1048
inst_datatype_inner at /Users/julia/buildbot/worker/package_macos64/build/src/jltypes.c:1314
jl_apply_tuple_type_v_ at /Users/julia/buildbot/worker/package_macos64/build/src/jltypes.c:1385 [inlined]
jl_apply_tuple_type_v at /Users/julia/buildbot/worker/package_macos64/build/src/jltypes.c:1395
arg_type_tuple at /Users/julia/buildbot/worker/package_macos64/build/src/gf.c:1851
jl_lookup_generic_ at /Users/julia/buildbot/worker/package_macos64/build/src/gf.c:2361
jl_apply_generic at /Users/julia/buildbot/worker/package_macos64/build/src/gf.c:2394
_writecallback at /Users/fons/.julia/packages/PNGFiles/CQUsD/src/io.jl:422
unknown function (ip: 0x138973dbf)
png_write_data at /Users/fons/.julia/artifacts/fb2695d9f2ba598ca2213b0768aac906ebcd1000/lib/libpng16.16.37.0.dylib (unknown line)
png_write_chunk_header at /Users/fons/.julia/artifacts/fb2695d9f2ba598ca2213b0768aac906ebcd1000/lib/libpng16.16.37.0.dylib (unknown line)
png_write_complete_chunk at /Users/fons/.julia/artifacts/fb2695d9f2ba598ca2213b0768aac906ebcd1000/lib/libpng16.16.37.0.dylib (unknown line)
png_compress_IDAT at /Users/fons/.julia/artifacts/fb2695d9f2ba598ca2213b0768aac906ebcd1000/lib/libpng16.16.37.0.dylib (unknown line)
png_write_finish_row at /Users/fons/.julia/artifacts/fb2695d9f2ba598ca2213b0768aac906ebcd1000/lib/libpng16.16.37.0.dylib (unknown line)
png_write_filtered_row at /Users/fons/.julia/artifacts/fb2695d9f2ba598ca2213b0768aac906ebcd1000/lib/libpng16.16.37.0.dylib (unknown line)
png_write_find_filter at /Users/fons/.julia/artifacts/fb2695d9f2ba598ca2213b0768aac906ebcd1000/lib/libpng16.16.37.0.dylib (unknown line)
png_write_row at /Users/fons/.julia/artifacts/fb2695d9f2ba598ca2213b0768aac906ebcd1000/lib/libpng16.16.37.0.dylib (unknown line)
png_write_image at /Users/fons/.julia/artifacts/fb2695d9f2ba598ca2213b0768aac906ebcd1000/lib/libpng16.16.37.0.dylib (unknown line)
_write_image at /Users/fons/.julia/packages/PNGFiles/CQUsD/src/io.jl:426 [inlined]
#_save#15 at /Users/fons/.julia/packages/PNGFiles/CQUsD/src/io.jl:414
_save##kw at /Users/fons/.julia/packages/PNGFiles/CQUsD/src/io.jl:344
JuliaIO/ImageIO.jl#13 at /Users/fons/.julia/packages/PNGFiles/CQUsD/src/io.jl:326
maybe_lock at /Users/fons/.julia/packages/PNGFiles/CQUsD/src/io.jl:36 [inlined]
maybe_lock at /Users/fons/.julia/packages/PNGFiles/CQUsD/src/io.jl:38 [inlined]
#save#12 at /Users/fons/.julia/packages/PNGFiles/CQUsD/src/io.jl:323
save at /Users/fons/.julia/packages/PNGFiles/CQUsD/src/io.jl:315
jl_apply at /Users/julia/buildbot/worker/package_macos64/build/src/./julia.h:1690 [inlined]
do_apply at /Users/julia/buildbot/worker/package_macos64/build/src/builtins.c:655
jl_f__apply at /Users/julia/buildbot/worker/package_macos64/build/src/builtins.c:669 [inlined]
jl_f__apply_latest at /Users/julia/buildbot/worker/package_macos64/build/src/builtins.c:705
#invokelatest#1 at ./essentials.jl:710
jl_apply at /Users/julia/buildbot/worker/package_macos64/build/src/./julia.h:1690 [inlined]
do_apply at /Users/julia/buildbot/worker/package_macos64/build/src/builtins.c:655
invokelatest at ./essentials.jl:709
jl_apply at /Users/julia/buildbot/worker/package_macos64/build/src/./julia.h:1690 [inlined]
do_apply at /Users/julia/buildbot/worker/package_macos64/build/src/builtins.c:655
#save#7 at /Users/fons/.julia/packages/ImageIO/uPn5K/src/ImageIO.jl:46
save##kw at /Users/fons/.julia/packages/ImageIO/uPn5K/src/ImageIO.jl:41
inner at ./essentials.jl:713
unknown function (ip: 0x138984e2c)
jl_apply at /Users/julia/buildbot/worker/package_macos64/build/src/./julia.h:1690 [inlined]
do_apply at /Users/julia/buildbot/worker/package_macos64/build/src/builtins.c:655
jl_f__apply at /Users/julia/buildbot/worker/package_macos64/build/src/builtins.c:669 [inlined]
jl_f__apply_latest at /Users/julia/buildbot/worker/package_macos64/build/src/builtins.c:705
#invokelatest#1 at ./essentials.jl:714 [inlined]
invokelatest##kw at ./essentials.jl:709 [inlined]
#save#33 at /Users/fons/.julia/packages/FileIO/TyKdX/src/loadsave.jl:233
unknown function (ip: 0x13898349a)
save##kw at /Users/fons/.julia/packages/FileIO/TyKdX/src/loadsave.jl:217
unknown function (ip: 0x138982667)
#show#13 at /Users/fons/.julia/packages/ImageShow/9kpaq/src/showmime.jl:43
unknown function (ip: 0x138980478)
show at /Users/fons/.julia/packages/ImageShow/9kpaq/src/showmime.jl:28
unknown function (ip: 0x13897a456)
top-level scope at /Users/fons/Documents/imageieosegfault.jl:20
jl_toplevel_eval_flex at /Users/julia/buildbot/worker/package_macos64/build/src/toplevel.c:834
jl_parse_eval_all at /Users/julia/buildbot/worker/package_macos64/build/src/ast.c:913
jl_load_rewrite at /Users/julia/buildbot/worker/package_macos64/build/src/toplevel.c:914 [inlined]
jl_load at /Users/julia/buildbot/worker/package_macos64/build/src/toplevel.c:919
include at ./Base.jl:380
include at ./Base.jl:368
exec_options at ./client.jl:296
_start at ./client.jl:506
jfptr__start_57081 at /Applications/Julia-1.5.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
true_main at /usr/local/bin/julia (unknown line)
main at /usr/local/bin/julia (unknown line)
Allocations: 43572662 (Pool: 43555600; Big: 17062); GC: 44
zsh: segmentation fault  julia imageieosegfault.jl

System info:

julia> versioninfo()
Julia Version 1.5.3
Commit 788b2c77c1 (2020-11-09 13:37 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.7.0)
  CPU: Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, westmere)

Wrapping an array with AxisArrays breaks PNGFiles

I ran into this when working with OMETIFF.jl returned AxisArray objects in IJulia, which uses PNGFiles for display:

julia> using FixedPointNumbers, Colors, PNGFiles, AxisArrays

julia> img = rand(Gray{N0f16}, 100, 100);

julia> PNGFiles.save("img.png", img); # works as expected

julia> PNGFiles.save("img2.png", AxisArray(img)); # wrapped with AxisArrays
ERROR: conversion to pointer not defined for AxisArray{Gray{N0f16}, 1, SubArray{Gray{N0f16}, 1, Matrix{Gray{N0f16}}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, true}, Tuple{Axis{:col, Base.OneTo{Int64}}}}
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] unsafe_convert(#unused#::Type{Ptr{Gray{N0f16}}}, a::AxisArray{Gray{N0f16}, 1, SubArray{Gray{N0f16}, 1, Matrix{Gray{N0f16}}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, true}, Tuple{Axis{:col, Base.OneTo{Int64}}}})
    @ Base ./pointer.jl:67
  [3] pointer(x::AxisArray{Gray{N0f16}, 1, SubArray{Gray{N0f16}, 1, Matrix{Gray{N0f16}}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, true}, Tuple{Axis{:col, Base.OneTo{Int64}}}})
    @ Base ./abstractarray.jl:1116
  [4] iterate
    @ ./generator.jl:47 [inlined]
  [5] collect(itr::Base.Generator{Base.Generator{Base.OneTo{Int64}, Base.var"#193#194"{AxisArray{Gray{N0f16}, 2, Matrix{Gray{N0f16}}, Tuple{Axis{:col, Base.OneTo{Int64}}, Axis{:row, Base.OneTo{Int64}}}}}}, typeof(pointer)})
    @ Base ./array.jl:681
  [6] map
    @ ./abstractarray.jl:2323 [inlined]
  [7] _write_image(buf::AxisArray{Gray{N0f16}, 2, Matrix{Gray{N0f16}}, Tuple{Axis{:col, Base.OneTo{Int64}}, Axis{:row, Base.OneTo{Int64}}}}, png_ptr::Ptr{Nothing}, info_ptr::Ptr{Nothing})
    @ PNGFiles ~/.julia/packages/PNGFiles/dIbpb/src/io.jl:430
  [8] _save(png_ptr::Ptr{Nothing}, info_ptr::Ptr{Nothing}, image::AxisArray{Gray{N0f16}, 2, Matrix{Gray{N0f16}}, Tuple{Axis{:row, Base.OneTo{Int64}}, Axis{:col, Base.OneTo{Int64}}}}; compression_level::Int64, compression_strategy::Int64, filters::Int64, palette::Nothing)
    @ PNGFiles ~/.julia/packages/PNGFiles/dIbpb/src/io.jl:418
  [9] save(fpath::String, image::AxisArray{Gray{N0f16}, 2, Matrix{Gray{N0f16}}, Tuple{Axis{:row, Base.OneTo{Int64}}, Axis{:col, Base.OneTo{Int64}}}}; compression_level::Int64, compression_strategy::Int64, filters::Int64, palette::Nothing)
    @ PNGFiles ~/.julia/packages/PNGFiles/dIbpb/src/io.jl:298
 [10] save(fpath::String, image::AxisArray{Gray{N0f16}, 2, Matrix{Gray{N0f16}}, Tuple{Axis{:row, Base.OneTo{Int64}}, Axis{:col, Base.OneTo{Int64}}}})
    @ PNGFiles ~/.julia/packages/PNGFiles/dIbpb/src/io.jl:284
 [11] top-level scope
    @ REPL[5]:1

This breaks IJulia's display of AxisArrays:

image

Thoughts @IanButterworth @johnnychen94 ?

Benchmarking

I just added a benchmark script at https://github.com/JuliaIO/PNG.jl/blob/master/benchmarking/benchmark.jl

Looks like QuartzImageIO >> PNG > ImageMagick overall, but PNG is fastest to load

All of this is before @Drvi's IanButterworth/ImageIODevelopment.jl#3 which looks like it will improve things 👍🏻

Small image

[ Info: Testing with rand(RGB{N0f8}, 244, 244) image -----------------------------

[ Info: Testing FileIO with ImageMagick (dedicated environment, new instance)
Time to first save (including save): 2.336 seconds
Save @btime:  27.209 ms (3562 allocations: 710.64 KiB)
Load @btime:  5.420 ms (3722 allocations: 717.97 KiB)

[ Info: Testing FileIO with QuartzImageIO (dedicated environment, new instance)
Time to first save (including save): 2.445 seconds
Save @btime:  8.773 ms (1837 allocations: 794.13 KiB)
Load @btime:  3.477 ms (2062 allocations: 574.75 KiB)

[ Info: Testing FileIO with PNG (dedicated environment, new instance)
Time to first save (including save): 1.776 seconds
Save @btime:  20.581 ms (279 allocations: 370.69 KiB)
Load @btime:  2.569 ms (184 allocations: 183.33 KiB)

Large image

[ Info: Testing with rand(RGB{N0f8}, 20000, 4000) image -----------------------------

[ Info: Testing FileIO with ImageMagick (dedicated environment, new instance)
Time to first save (including save): 32.806 seconds
Save @btime:  30.127 s (3562 allocations: 686.83 MiB)
Load @btime:  4.962 s (3729 allocations: 686.84 MiB)

[ Info: Testing FileIO with QuartzImageIO (dedicated environment, new instance)
Time to first save (including save): 14.143 seconds
Save @btime:  11.721 s (1837 allocations: 915.62 MiB)
Load @btime:  3.934 s (2064 allocations: 610.46 MiB)

[ Info: Testing FileIO with PNG (dedicated environment, new instance)
Time to first save (including save): 30.107 seconds
Save @btime:  28.491 s (20035 allocations: 460.82 MiB)
Load @btime:  4.107 s (186 allocations: 228.89 MiB)

Fix warning

WARNING: method definition for _palette_alpha at /home/juliohm/.julia/packages/PNGFiles/Ee6Hz/src/io.jl:631 declares type variable T but does not use it.

The saved Chinese file name is garbled

using PNGFiles, Colors, FileIO
PNGFiles.save("中文.png", rand(Gray, 100, 100))
img = PNGFiles.load("中文.png")
save("中文.jpg", rand(Gray, 100, 100))

image

The jpg file name is right, but the png file name is wrong (however it can be loaded back correctly).


Julia Version 1.8.3
Commit 0434deb161 (2022-11-14 20:14 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 8 × Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
Threads: 1 on 8 virtual cores


Status C:\Users\me\.julia\environments\v1.8\Project.toml
[35d6a980] ColorSchemes v3.20.0
[5ae59095] Colors v0.12.10
[5789e2e9] FileIO v1.16.0
[916415d5] Images v0.25.2
[a98d9a8b] Interpolations v0.14.7
[ae8d54c2] Luxor v3.7.0
[f57f5aa1] PNGFiles v0.3.17

ERROR: LoadError: LoadError: UndefVarError: AbstractARGB not defined

Error message:

[ Info: Precompiling PNGFiles [f57f5aa1-a3ce-4bc8-8ab9-96f992907883]
ERROR: LoadError: LoadError: UndefVarError: AbstractARGB not defined
Stacktrace:
 [1] top-level scope
   @ ~/.julia/packages/PNGFiles/TGHP2/src/io.jl:521
 [2] include(x::String)
   @ PNGFiles ~/.julia/packages/PNGFiles/TGHP2/src/PNGFiles.jl:1
 [3] top-level scope
   @ ~/.julia/packages/PNGFiles/TGHP2/src/PNGFiles.jl:22
 [4] top-level scope (repeats 2 times)
   @ none:1

versioninfo:

julia> versioninfo()
Julia Version 1.6.3
Commit ae8452a9e0* (2021-09-23 17:34 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)

I think the AbstractARGB is from ColorTypes.jl (https://github.com/JuliaGraphics/ColorTypes.jl), but I am not sure what's the problem...

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

MethodError when used with FileIO

It took me a few hours (as a relative beginner) to finally get a MWE, but this is how it errors:

mfiano@workstation ~$ julia
	               _
	   _       _ _(_)_     |  Documentation: https://docs.julialang.org
	  (_)     | (_) (_)    |
	   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
	  | | | | | | |/ _` |  |
	  | | |_| | | | (_| |  |  Version 1.8.0 (2022-08-17)
	 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
	|__/                   |
	 
	(@v1.8) pkg> st
	Status `~/.data/julia/environments/v1.8/Project.toml`
	  [3da002f7] ColorTypes v0.11.4
	  [5789e2e9] FileIO v1.15.0
	  [82e4d734] ImageIO v0.6.6
	 
	(v1.8) julia> using ColorTypes, FileIO, ImageIO
	 
	(v1.8) julia> x = Array{ColorTypes.RGB}(undef, 4, 4)
	4×4 Array{RGB,2} with eltype RGB:
	 #undef  #undef  #undef  #undef
	 #undef  #undef  #undef  #undef
	 #undef  #undef  #undef  #undef
	 #undef  #undef  #undef  #undef
	 
	(v1.8) julia> fill!(x, ColorTypes.RGB(1.0,1.0,1.0))
	4×4 Array{RGB,2} with eltype RGB:
	 RGB{Float64}(1.0,1.0,1.0)  RGB{Float64}(1.0,1.0,1.0)  RGB{Float64}(1.0,1.0,1.0)  RGB{Float64}(1.0,1.0,1.0)
	 RGB{Float64}(1.0,1.0,1.0)  RGB{Float64}(1.0,1.0,1.0)  RGB{Float64}(1.0,1.0,1.0)  RGB{Float64}(1.0,1.0,1.0)
	 RGB{Float64}(1.0,1.0,1.0)  RGB{Float64}(1.0,1.0,1.0)  RGB{Float64}(1.0,1.0,1.0)  RGB{Float64}(1.0,1.0,1.0)
	 RGB{Float64}(1.0,1.0,1.0)  RGB{Float64}(1.0,1.0,1.0)  RGB{Float64}(1.0,1.0,1.0)  RGB{Float64}(1.0,1.0,1.0)
	 
	(v1.8) julia> save("img.png", x)
	Errors encountered while save File{DataFormat{:PNG}, String}("img.png").
	All errors:
	===========================================
	MethodError: no method matching __get_bit_depth(::Type{Any})
	Closest candidates are:
	  __get_bit_depth(::Type{FixedPointNumbers.Normed{T, 8}}) where T at ~/.data/julia/packages/PNGFiles/Ee6Hz/src/utils.jl:10
	  __get_bit_depth(::Type{FixedPointNumbers.Normed{T, 16}}) where T at ~/.data/julia/packages/PNGFiles/Ee6Hz/src/utils.jl:11
	  __get_bit_depth(::Type{FixedPointNumbers.Normed{T, N}}) where {T, N} at ~/.data/julia/packages/PNGFiles/Ee6Hz/src/utils.jl:12
	  ...
	===========================================
	ArgumentError: Package ImageMagick [6218d12a-5da1-5696-b52f-db25d2ecc6d1] is required but does not seem to be installed:
	 - Run `Pkg.instantiate()` to install all recorded dependencies.
	 
	===========================================
	ArgumentError: Argument does not support conversion to png.
	===========================================
	 
	Fatal error:
	ERROR: MethodError: no method matching __get_bit_depth(::Type{Any})
	Closest candidates are:
	  __get_bit_depth(::Type{FixedPointNumbers.Normed{T, 8}}) where T at ~/.data/julia/packages/PNGFiles/Ee6Hz/src/utils.jl:10
	  __get_bit_depth(::Type{FixedPointNumbers.Normed{T, 16}}) where T at ~/.data/julia/packages/PNGFiles/Ee6Hz/src/utils.jl:11
	  __get_bit_depth(::Type{FixedPointNumbers.Normed{T, N}}) where {T, N} at ~/.data/julia/packages/PNGFiles/Ee6Hz/src/utils.jl:12
	  ...
	Stacktrace:
	  [1] _get_bit_depth(img::Matrix{RGB})
	    @ PNGFiles ~/.data/julia/packages/PNGFiles/Ee6Hz/src/utils.jl:4
	  [2] _save(png_ptr::Ptr{Nothing}, info_ptr::Ptr{Nothing}, image::Matrix{RGB}; compression_level::Int64, compression_strategy::Int64, filters::Int64, file_gamma::Nothing, background::Nothing)
	    @ PNGFiles ~/.data/julia/packages/PNGFiles/Ee6Hz/src/io.jl:426
	  [3] save(fpath::String, image::Matrix{RGB}; compression_level::Int64, compression_strategy::Int64, filters::Int64, file_gamma::Nothing, background::Nothing)
	    @ PNGFiles ~/.data/julia/packages/PNGFiles/Ee6Hz/src/io.jl:366
	  [4] save(fpath::String, image::Matrix{RGB})
	    @ PNGFiles ~/.data/julia/packages/PNGFiles/Ee6Hz/src/io.jl:340
	  [5] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
	    @ Base ./essentials.jl:729
	  [6] invokelatest(::Any, ::Any, ::Vararg{Any})
	    @ Base ./essentials.jl:726
	  [7] (::LazyModules.LazyFunction)(::String, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
	    @ LazyModules ~/.data/julia/packages/LazyModules/d9Be6/src/LazyModules.jl:29
	  [8] (::LazyModules.LazyFunction)(::String, ::Vararg{Any})
	    @ LazyModules ~/.data/julia/packages/LazyModules/d9Be6/src/LazyModules.jl:27
	  [9] save(f::File{DataFormat{:PNG}, String}, image::Matrix{RGB}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
	    @ ImageIO ~/.data/julia/packages/ImageIO/xMHN9/src/ImageIO.jl:70
	 [10] save(f::File{DataFormat{:PNG}, String}, image::Matrix{RGB})
	    @ ImageIO ~/.data/julia/packages/ImageIO/xMHN9/src/ImageIO.jl:69
	 [11] #invokelatest#2
	    @ ./essentials.jl:729 [inlined]
	 [12] invokelatest
	    @ ./essentials.jl:726 [inlined]
	 [13] action(call::Symbol, libraries::Vector{Union{Base.PkgId, Module}}, file::Formatted, args::Matrix{RGB}; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
	    @ FileIO ~/.data/julia/packages/FileIO/DtNtF/src/loadsave.jl:219
	 [14] action
	    @ ~/.data/julia/packages/FileIO/DtNtF/src/loadsave.jl:196 [inlined]
	 [15] action(call::Symbol, libraries::Vector{Union{Base.PkgId, Module}}, sym::Symbol, file::String, args::Matrix{RGB}; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
	    @ FileIO ~/.data/julia/packages/FileIO/DtNtF/src/loadsave.jl:185
	 [16] action
	    @ ~/.data/julia/packages/FileIO/DtNtF/src/loadsave.jl:185 [inlined]
	 [17] #save#20
	    @ ~/.data/julia/packages/FileIO/DtNtF/src/loadsave.jl:129 [inlined]
	 [18] save(file::String, args::Matrix{RGB})
	    @ FileIO ~/.data/julia/packages/FileIO/DtNtF/src/loadsave.jl:125
	 [19] top-level scope
	    @ REPL[5]:1
	Stacktrace:
	 [1] handle_error(e::MethodError, q::Base.PkgId, bt::Vector{Union{Ptr{Nothing}, Base.InterpreterIP}})
	   @ FileIO ~/.data/julia/packages/FileIO/DtNtF/src/error_handling.jl:61
	 [2] handle_exceptions(exceptions::Vector{Tuple{Any, Union{Base.PkgId, Module}, Vector}}, action::String)
	   @ FileIO ~/.data/julia/packages/FileIO/DtNtF/src/error_handling.jl:56
	 [3] action(call::Symbol, libraries::Vector{Union{Base.PkgId, Module}}, file::Formatted, args::Matrix{RGB}; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
	   @ FileIO ~/.data/julia/packages/FileIO/DtNtF/src/loadsave.jl:228
	 [4] action
	   @ ~/.data/julia/packages/FileIO/DtNtF/src/loadsave.jl:196 [inlined]
	 [5] action(call::Symbol, libraries::Vector{Union{Base.PkgId, Module}}, sym::Symbol, file::String, args::Matrix{RGB}; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
	   @ FileIO ~/.data/julia/packages/FileIO/DtNtF/src/loadsave.jl:185
	 [6] action
	   @ ~/.data/julia/packages/FileIO/DtNtF/src/loadsave.jl:185 [inlined]
	 [7] #save#20
	   @ ~/.data/julia/packages/FileIO/DtNtF/src/loadsave.jl:129 [inlined]
	 [8] save(file::String, args::Matrix{RGB})
	   @ FileIO ~/.data/julia/packages/FileIO/DtNtF/src/loadsave.jl:125
	 [9] top-level scope
	   @ REPL[5]:1
	 
	(v1.8) julia>

Thread safety

I think the following lines make PNGFiles thread-unsafe:

png_error_handler(::Ptr{Cvoid}, msg::Cstring) = error("Png error: $(unsafe_string(msg))")
png_warn_handler(::Ptr{Cvoid}, msg::Cstring) = @warn("Png warn: $(unsafe_string(msg))")
const png_error_fn = @cfunction(png_error_handler, Cvoid, (Ptr{Cvoid}, Cstring))
const png_warn_fn = @cfunction(png_warn_handler, Cvoid, (Ptr{Cvoid}, Cstring))

I am processing several png files using a Threads.@threads for loop, and was experiencing segfaults inside libpng (see below). The issue was fixed when I Pkg.develop'ed a local copy of PNGFiles where I replaced the lines above with:

const png_error_fn = C_NULL
const png_warn_fn = C_NULL

Here is the stack trace for the segfault:

signal (11): Segmentation fault
in expression starting at /home/eslgastal/2020-06-15/compute.jl:121
unknown function (ip: 0x7f9d3024a8c0)
png_chunk_warning at /home/eslgastal/.julia/artifacts/fde66b05ecccc23aa019c75b8276022a41c4e6d0/lib/libpng16.so (unknown line)
png_chunk_benign_error at /home/eslgastal/.julia/artifacts/fde66b05ecccc23aa019c75b8276022a41c4e6d0/lib/libpng16.so (unknown line)
png_chunk_report at /home/eslgastal/.julia/artifacts/fde66b05ecccc23aa019c75b8276022a41c4e6d0/lib/libpng16.so (unknown line)
png_compare_ICC_profile_with_sRGB at /home/eslgastal/.julia/artifacts/fde66b05ecccc23aa019c75b8276022a41c4e6d0/lib/libpng16.so (unknown line)
png_icc_set_sRGB at /home/eslgastal/.julia/artifacts/fde66b05ecccc23aa019c75b8276022a41c4e6d0/lib/libpng16.so (unknown line)
png_handle_iCCP at /home/eslgastal/.julia/artifacts/fde66b05ecccc23aa019c75b8276022a41c4e6d0/lib/libpng16.so (unknown line)
png_read_info at /home/eslgastal/.julia/artifacts/fde66b05ecccc23aa019c75b8276022a41c4e6d0/lib/libpng16.so (unknown line)
png_read_info at /home/eslgastal/.julia/packages/PNGFiles/FdiUu/gen/libpng/libpng_api.jl:96 [inlined]
#_load#4 at /home/eslgastal/.julia/packages/PNGFiles/FdiUu/src/io.jl:55
_load##kw at /home/eslgastal/.julia/packages/PNGFiles/FdiUu/src/io.jl:55 [inlined]
#load#2 at /home/eslgastal/.julia/packages/PNGFiles/FdiUu/src/io.jl:28
load at /home/eslgastal/.julia/packages/PNGFiles/FdiUu/src/io.jl:23
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2145 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2323
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1700 [inlined]
do_apply at /buildworker/worker/package_linux64/build/src/builtins.c:643
jl_f__apply_latest at /buildworker/worker/package_linux64/build/src/builtins.c:693
#invokelatest#1 at ./essentials.jl:712 [inlined]
invokelatest at ./essentials.jl:711
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2145 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2323
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1700 [inlined]
do_apply at /buildworker/worker/package_linux64/build/src/builtins.c:643
#load#1 at /home/eslgastal/.julia/packages/ImageIO/YBIwT/src/ImageIO.jl:13
load at /home/eslgastal/.julia/packages/ImageIO/YBIwT/src/ImageIO.jl:9
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2145 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2323
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1700 [inlined]
do_apply at /buildworker/worker/package_linux64/build/src/builtins.c:643
jl_f__apply_latest at /buildworker/worker/package_linux64/build/src/builtins.c:693
#invokelatest#1 at ./essentials.jl:712 [inlined]
invokelatest at ./essentials.jl:711 [inlined]
#load#27 at /home/eslgastal/.julia/packages/FileIO/ZknoK/src/loadsave.jl:181
load at /home/eslgastal/.julia/packages/FileIO/ZknoK/src/loadsave.jl:166 [inlined]
#load#13 at /home/eslgastal/.julia/packages/FileIO/ZknoK/src/loadsave.jl:118 [inlined]
load at /home/eslgastal/.julia/packages/FileIO/ZknoK/src/loadsave.jl:118 [inlined]
macro expansion at /home/eslgastal/2020-06-15/compute.jl:108 [inlined]
#12#threadsfor_fun at ./threadingconstructs.jl:61
#12#threadsfor_fun at ./threadingconstructs.jl:28
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2145 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2323
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1700 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:687
unknown function (ip: (nil))
Allocations: 1747114737 (Pool: 1746422726; Big: 692011); GC: 78

A hidden bug caused by indirect array (possibly)

using Colors, Downloads, PNGFiles
img = PNGFiles.load(Downloads.download("https://raw.githubusercontent.com/guo-yong-zhi/WordCloud.jl/master/res/heart_mask.png"))
# img = img |> collect # this line is the key. Cancel the comment and the error will disappear
@show typeof(img)
for i in eachindex(img)
    try
        img[i]=convert(eltype(img), Colors.alphacolor(RGB(0.0,0.0,0.0), Colors.alpha(img[i])))
    catch e
        println("!!! ", img[i], " #", i)
        rethrow(e)
    end
end

typeof(img) = IndirectArrays.IndirectArray{RGBA{FixedPointNumbers.N0f8}, 2, UInt8, Matrix{UInt8}, OffsetArrays.OffsetVector{RGBA{FixedPointNumbers.N0f8}, Vector{RGBA{FixedPointNumbers.N0f8}}}}
!!! RGBA{N0f8}(1.0,0.753,0.796,0.506) #176117
InexactError: trunc(UInt8, 256)
Stacktrace:
[1] throw_inexacterror(f::Symbol, #unused#::Type{UInt8}, val::Int64)
@ Core .\boot.jl:614
[2] checked_trunc_uint
@ .\boot.jl:644 [inlined]
[3] toUInt8
@ .\boot.jl:706 [inlined]
[4] UInt8
@ .\boot.jl:766 [inlined]
[5] convert
@ .\number.jl:7 [inlined]
[6] setindex!
@ .\array.jl:966 [inlined]
[7] setindex!(A::IndirectArrays.IndirectArray{RGBA{FixedPointNumbers.N0f8}, 2, UInt8, Matrix{UInt8}, OffsetArrays.OffsetVector{RGBA{FixedPointNumbers.N0f8}, Vector{RGBA{FixedPointNumbers.N0f8}}}}, x::RGBA{FixedPointNumbers.N0f8}, i::Int64)
@ IndirectArrays C:\Users\me.julia\packages\IndirectArrays\BUQO3\src\IndirectArrays.jl:80
[8] top-level scope
@ .\In[3]:7


versioninfo()
Julia Version 1.8.3
Commit 0434deb161 (2022-11-14 20:14 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 8 × Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
Threads: 1 on 8 virtual cores


Status C:\Users\me\.julia\environments\v1.8\Project.toml
[35d6a980] ColorSchemes v3.20.0
[5ae59095] Colors v0.12.10
[5789e2e9] FileIO v1.16.0
[82e4d734] ImageIO v0.6.6
[916415d5] Images v0.25.2
[a98d9a8b] Interpolations v0.14.7
[ae8d54c2] Luxor v3.7.0
[f57f5aa1] PNGFiles v0.3.17
[90137ffa] StaticArrays v1.5.19

Figure out the length of palette before calling `png_get_PLTE`

Currently, when processing paletted images, we first prepare a palette color buffer of maximum size (PNG_MAX_PALETTE_LENGTH, 256), then we query the file to populate the buffer and finally we resize the buffer to match the number of the color entries in the file. As @t-bltg noted (#47 (comment)), there is a way to know the palette length before populating the buffer, in which case we could simply create the buffer of the correct size.

IIUC, to be able to get the palette length early, one has to use libpng transformation (see the comment referenced above), so we need to figure out how to do it and whether it's beneficial in terms of performance.

Segfaults

Segfaults not on all images, doesn't seem to be related to the PNGFiles version.

bug.jl

import PNGFiles, Downloads

@show 100
PNGFiles.load(Downloads.download("https://github.com/JuliaLang/julia-logo-graphics/raw/master/images/julia-logo-color.png"))

@show 200
PNGFiles.load(Downloads.download("https://github.com/JuliaPlots/PlotReferenceImages.jl/raw/master/Plots/gr/1.22.1/ref24.png"))
$ julia bug.jl
100 = 100
200 = 200
malloc(): corrupted top size

Xref JuliaPlots/Plots.jl#4091. The reference image for Plots here is quite old so this must be a regression somewhere else.

ARGB support

It works normally for RGBA but in ARGB case, the saving image is a blue bar 😥

img = ARGB.(repeat(colormap("Reds"), 1, 10))
PNGFiles.save("argb_test.png", img)

got a palette undefined but needed in log record

Error: Exception while generating log record in module PNGFiles at /home/jpboth/.julia/packages/PNGFiles/Ee6Hz/src/io.jl:480
│ exception =
│ UndefVarError: palette not defined

Pb seems read_as_paletted is false, see below and so palette got undefined

Debug: Read PNG info:
│ PNG_HEADER_VERSION_STRING = " libpng version 1.6.37 - April 14, 2019\n"
│ png_ptr = Ptr{Nothing} @0x00000000135a6280
│ height = 0x00000040
│ width = 0x00000040
│ color_type_orig = 0x06
│ color_type = 0x06
│ bit_depth_orig = 0x10
│ bit_depth = 0x10
│ num_channels = 0x04
│ interlace_type = 0x00
│ gamma = nothing
│ image_gamma[] = 0.45455
│ screen_gamma = -1
│ background = false
│ intent[] = -1
│ read_as_paletted = false
│ n_passes = 1
│ buffer_eltype = ColorTypes.RGBA{FixedPointNumbers.N0f16}
│ valid_sRGB = false
│ valid_gAMA = true
│ valid_tRNS = false
│ valid_cHRM = true
│ valid_bKGD = true
│ valid_PLTE = false

Working with SparseArrays

I'm not sure where to report this one. Essentially I was hoping to create a PNG from a SparseArray. The MWE follows.

using PNGFiles
using SparseArrays
using ColorSchemes
using ColorVectorSpace # supplies zero(::ColorTypes.RGB{Float64}).

sm = sparse([1,2,3], [4,5,6], [7,8,9])
coloured = get(ColorSchemes.bwr, sm)
PNGFiles.save("sm.png", coloured)

Below is the error produced from the example.

ERROR: conversion to pointer not defined for SparseMatrixCSC{ColorTypes.RGB{FixedPointNumbers.N0f8}, Int64}
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] unsafe_convert(#unused#::Type{Ptr{ColorTypes.RGB{FixedPointNumbers.N0f8}}}, a::SparseMatrixCSC{ColorTypes.RGB{FixedPointNumbers.N0f8}, Int64})
    @ Base ./pointer.jl:67
  [3] unsafe_convert(#unused#::Type{Ptr{ColorTypes.RGB{FixedPointNumbers.N0f8}}}, V::SubArray{ColorTypes.RGB{FixedPointNumbers.N0f8}, 1, SparseMatrixCSC{ColorTypes.RGB{FixedPointNumbers.N0f8}, Int64}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, false})
    @ Base ./subarray.jl:427
  [4] pointer(x::SubArray{ColorTypes.RGB{FixedPointNumbers.N0f8}, 1, SparseMatrixCSC{ColorTypes.RGB{FixedPointNumbers.N0f8}, Int64}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, false})
    @ Base ./abstractarray.jl:1116
  [5] iterate
    @ ./generator.jl:47 [inlined]
  [6] collect
    @ ./array.jl:678 [inlined]
  [7] map
    @ ./abstractarray.jl:2323 [inlined]
  [8] _write_image
    @ ~/.julia/packages/PNGFiles/RzNQB/src/io.jl:428 [inlined]
  [9] _save(png_ptr::Ptr{Nothing}, info_ptr::Ptr{Nothing}, image::SparseMatrixCSC{ColorTypes.RGB{Float64}, Int64}; compression_level::Int64, compression_strategy::Int64, filters::Int64, palette::Nothing)
    @ PNGFiles ~/.julia/packages/PNGFiles/RzNQB/src/io.jl:416
 [10] save(fpath::String, image::SparseMatrixCSC{ColorTypes.RGB{Float64}, Int64}; compression_level::Int64, compression_strategy::Int64, filters::Int64, palette::Nothing)
    @ PNGFiles ~/.julia/packages/PNGFiles/RzNQB/src/io.jl:296
 [11] save(fpath::String, image::SparseMatrixCSC{ColorTypes.RGB{Float64}, Int64})
    @ PNGFiles ~/.julia/packages/PNGFiles/RzNQB/src/io.jl:283
 [12] top-level scope
    @ REPL[7]:1

I think there is a missing unsafe_convert method for SparseArray?

Julia nightly: ERROR: TypeError: in RefArray, in A, expected A<:(AbstractArray{Ptr{UInt8}}), got Type{Vector{Ptr{Gray{N0f8}}}}

julia> using PNGFiles

julia> PNGFiles.load(pkgdir(PNGFiles, "test/temp/PngSuite/basi0g01.png"))
ERROR: TypeError: in RefArray, in A, expected A<:(AbstractArray{Ptr{UInt8}}), got Type{Vector{Ptr{Gray{N0f8}}}}
Stacktrace:
  [1] Ref{Ptr{UInt8}}(a::Vector{Ptr{Gray{N0f8}}})
    @ Base ./refpointer.jl:158
  [2] cconvert(::Type{Ptr{Ptr{UInt8}}}, a::Vector{Ptr{Gray{N0f8}}})
    @ Base ./refpointer.jl:176
  [3] png_read_image(png_ptr::Ptr{Nothing}, image::Vector{Ptr{Gray{N0f8}}})
    @ PNGFiles ~/.julia/dev/PNGFiles/gen/libpng/libpng_api.jl:558
  [4] _load!(buffer::Matrix{Gray{N0f8}}, png_ptr::Ptr{Nothing}, info_ptr::Ptr{Nothing})
    @ PNGFiles ~/.julia/dev/PNGFiles/src/io.jl:256
  [5] #invokelatest#2
    @ Base ./essentials.jl:955 [inlined]
  [6] invokelatest
    @ Base ./essentials.jl:952 [inlined]
  [7] _load(png_ptr::Ptr{Nothing}, info_ptr::Ptr{Nothing}; gamma::Nothing, expand_paletted::Bool, background::Bool)
    @ PNGFiles ~/.julia/dev/PNGFiles/src/io.jl:243
  [8] _load
    @ PNGFiles ~/.julia/dev/PNGFiles/src/io.jl:105 [inlined]
  [9] load(fpath::String; gamma::Nothing, expand_paletted::Bool, background::Bool)
    @ PNGFiles ~/.julia/dev/PNGFiles/src/io.jl:54
 [10] load(fpath::String)
    @ PNGFiles ~/.julia/dev/PNGFiles/src/io.jl:47
 [11] top-level scope
    @ REPL[8]:1

function png_read_image(png_ptr, image)
ccall((:png_read_image, libpng), Cvoid, (png_structrp, png_bytepp), png_ptr, image)
end

PNGFiles.jl/src/io.jl

Lines 255 to 260 in f1bf24f

function _load!(buffer::Matrix{T}, png_ptr, info_ptr) where T # separate to support precompilation of permutedims
png_read_image(png_ptr, map(pointer, eachcol(buffer)))
png_read_end(png_ptr, info_ptr)
png_destroy_read_struct(Ref{Ptr{Cvoid}}(png_ptr), Ref{Ptr{Cvoid}}(info_ptr), C_NULL)
return permutedims(buffer, (2, 1))
end

IOBuffer support

following all the way from JuliaIO/ImageIO.jl#6 and JuliaImages/Images.jl#912, it turns out #14 isn't so generic...

Tracking down with debugger, here's a minimal example that reproduces the issue:

julia> using Base64, ImageCore, PNGFiles

julia> io = Base64EncodePipe(IOBuffer())

julia> img = rand(RGB{N0f8}, 2, 2)

julia> PNGFiles.save(io, img)

The result take!(io.io) is then passed down to VSCode or whatever displayer.

I'm not familiar with libpng and C bindings to fix the issue, but the root problem seems to be

png_set_write_fn(png_ptr, s.handle, writecallback_c[], C_NULL)

Instead of writing to file handle, here we need to write contents to IO buffer via the Base64 encoder pipe s. I don't know how the pointer of s can be passed to libpng, though. Any guidance would be helpful.

Other related PRs:

Load from a TCPSocket doesn't work

I have a simple server that just serves up a raw PNG file any client that connects. In Julia I wrote the following function to attempt to load that image.

function ReadTeensyImage(server)
    sock = Sockets.connect(server,555)
    img = load(sock)
    close(sock)
    return img
end

When calling the above function, I get the error below. From what I can tell, the library assumes the IO object has a lock function unless it is a specific type that does not. This approach seems problematic for other packages to add IO types that don't support locking.

Errors encountered while load Stream{DataFormat{:PNG}, TCPSocket, Nothing}(TCPSocket(Base.Libc.WindowsRawSocket(0x0000000000003160) open, 1214 bytes waiting), nothing).
All errors:
===========================================
MethodError: no method matching lock(::PNGFiles.var"#4#5"{Nothing, Bool, Bool, TCPSocket, Ptr{Nothing}, Ptr{Nothing}}, ::TCPSocket)
Closest candidates are:
  lock(::Any, ::Base.GenericCondition) at C:\Users\joey\AppData\Local\Programs\Julia-1.7.2\share\julia\base\condition.jl:78
  lock(::Any, ::Base.AbstractLock) at C:\Users\joey\AppData\Local\Programs\Julia-1.7.2\share\julia\base\lock.jl:187
  lock(::Any, ::Channel) at C:\Users\joey\AppData\Local\Programs\Julia-1.7.2\share\julia\base\channels.jl:425
  ...
===========================================
MethodError: no method matching fd(::TCPSocket)
Closest candidates are:
  fd(::IOStream) at C:\Users\joey\AppData\Local\Programs\Julia-1.7.2\share\julia\base\iostream.jl:55
  fd(::Base.Filesystem.File) at C:\Users\joey\AppData\Local\Programs\Julia-1.7.2\share\julia\base\filesystem.jl:264
===========================================

Fatal error:
ERROR: MethodError: no method matching lock(::PNGFiles.var"#4#5"{Nothing, Bool, Bool, TCPSocket, Ptr{Nothing}, Ptr{Nothing}}, ::TCPSocket)
Closest candidates are:
  lock(::Any, ::Base.GenericCondition) at C:\Users\joey\AppData\Local\Programs\Julia-1.7.2\share\julia\base\condition.jl:78
  lock(::Any, ::Base.AbstractLock) at C:\Users\joey\AppData\Local\Programs\Julia-1.7.2\share\julia\base\lock.jl:187
  lock(::Any, ::Channel) at C:\Users\joey\AppData\Local\Programs\Julia-1.7.2\share\julia\base\channels.jl:425
  ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.