NLopt 0.3.6 segfaults Julia 0.6.2


#1
julia> using NLopt

julia> myfun(x::Vector, unused::Vector)= (x[1]-2)^2 + (x[2]-3)^2 + (x[1]*x[2])^2
myfun (generic function with 1 method)

julia> opt= Opt(:LN_NELDERMEAD,2)
Opt(:LN_NELDERMEAD, 2)

julia> lower_bounds!(opt, [0,0])

julia> min_objective!(opt,myfun)

julia> optimize(opt, [1.0, 1.0])

signal (11): Segmentation fault: 11
while loading no file, in expression starting on line 0
unknown function (ip: 0xffffffffffffffff)
Allocations: 1593383 (Pool: 1592149; Big: 1234); GC: 0
Segmentation fault: 11

(The answer is [ 0.2172, 2.8647 ].)

I am guessing that even if I give completely wrong parameters, julia should not segfault.

Advice appreciated. I encountered this while trying to learn NLopt. I am just trying to test an example of optimization without gradients. My next goal will be optimizing a stochastic equivalent, with

myfun(x::Vector, unused::Vector)= (x[1]-2)^2 + (x[2]-3)^2 + (x[1]*x[2])^2+rand()/100