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

access violation during tab completion in REPL #28931

Closed
arnfaldur opened this issue Aug 28, 2018 · 2 comments
Closed

access violation during tab completion in REPL #28931

arnfaldur opened this issue Aug 28, 2018 · 2 comments
Labels
bug Indicates an unexpected problem or unintended behavior REPL Julia's REPL (Read Eval Print Loop)

Comments

@arnfaldur
Copy link

arnfaldur commented Aug 28, 2018

I was trying to use tab completion on a HTML object from the Gumbo package. I assume that this problem has less to do with the package than julia as it was a hard crash while trying to auto complete an element's field. As you can see i'm indexing the object which might cause type inference issues and after typing the dot and pressing tab it crashed immediately.

I am using Julia 1.0 on windows 10.

julia> b.root.children[2].
Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x6b5e41b2 -- gc_setmark_pool_ at /home/Administrator/buildbot/worker/package_win64/build/src\gc.c:581 [inlined]
gc_setmark_pool at /home/Administrator/buildbot/worker/package_win64/build/src\gc.c:603 [inlined]
gc_setmark at /home/Administrator/buildbot/worker/package_win64/build/src\gc.c:610 [inlined]
gc_mark_loop at /home/Administrator/buildbot/worker/package_win64/build/src\gc.c:2174
in expression starting at no file:0
gc_queue_big_marked at /home/Administrator/buildbot/worker/package_win64/build/src\gc.c:506 [inlined]
gc_setmark_big at /home/Administrator/buildbot/worker/package_win64/build/src\gc.c:554 [inlined]
gc_setmark_buf_ at /home/Administrator/buildbot/worker/package_win64/build/src\gc.c:636 [inlined]
gc_mark_loop at /home/Administrator/buildbot/worker/package_win64/build/src\gc.c:2127
_jl_gc_collect at /home/Administrator/buildbot/worker/package_win64/build/src\gc.c:2468
jl_gc_collect at /home/Administrator/buildbot/worker/package_win64/build/src\gc.c:2633
jl_gc_pool_alloc at /home/Administrator/buildbot/worker/package_win64/build/src\gc.c:954 [inlined]
jl_gc_alloc_ at /home/Administrator/buildbot/worker/package_win64/build/src\julia_internal.h:274 [inlined]
jl_gc_alloc at /home/Administrator/buildbot/worker/package_win64/build/src\gc.c:2668
jl_gc_alloc_buf at /home/Administrator/buildbot/worker/package_win64/build/src\julia_internal.h:296 [inlined]
array_resize_buffer at /home/Administrator/buildbot/worker/package_win64/build/src\array.c:649
jl_array_grow_at_end at /home/Administrator/buildbot/worker/package_win64/build/src\array.c:838 [inlined]
jl_array_grow_end at /home/Administrator/buildbot/worker/package_win64/build/src\array.c:902
_growend! at .\array.jl:814 [inlined]
push! at .\array.jl:862
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2182
add_backedge! at .\compiler\inferencestate.jl:213
abstract_call_method_with_const_args at .\compiler\abstractinterpretation.jl:195
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:91
abstract_call at .\compiler\abstractinterpretation.jl:779
abstract_eval_call at .\compiler\abstractinterpretation.jl:808
abstract_eval at .\compiler\abstractinterpretation.jl:893
typeinf_local at .\compiler\abstractinterpretation.jl:1117
typeinf_nocycle at .\compiler\abstractinterpretation.jl:1173
typeinf at .\compiler\typeinfer.jl:15
abstract_call_method_with_const_args at .\compiler\abstractinterpretation.jl:191
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:91
abstract_call at .\compiler\abstractinterpretation.jl:779
abstract_eval_call at .\compiler\abstractinterpretation.jl:808
abstract_eval at .\compiler\abstractinterpretation.jl:893
typeinf_local at .\compiler\abstractinterpretation.jl:1117
typeinf_nocycle at .\compiler\abstractinterpretation.jl:1173
typeinf at .\compiler\typeinfer.jl:15
abstract_call_method_with_const_args at .\compiler\abstractinterpretation.jl:191
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:91
abstract_call at .\compiler\abstractinterpretation.jl:779
abstract_eval_call at .\compiler\abstractinterpretation.jl:808
abstract_eval at .\compiler\abstractinterpretation.jl:893
typeinf_local at .\compiler\abstractinterpretation.jl:1117
typeinf_nocycle at .\compiler\abstractinterpretation.jl:1173
typeinf at .\compiler\typeinfer.jl:15
abstract_call_method_with_const_args at .\compiler\abstractinterpretation.jl:191
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:91
abstract_call at .\compiler\abstractinterpretation.jl:779
abstract_eval_call at .\compiler\abstractinterpretation.jl:808
abstract_eval at .\compiler\abstractinterpretation.jl:893
typeinf_local at .\compiler\abstractinterpretation.jl:1103
typeinf_nocycle at .\compiler\abstractinterpretation.jl:1173
typeinf at .\compiler\typeinfer.jl:15
typeinf_edge at .\compiler\typeinfer.jl:492
abstract_call_method at .\compiler\abstractinterpretation.jl:331
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:79
abstract_call at .\compiler\abstractinterpretation.jl:779
abstract_eval_call at .\compiler\abstractinterpretation.jl:808
abstract_eval at .\compiler\abstractinterpretation.jl:893
typeinf_local at .\compiler\abstractinterpretation.jl:1117
typeinf_nocycle at .\compiler\abstractinterpretation.jl:1173
typeinf at .\compiler\typeinfer.jl:15
typeinf_ext at .\compiler\typeinfer.jl:567
typeinf_ext at .\compiler\typeinfer.jl:604
jfptr_typeinf_ext_1.clone_1 at D:\Forrit\Forritun\Julia\Julia-1.0.0\lib\julia\sys.dll (unknown line)
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2182
jl_apply at /home/Administrator/buildbot/worker/package_win64/build/src\julia.h:1536 [inlined]
jl_apply_with_saved_exception_state at /home/Administrator/buildbot/worker/package_win64/build/src\rtutils.c:257
jl_type_infer at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:275
jl_compile_method_internal at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:1784 [inlined]
jl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:1828
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2182
prompt! at .\logging.jl:322
run_interface at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\LineEdit.jl:2256
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2182
run_frontend at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\REPL.jl:1029
run_repl at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\REPL.jl:191
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2182
#720 at .\logging.jl:311
unknown function (ip: 0000000029B40E14)
jl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:1829
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2182
jl_apply at /home/Administrator/buildbot/worker/package_win64/build/src\julia.h:1536 [inlined]
jl_f__apply at /home/Administrator/buildbot/worker/package_win64/build/src\builtins.c:556
jl_f__apply_latest at /home/Administrator/buildbot/worker/package_win64/build/src\builtins.c:594
#invokelatest#1 at .\essentials.jl:686 [inlined]
invokelatest at .\essentials.jl:685 [inlined]
macro expansion at .\logging.jl:308 [inlined]
run_main_repl at .\client.jl:330
exec_options at .\client.jl:242
_start at .\client.jl:421
jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2182
jl_apply at /home/Administrator/buildbot/worker/package_win64/build/src\julia.h:1536 [inlined]
true_main at /home/Administrator/buildbot/worker/package_win64/build/ui\repl.c:112
wmain at /home/Administrator/buildbot/worker/package_win64/build/ui\repl.c:233
__tmainCRTStartup at /usr/src/debug/mingw64-x86_64-runtime-5.0.3-1/crt\crtexe.c:329
mainCRTStartup at /usr/src/debug/mingw64-x86_64-runtime-5.0.3-1/crt\crtexe.c:212
BaseThreadInitThunk at C:\WINDOWS\System32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\WINDOWS\SYSTEM32\ntdll.dll (unknown line)
Allocations: 79399590 (Pool: 79381483; Big: 18107); GC: 180
@ararslan ararslan added the bug Indicates an unexpected problem or unintended behavior label Aug 28, 2018
@JeffBezanson
Copy link
Member

