Skip to content

StackOverflow from getindex #94

@baggepinnen

Description

@baggepinnen

The following line causes me a StackOverflow error on the latest master
https://github.com/jonniedie/ComponentArrays.jl/blob/2d3291bfcd970add20205890b1b2c0ccadc4fb73/src/componentindex.jl#L12

The error is not very helpful though..

julia> bodeplot(sys, w, hz=true)
ERROR: StackOverflowError:
Stacktrace:
 [1] getindex(::Matrix{ComplexF64}) (repeats 79984 times)
   @ ComponentArrays ~/.julia/packages/ComponentArrays/raUTp/src/componentindex.jl:12

most of the stack is missing. I also can't see how that line actually causes the error since it does not have the same signature as in the error, but perhaps you have a better feeling for it than I do. Note that no ComponentArrays were actually used in this particular example, sys was given by

using ControlSystems
julia> show_construction(sys)
A = [0.0 1.0 0.0 0.0 0.0 0.0; -2000.0 -4.0 1000.0 2.0 1000.0 2.0; 0.0 0.0 0.0 1.0 0.0 0.0; 100.0 0.2 -100.0 -0.2 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 1.0; 1000.0 2.0 0.0 0.0 -1000.0 -2.0]
B = [0.0; 1.0; 0.0; 0.0; 0.0; 0.0]
C = [0.0 1.0 0.0 0.0 0.0 0.0]
D = [0.0]
sys = ss(A,B,C,D)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions