Giter VIP home page Giter VIP logo

Comments (14)

t-bltg avatar t-bltg commented on June 13, 2024

Hum, I've shamelessly copied a portion of FreeTypeAbstraction.jl in #294 to reduce dependencies (user request at #291).

However, the WARNING: redefinition is weird, since the code lives in https://github.com/JuliaPlots/UnicodePlots.jl/blob/master/ext/FreeTypeExt.jl now, which is a dedicated module.

Is it on 1.9.0-beta4 with package extensions - weak deps or on an earlier julia version (thus using Requires) ?

from unicodeplots.jl.

ExpandingMan avatar ExpandingMan commented on June 13, 2024

This is on 1.8.5.

from unicodeplots.jl.

t-bltg avatar t-bltg commented on June 13, 2024

Could you clarify what the reproducer is (with versions) ?

This doesn't give me anything, neither on 1.8.5, nor on 1.9.0-beta4 (linux):

$ julia
julia> using FreeType, FileIO  # optional, make sure `FreeTypeExt` from `UnicodePlots` will be loaded
julia> using CairoMakie
julia> using UnicodePlots  # the import order doesn't seem to matter
julia> exit(0)
$ # no warnings ?

On [email protected], [email protected].

from unicodeplots.jl.

ExpandingMan avatar ExpandingMan commented on June 13, 2024

Here is a MWE, in a fresh environment, I get

