Skip to content

ComponentArrays.jl crashes Julia in VSCode but not in REPL #59

@amrods

Description

@amrods

I'm crossposting from Discourse

The following code crashes Julia in VSCode, but the REPL can run it with no problem.

using ComponentArrays

szE = 2
szG = 2
szA = 9
szK = 5
szT = 44
szB = 2
szZ = 2

costdata = Array{Float64}(undef, szT)
wwdata = Array{Float64}(undef, szG, szE, szA, szZ, szK, szT)
Xdata = Array{Int}(undef, szG, szE, szA, szT)
N19data = Array{Int}(undef, szG, szB, szE, szT-6)
Adata = Array{Float64}(undef, szT)
ω = Array{Float64}(undef, szG, szA, szT)
Mdata = Array{Int}(undef, szA, szA, szE, szE, szT)
Smdata = Array{Int}(undef, szA, szE, szT)
Sfdata = Array{Int}(undef, szA, szE, szT)
LLdata = Array{Float64}(undef, szG, szE, szA, szZ, szK, szT)
P_1data = Array{Float64}(undef, szK, szT-1)
edata = Array{Float64}(undef, szK, szT)

## block

data = ComponentArray(
    ww = wwdata,
    e = edata,
    P_1 = P_1data,
    X = Xdata,
    LL = LLdata,
    N19 = N19data,
    A = Adata,
    ω = ω,
    cost = costdata,
    M = Mdata,
    Sm = Smdata,
    Sf = Sfdata
)

println("success")

I suspect it has to do with memory use because if I comment out the line with ww in the definition of the ComponentArray the code runs without crashing. What could be happening?

I'm using Julia 1.5.3, VSCode 1.53.0 and ComponentArrays.jl 0.8.11.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions