Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MethodError calling jl_show from embedding API #20580

Closed
ihnorton opened this issue Feb 12, 2017 · 2 comments
Closed

MethodError calling jl_show from embedding API #20580

ihnorton opened this issue Feb 12, 2017 · 2 comments
Assignees
Labels
embedding Embedding Julia using the C API
Milestone

Comments

@ihnorton
Copy link
Member

This worked in 0.5. Reduced from examples/embedding.c.

(see #20535 for build fixes if needed)

int main()
{
    jl_init(JULIA_INIT_DIR);

    jl_value_t* rv = jl_eval_string("UndefVarError(:foo)");

    jl_show(jl_stderr_obj(), rv);

    int ret = 0;
    jl_atexit_hook(ret);
    return ret;
}
fatal: error thrown and no exception handler available.
Base.MethodError(f=Base.#show(), args=(Base.TTY(handle=0x00007f9d29c54cd0, status=3, buffer=Base.AbstractIOBuffer{Array{UInt8, 1}}(data=Array{UInt8, 1}[], readable=true, writable=true, seekable=false, append=true, size=0, maxsize=9223372036854775807, ptr=1, mark=-1), readnotify=Base.Condition(waitq=Array{Any, 1}[]), closenotify=Base.Condition(waitq=Array{Any, 1}[]), sendbuf=Base.Nullable{Base.AbstractIOBuffer{Array{UInt8, 1}}}(hasvalue=false, value=#<null>), lock=Base.ReentrantLock(locked_by=Base.Nullable{Task}(hasvalue=false, value=#<null>), cond_wait=Base.Condition(waitq=Array{Any, 1}[]), reentrancy_cnt=0), throttle=10485760), UndefVarError(var=:foo)), world=0x0000000000000000)
rec_backtrace at /Users/inorton/git/julia/usr/lib/libjulia.dylib (unknown line)
jl_throw at /Users/inorton/git/julia/usr/lib/libjulia.dylib (unknown line)
jl_method_error_bare at /Users/inorton/git/julia/usr/lib/libjulia.dylib (unknown line)
jl_method_error at /Users/inorton/git/julia/usr/lib/libjulia.dylib (unknown line)
jl_apply_generic at /Users/inorton/git/julia/usr/lib/libjulia.dylib (unknown line)
jl_show at /Users/inorton/git/julia/usr/lib/libjulia.dylib (unknown line)
main at /Users/inorton/git/julia/examples/./embedding (unknown line)
@ihnorton ihnorton added the embedding Embedding Julia using the C API label Feb 12, 2017
@ihnorton ihnorton changed the title MethodError calling jl_show from embedding MethodError calling jl_show from embedding API Feb 12, 2017
@vtjnash
Copy link
Member

vtjnash commented Feb 12, 2017

Looks like jl_show needs to be updated for #265 fix (or just gotten rid of)

ihnorton added a commit to ihnorton/julia that referenced this issue Feb 13, 2017
ihnorton added a commit to ihnorton/julia that referenced this issue Feb 13, 2017
ihnorton added a commit to ihnorton/julia that referenced this issue Feb 16, 2017
ihnorton added a commit to ihnorton/julia that referenced this issue Feb 16, 2017
ihnorton added a commit to ihnorton/julia that referenced this issue Feb 25, 2017
ihnorton added a commit to ihnorton/julia that referenced this issue Feb 25, 2017
ihnorton added a commit to ihnorton/julia that referenced this issue Feb 26, 2017
ihnorton added a commit to ihnorton/julia that referenced this issue Mar 22, 2017
@JeffBezanson JeffBezanson added this to the 0.6.0 milestone Mar 22, 2017
ihnorton added a commit to ihnorton/julia that referenced this issue Mar 23, 2017
@JeffBezanson JeffBezanson self-assigned this Apr 6, 2017
@JeffBezanson
Copy link
Member

Fixed by #21299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
embedding Embedding Julia using the C API
Projects
None yet
Development

No branches or pull requests

3 participants