◖◗ using UnicodePlots, CairoMakie
[ Info: Precompiling CairoMakie [13f3f980-e62b-5c42-98c6-ff1f3baf88f0]
WARNING: Makie.MakieLayout is deprecatedThe module `MakieLayout` has been removed and integrated into Makie, so simply replace all usage of `MakieLayout` with `Makie`.
  likely near none:1
WARNING: importing deprecated binding Makie.MakieLayout into CairoMakie.
WARNING: redefinition of constant FT_LIB. This may fail, cause incorrect answers, or produce other errors.
WARNING: redefinition of constant VALID_FONTPATHS. This may fail, cause incorrect answers, or produce other errors.
WARNING: redefinition of constant FT_FONTS. This may fail, cause incorrect answers, or produce other errors.

Manifest.log
Project.log

Here are the project and manifest of the environment... I had to change the extension to .log to trick github into letting me upload them, how silly.

This is on linux btw.

from unicodeplots.jl.

t-bltg avatar t-bltg commented on June 13, 2024

Hum, still nothing on my side on 1.8.5.
Anything special in your startup.jl ? Maybe Revise ?

from unicodeplots.jl.

ExpandingMan avatar ExpandingMan commented on June 13, 2024

Revise and OhMyREPL. My startup.jl can be found here.

Perhaps Revise is improperly trying to redefine stuff for some reason?

from unicodeplots.jl.

t-bltg avatar t-bltg commented on June 13, 2024

Right, that's Revise interfering for whatever reason:

julia> VERSION
v"1.8.5"
julia> using Revise
julia> using UnicodePlots, CairoMakie
WARNING: redefinition of constant FT_LIB. This may fail, cause incorrect answers, or produce other errors.
WARNING: redefinition of constant VALID_FONTPATHS. This may fail, cause incorrect answers, or produce other errors.
WARNING: redefinition of constant FT_FONTS. This may fail, cause incorrect answers, or produce other errors.
julia> UnicodePlots.FreeTypeExt
UnicodePlots.FreeTypeExt

But it doesn't occur on 1.9.0-beta4 (package extensions - weak deps):

julia> VERSION
v"1.9.0-beta4"
julia> using Revise
julia> using UnicodePlots, CairoMakie
julia> Base.get_extension(UnicodePlots, :FreeTypeExt)
FreeTypeExt

from unicodeplots.jl.

ExpandingMan avatar ExpandingMan commented on June 13, 2024

Hm... worth opening an issue with Revise maybe? I assume there must be something unusual happening, do you have an idea what might specifically be causing Revise to do this?

from unicodeplots.jl.

t-bltg avatar t-bltg commented on June 13, 2024

do you have an idea what might specifically be causing Revise to do this?

Nope no idea, I think UnicodePlots using Requires with multiple requirements is valid, and the offending code defining FT_LIB, VALID_FONTPATHS and friends in enclosed in a module, so it shouldn't happen.

Looks like __init__ is called twice somehow.

worth opening an issue with Revise maybe?

Ping @timholy if he has any clue on this (hoping he's not too busy 🙂 ).

from unicodeplots.jl.

asinghvi17 avatar asinghvi17 commented on June 13, 2024

From the error statement, it seems like CairoMakie is out of date.

Could you post the version of CairoMakie and Makie for which this happened? Perhaps upgrading may help here.

from unicodeplots.jl.

t-bltg avatar t-bltg commented on June 13, 2024

CairoMakie 0.10.2 is already the latest release (Makie 0.19.2), see the .log posted by @ExpandingMan.

from unicodeplots.jl.

ericphanson avatar ericphanson commented on June 13, 2024

I'm getting crashes in a complicated setup with PythonCall in a package for which UnicodePlots is an indirect dependency which seems to point at this:

#25 63.34 WARNING: redefinition of constant FT_LIB. This may fail, cause incorrect answers, or produce other errors.
#25 63.34 WARNING: redefinition of constant VALID_FONTPATHS. This may fail, cause incorrect answers, or produce other errors.
#25 63.41 WARNING: redefinition of constant FT_FONTS. This may fail, cause incorrect answers, or produce other errors.
#25 84.61 WARNING: redefinition of constant FT_LIB. This may fail, cause incorrect answers, or produce other errors.
#25 84.61 WARNING: redefinition of constant VALID_FONTPATHS. This may fail, cause incorrect answers, or produce other errors.
#25 84.66 WARNING: redefinition of constant FT_FONTS. This may fail, cause incorrect answers, or produce other errors.
#25 95.74 Library == CNULL. done() called before init(), or done called two times?
#25 97.03 Stacktrace:
#25 97.03  [1] error(s::String)
#25 97.07    @ Base ./error.jl:35
#25 97.07  [2] ft_done()
#25 97.07    @ UnicodePlots.FreeTypeExt ~/.julia/packages/UnicodePlots/VGDaL/ext/FreeTypeExt.jl:421
#25 97.07  [3] _atexit()
#25 97.07    @ Base ./initdefs.jl:372
#25 101.9 WARNING: redefinition of constant FT_LIB. This may fail, cause incorrect answers, or produce other errors.
#25 101.9 WARNING: redefinition of constant VALID_FONTPATHS. This may fail, cause incorrect answers, or produce other errors.
#25 102.0 WARNING: redefinition of constant FT_FONTS. This may fail, cause incorrect answers, or produce other errors.
#25 113.8 Library == CNULL. done() called before init(), or done called two times?
#25 115.5 Stacktrace:
#25 115.5  [1] error(s::String)
#25 115.5    @ Base ./error.jl:35
#25 115.5  [2] ft_done()
#25 115.5    @ UnicodePlots.FreeTypeExt ~/.julia/packages/UnicodePlots/VGDaL/ext/FreeTypeExt.jl:421
#25 115.5  [3] _atexit()
#25 115.5    @ Base ./initdefs.jl:372
#25 120.2 WARNING: redefinition of constant FT_LIB. This may fail, cause incorrect answers, or produce other errors.
#25 120.2 WARNING: redefinition of constant VALID_FONTPATHS. This may fail, cause incorrect answers, or produce other errors.
#25 120.3 WARNING: redefinition of constant FT_FONTS. This may fail, cause incorrect answers, or produce other errors.
#25 131.4 Library == CNULL. done() called before init(), or done called two times?
#25 133.1 Stacktrace:
#25 133.1  [1] error(s::String)
#25 133.2    @ Base ./error.jl:35
#25 133.2  [2] ft_done()
#25 133.2    @ UnicodePlots.FreeTypeExt ~/.julia/packages/UnicodePlots/VGDaL/ext/FreeTypeExt.jl:421
#25 133.2  [3] _atexit()
#25 133.2    @ Base ./initdefs.jl:372
#25 134.2 fatal: error thrown and no exception handler available.
#25 134.2 InitError(mod=:C, error=ErrorException("no environment in the LOAD_PATH (["/root/.julia/environments/v1.8/Project.toml", "/usr/local/julia/share/julia/stdlib/v1.8"]) depends on CondaPkg"))
#25 134.3 error at ./error.jl:35
#25 134.3 _resolve_top_env at /root/.julia/packages/CondaPkg/j2Cct/src/resolve.jl:16
#25 134.3 #resolve#38 at /root/.julia/packages/CondaPkg/j2Cct/src/resolve.jl:404
#25 134.4 resolve at /root/.julia/packages/CondaPkg/j2Cct/src/resolve.jl:384
#25 134.4 envdir at /root/.julia/packages/CondaPkg/j2Cct/src/env.jl:70 [inlined]
#25 134.4 init_context at /root/.julia/packages/PythonCall/XgP8G/src/cpython/context.jl:56
#25 134.4 __init__ at /root/.julia/packages/PythonCall/XgP8G/src/cpython/CPython.jl:21
#25 134.4 jfptr___init___165614 at /deps.so (unknown line)
#25 134.4 _jl_invoke at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined]
#25 134.4 ijl_apply_generic at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/gf.c:2549
#25 134.4 jl_apply at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/julia.h:1839 [inlined]
#25 134.4 jl_module_run_initializer at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/toplevel.c:75
#25 134.4 _finish_julia_init at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/init.c:765
#25 134.4 julia_init at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/init.c:698
#25 134.4 jl_repl_entrypoint at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/jlapi.c:713
#25 134.4 main at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/cli/loader_exe.c:59
#25 134.4 __libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
#25 134.4 unknown function (ip: 0x401098)

from unicodeplots.jl.

ericphanson avatar ericphanson commented on June 13, 2024

Actually I think the real error is unrelated (InitError(mod=:C, error=ErrorException("no environment in the LOAD_PATH ...) and this issue is just scary warning spam

from unicodeplots.jl.

t-bltg avatar t-bltg commented on June 13, 2024

I've opened an upstream report at timholy/Revise.jl#736 with a minimal reproducer, since I believe this is an upstream Revise bug.

from unicodeplots.jl.

Related Issues (20)

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.