Is this reproducible, i.e. if you do the same steps in a new session the same thing happens? If so, it would be very helpful to have those steps.

@arnfaldur
Copy link
Author

arnfaldur commented Aug 28, 2018

Sorry about that, totally forgot that reproducibility is something I need to test. I tried the sequence that led me to that point and this time Julia seems to have handled it better. Unsure if this is the behavior you want in this situation but here is what happened the second time I tried.

julia> using HTTP

julia> using Gumbo

julia> a = HTTP.get("https://api.scryfall.com/cards/search?order=set&q=e%3A$("AKH")&unique=prints");

julia> b = parsehtml(a.body |> String);

julia> b.root.children[2].┌ Error: Error in the keymap
│   exception =
│    ArgumentError: type does not have a definite number of fields
│    Stacktrace:
│     [1] fieldcount(::Any) at .\reflection.jl:621
│     [2] fieldnames(::DataType) at .\reflection.jl:172
│     [3] complete_symbol(::String, ::getfield(REPL.REPLCompletions, Symbol("##21#25")), ::Module) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\REPLCompletions.jl:157
│     [4] completions(::String, ::Int64, ::Module) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\REPLCompletions.jl:699
│     [5] completions(::String, ::Int64) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\REPLCompletions.jl:569
│     [6] complete_line(::REPL.REPLCompletionProvider, ::Any) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\REPL.jl:348
│     [7] complete_line(::REPL.LineEdit.PromptState, ::Any) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\LineEdit.jl:317
│     [8] complete_line(::REPL.LineEdit.MIState) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\LineEdit.jl:308
│     [9] edit_tab(::REPL.LineEdit.MIState, ::Any, ::Any) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\LineEdit.jl:1942 (repeats 2 times)
│     [10] (::getfield(REPL.LineEdit, Symbol("##108#160")))(::Any, ::Any, ::Vararg{Any,N} where N) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\LineEdit.jl:1983
│     [11] #invokelatest#1 at .\essentials.jl:686 [inlined]
│     [12] invokelatest at .\essentials.jl:685 [inlined]
│     [13] (::getfield(REPL.LineEdit, Symbol("##27#28")){getfield(REPL.LineEdit, Symbol("##108#160")),String})(::Any, ::Any) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\LineEdit.jl:1319
│     [14] prompt!(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\LineEdit.jl:2353
│     [15] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\LineEdit.jl:2256
│     [16] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\REPL.jl:1029
│     [17] run_repl(::REPL.AbstractREPL, ::Any) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\REPL.jl:191
│     [18] (::getfield(Base, Symbol("##720#722")){Bool,Bool,Bool,Bool})(::Module) at .\logging.jl:311
│     [19] #invokelatest#1 at .\essentials.jl:686 [inlined]
│     [20] invokelatest at .\essentials.jl:685 [inlined]
│     [21] macro expansion at .\logging.jl:308 [inlined]
│     [22] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at .\client.jl:330
│     [23] exec_options(::Base.JLOptions) at .\client.jl:242
│     [24] _start() at .\client.jl:421
└ @ REPL.LineEdit C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\LineEdit.jl:2355

I had reassigned the variables a and b a couple of times the first time around, I can follow the exact sequence if you think it might help.

I notice now that it adds this ┌ strange character upon me pressing tab and that is something that seems to be reproducible.

@KristofferC KristofferC added the REPL Julia's REPL (Read Eval Print Loop) label Sep 3, 2018
@vtjnash vtjnash closed this as completed Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

No branches or pull requests

5 participants