I am learning the basics of JuMP and tried running the code below, which computes the MLE of the parameters of a Gaussian distribution (mean and variance, source):

```
using JuMP, Ipopt, Random, Statistics
Random.seed!(1234)
n = 1_000
data = randn(n)
mle = Model(optimizer_with_attributes(Ipopt.Optimizer, "print_level" => 0))
@NLparameter(mle, problem_data[i = 1:n] == data[i])
μ0 = randn()
σ0 = rand() + 1
@info "Starting guess, mean: $μ0, std: $σ0"
@variable(mle, μ, start = μ0)
@variable(mle, σ >= 0.0, start = σ0)
@NLexpression(mle, loglikelihood,
-(n / 2) * (log(2π) + 2 * log(σ)) - inv(2 * σ^2) * sum((xi - μ)^2 for xi in problem_data)
)
@NLobjective(mle, Max, loglikelihood)
optimize!(mle)
```

It gives me the following error, however:

```
The terminal process "C:\Users\dan\AppData\Local\Programs\Julia-1.6.2\bin\julia.exe '-i', '--banner=no', '--project=C:\Users\dan\.julia\environments\v1.6', 'c:\Users\dan\.vscode\extensions\julialang.language-julia-1.4.0\scripts\terminalserver\terminalserver.jl', '\\.\pipe\vsc-jl-repl-96af58fe-00fa-44a6-a1c9-b3f2a023a715', '\\.\pipe\vsc-jl-cr-a2d7320e-3e0e-4bb4-8651-8e0b2284c0d8', 'USE_REVISE=true', 'USE_PLOTPANE=true', 'USE_PROGRESS=true', 'DEBUG_MODE=false'" terminated with exit code: 3221226356.
```

Any ideas how to fix this? Thanks!