I have a complex code and received a StackOverflowError
associated with `StaticArrays’. More precisely, I received the message:
ERROR: StackOverflowError:
Stacktrace:
[1] SizedMatrix{3, 3, Float32, 2, Matrix{Float32}}(a::Matrix{Float64}) (repeats 2 times)
@ StaticArrays ~/.julia/packages/StaticArrays/VLqRb/src/SizedArray.jl:15
What is bothersome is that the stack trace is so short. Whatever the error, why is there not more information provided. In so many other instances, the stacktrace is enormous!
What is even more surprising is that the error relates to SizedMatrix
, which according to the documentation, is allocated on the heap:
Another convenient mutable type is the SizedArray, which is just a wrapper-type about a standard Julia Array which declares its known size. For example, if we knew that a was a 2×2 Matrix, then we can type sa = SizedArray{Tuple{2,2}}(a) to construct a new object which knows the type (the size will be verified automatically). For one and two dimensions, a more convenient syntax for obtaining a SizedArray is by using the SizedMatrix and SizedVector aliases, e.g. sa = SizedMatrix{2,2}(a).
I know what routine the error occurred in, although I do not know why. The code worked earlier this afternoon, so I made some change that had repercussions. My question is why the stack trace is not complete. Thanks.