Infinite recursion kills Julia instead of stackoverflowing

This is fine

julia> function recur(var::String)
       recur("Ai")
       end
recur (generic function with 1 method)

julia> recur("ai")
ERROR: StackOverflowError:
Stacktrace:
 [1] recur(::String) at .\REPL[2]:2 (repeats 65280 times)
 [2] top-level scope at REPL[3]:1

But I have this bugged function that falls into an infinite recursive loop, when first argument is a string, and it kills Julia instead of stopping with the StackOverflowError: error.

I added it a counter and it crashed at 11804 iteration.

imshow("tut_relief.nc", proj=:Mercator, zsize=1, view=(135,30))

Can open an issue but won’t be able to give more info than this.

:man_shrugging: Without an MWE, it is very unlikely that this will be investigated in depth.

1 Like

Could it have run out of memory before getting to a stack overflow? That would kill the Julia process. You could run your code again and watch your RAM usage. If this is the case there’s not much to do but change the code or use a machine with more memory.

One needs GMT.jl to reproduce this, but then is very simple. It’s a silent death.
And, no, it doesn’t seem a memory problem. No visible raise in memory use (run in 32 GB ram computer)

I can’t reproduce your crash with GMT. For me, that gives a stack overflow. I also used v1.3.0 under windows.

Hmm, that’s rather strange. I have some uncommitted changes and master is also a bit ahead of last 0.12.0 version. Now I have no time, but tonight I’ll commit everything I have and then ask you if you can try with master.

Note that this call of imshow does not even goes to the GMT C libs, so it’s a pure Julia thing (for me at least).

… and thanks for testing.

Continue puzzled. Installed in another computer and there I also get the stack overflow, but in the laptop it always kill my julia session. Guess I have to wait that some luck brings out light on this issue.