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

Julia 0.6.1 throws StackOverflowError when code is called inside a loop #24942

Closed
KenziTrader opened this issue Dec 6, 2017 · 2 comments
Closed

Comments

@KenziTrader
Copy link

Code inside gist.

Calling update!(ahrs, gyro*pi/180., accel) inside a loop causes a StackOverflowError, outside not. The problem is in line 27, building the Matrix J. Building it in rows doesn't cause the error.

julia> versioninfo()
Julia Version 0.6.1
Commit 0d7248e (2017-10-24 22:15 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin14.5.0)
CPU: Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, haswell)

@mschauer
Copy link
Contributor

mschauer commented Dec 6, 2017

Actually crashes internally on somewhat older master: Version 0.7.0-DEV.1271:

Internal error: encountered unexpected error in runtime:
StackOverflowError()
jl_has_free_typevars at /mnt/sda2/schauer/julia-nightly/src/jltypes.c:175
intersect at /mnt/sda2/schauer/julia-nightly/src/subtype.c:1897
intersect_unionall_ at /mnt/sda2/schauer/julia-nightly/src/subtype.c:1508
intersect_unionall at /mnt/sda2/schauer/julia-nightly/src/subtype.c:1553
intersect at /mnt/sda2/schauer/julia-nightly/src/subtype.c:1947
intersect_union at /mnt/sda2/schauer/julia-nightly/src/subtype.c:1174
intersect at /mnt/sda2/schauer/julia-nightly/src/subtype.c:1911
intersect_tuple at /mnt/sda2/schauer/julia-nightly/src/subtype.c:1655 [inlined]
intersect at /mnt/sda2/schauer/julia-nightly/src/subtype.c:1961
intersect_unionall_ at /mnt/sda2/schauer/julia-nightly/src/subtype.c:1508
intersect_unionall at /mnt/sda2/schauer/julia-nightly/src/subtype.c:1553
intersect at /mnt/sda2/schauer/julia-nightly/src/subtype.c:1947
intersect_all at /mnt/sda2/schauer/julia-nightly/src/subtype.c:2046
jl_type_intersection_env_s at /mnt/sda2/schauer/julia-nightly/src/subtype.c:2135
jl_typemap_intersection_node_visitor at /mnt/sda2/schauer/julia-nightly/src/typemap.c:480
ml_matches at /mnt/sda2/schauer/julia-nightly/src/gf.c:2373
jl_matching_methods at /mnt/sda2/schauer/julia-nightly/src/gf.c:1617
abstract_call_gf_by_type at ./inference.jl:1691
jl_call_fptr_internal at /mnt/sda2/schauer/julia-nightly/src/julia_internal.h:366 [inlined]
jl_call_method_internal at /mnt/sda2/schauer/julia-nightly/src/julia_internal.h:385 [inlined]
jl_apply_generic at /mnt/sda2/schauer/julia-nightly/src/gf.c:1929
abstract_call at ./inference.jl:2299

@KristofferC
Copy link
Sponsor Member

Doesn't crash anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants