Fatal Error : OutOfMemoryError() in libjulia/c-api not in console

I’ve a strange fatal error using the ACME.jl package.

When I use the package with the libjulia api (c-api), I get a fatal error / out of memory while the same usage in the julia console do not produce any error.

I don’t know if the console make some internal configuration of memory (cache or Something similar) in initialization because my memory is not full (even in x86 build mode).

Is the jl_init(NULL) make sense while some blog talk about an init with a system image jl_init_with_image(..., "sys.ji") but no “sys.ji” in windows, juste sys.dll.

When I use :

jl_init_with_image("D:\\dev\\julia\\julia-0.5.0\\bin", "..\\lib\\julia\\sys.dll");

The project compile and launch but I get the same error.

What this hell?

System Info
OS : Windows 10 Family
Computer : Dell Precison T7400 Workstation
Processor : Intel(R) Xeon(R) CPU E5410 @ 4 x 2.33Ghz (4-core)
Memory : 8 Go (RAM)
System : 64 bits, processor x64
IDE : Microsoft Visual Studio Community 2017
_Com_piler : MSVC 2017 - 15.0.0-RTW+26228.4
SDK : 10.0.14393.0
Julia : 0.5.0 (2016-09-19 18:14 UTC) - i686-w64-mingw32

Julia Error Dump

ErrorExceptionfatal: error thrown and no exception handler available.
OutOfMemoryError()
record_backtrace at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\task.c:232
jl_throw at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\task.c:550
jl_gc_big_alloc at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\gc.c:620
jl_gc_alloc_ at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\julia_internal.h:151 [inlined]
jl_gc_alloc at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\gc.c:1881
jl_gc_alloc_buf at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\julia_internal.h:169 [inlined]
save_stack at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\task.c:153
ctx_switch at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\task.c:304
jl_switchto at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\task.c:402
yieldto at .\event.jl:136
unknown function (ip: 6230D669)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\julia_internal.h:189 [inlined]
jl_apply_generic at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\gf.c:1942
wait at .\event.jl:169
stream_wait at .\stream.jl:44
uv_write at .\stream.jl:820
unsafe_write at .\stream.jl:830
write at .\io.jl:214
print at .\show.jl:3 [inlined]
show at .\show.jl:226
show_datatype at .\show.jl:194
show at .\show.jl:192
unknown function (ip: 294BF109)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\julia_internal.h:189 [inlined]
jl_apply_generic at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\gf.c:1942
show_default at .\show.jl:119
unknown function (ip: 294BF009)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\julia_internal.h:189 [inlined]
jl_apply_generic at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\gf.c:1942
show at .\show.jl:116
unknown function (ip: 294BEAA9)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\julia_internal.h:189 [inlined]
jl_apply_generic at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\gf.c:1942
jl_apply at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\julia.h:1392 [inlined]
jl_show at /home/Administrator/buildbot/slave/package_win6_2-x86/build/src/home/Administrator/buildbot/slave/package_win6_2-x86/build/src\builtins.c:972
main at d:\project\acme++\src\main.cpp:26
__scrt_common_main_seh at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:259
BaseThreadInitThunk at C:\Windows\System32\KERNEL32.DLL (unknown line)
RtlSubscribeWnfStateChangeNotification at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
RtlSubscribeWnfStateChangeNotification at C:\Windows\SYSTEM32\ntdll.dll (unknown line)