# Unknown hang-up in v1.3.1

**URL:** <https://discourse.julialang.org/t/unknown-hang-up-in-v1-3-1/34912>\
**Category:** General Usage\
**Created:** [February 20, 2020, 3:38pm UTC](https://discourse.julialang.org/t/unknown-hang-up-in-v1-3-1/34912 "2020-02-20T15:38:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomtom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomtom/32/5106_2.png) [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Post date:** [February 20, 2020, 3:38pm UTC](https://discourse.julialang.org/t/unknown-hang-up-in-v1-3-1/34912/1 "2020-02-20T15:38:13Z")

</div>

Julia v1.3.1 hangs when running the following call of `pickvarnames(:(a + b))`:

```julia
pickvarnames(ex::Symbol) = ex

function pickvarnames(ex::Expr)
    varnames = ()
    if ex.head == :call
        for arg in ex.args[2:end]
            varnames = (varnames..., pickvarnames(arg) )
        end
    end
    return varnames
end

julia> pickvarnames(:a)
:a

julia> pickvarnames(:(a + b) )
Killed: 9

```

why??? 😵

I tried using `Debugger.jl`, calling `@enter pickvarnames(:(a + b))` and there’s no problem stepping thru the whole function… what can I do??? thanks. 🙏

---

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [February 20, 2020, 4:19pm UTC](https://discourse.julialang.org/t/unknown-hang-up-in-v1-3-1/34912/2 "2020-02-20T16:19:06Z")

</div>

I can reproduce this with Julia 1.3, 1.2, and 0.7. It seems to work correctly in Julia 0.6. Probably worth opening an issue.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 20, 2020, 4:30pm UTC](https://discourse.julialang.org/t/unknown-hang-up-in-v1-3-1/34912/3 "2020-02-20T16:30:54Z")

</div>

I can reproduce on 1.4 and master.

Since all outputs are symbols, I would recommend returning a `Vector{Symbol}`, and for symbols too, eg

```julia
pickvarnames(ex::Symbol) = [ex]

function pickvarnames(ex::Expr)
    varnames = Symbol[]
    if ex.head == :call
        for arg in ex.args[2:end]
            append!(varnames, pickvarnames(arg))
        end
    end
    varnames
end

```

---

<div class="post-metadata">

**Author:** ![tomtom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomtom/32/5106_2.png) [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Post date:** [February 21, 2020, 1:48am UTC](https://discourse.julialang.org/t/unknown-hang-up-in-v1-3-1/34912/4 "2020-02-21T01:48:09Z")

</div>

… so… what could I do now? the hanging is really **mysterious** …  
**how** to investigate the **cause** so as to **avoid** the hang??? 😢

---

<div class="post-metadata">

**Author:** ![tomaklutfu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomaklutfu/32/2411_2.png) [@tomaklutfu](https://discourse.julialang.org/u/tomaklutfu)\
**Post date:** [February 21, 2020, 3:00am UTC](https://discourse.julialang.org/t/unknown-hang-up-in-v1-3-1/34912/5 "2020-02-21T03:00:26Z")

</div>

It seems like an issue with the splatting that causes infinite loop somewhere in inference. This is a good candidate for an issue.

---

<div class="post-metadata">

**Author:** ![tomtom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomtom/32/5106_2.png) [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Post date:** [February 21, 2020, 4:55am UTC](https://discourse.julialang.org/t/unknown-hang-up-in-v1-3-1/34912/6 "2020-02-21T04:55:37Z")

</div>

> [@tomaklutfu](#):
>
> It seems like an issue with the splatting that causes infinite loop somewhere in inference

how to make sure that it is the exact problem?

```julia
julia> (()..., )
()

```

👆it seems not the problem?

is the **identication** of the exact problem out of the reach of non-core guys (like me)? I mean, using tools like @code\_xxx seems not showing the problem also…

---

<div class="post-metadata">

**Author:** ![tomaklutfu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomaklutfu/32/2411_2.png) [@tomaklutfu](https://discourse.julialang.org/u/tomaklutfu)\
**Post date:** [February 21, 2020, 5:49am UTC](https://discourse.julialang.org/t/unknown-hang-up-in-v1-3-1/34912/7 "2020-02-21T05:49:16Z")

</div>

I had tried the same things in global scope but had no problems too. In the mean time, when added `@show` before the said line in the function, interrupting the hanging process can show `varnames` within `if` statement. Maybe, I am mistaken about the source of problem but it hangs before showing `varnames`.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 21, 2020, 6:06am UTC](https://discourse.julialang.org/t/unknown-hang-up-in-v1-3-1/34912/8 "2020-02-21T06:06:13Z")

</div>

> [@tomtom](#):
>
> **how** to investigate the **cause** so as to **avoid** the hang???

Open an issue and I assume that it will be dealt with.

---

<div class="post-metadata">

**Author:** ![tomtom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomtom/32/5106_2.png) [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Post date:** [February 21, 2020, 7:16am UTC](https://discourse.julialang.org/t/unknown-hang-up-in-v1-3-1/34912/9 "2020-02-21T07:16:37Z")

</div>

> [@Tamas\_Papp](#):
>
> Open an issue and I assume that it will be dealt with.

[done](https://github.com/JuliaLang/julia/issues/34834). thanks.
