Gnimuc / CImGui.jl

Julia wrapper for cimgui
https://github.com/cimgui/cimgui
MIT License
259 stars 25 forks source link

I can not run the demo #88

Closed FaresX closed 1 year ago

FaresX commented 1 year ago
using CImGui
include(joinpath(pathof(CImGui), "..", "..", "examples", "demo.jl"))

when I run the codes above, I get crashed

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x6bd6ffe1 -- _ZN11ImFontAtlas7AddFontEPK12ImFontConfig at C:\Users\22112\.julia\artifacts\27ef50bab46adeedd512c09d3e6ee063ba1da615\bin\libcimgui.dll (unknown line)
in expression starting at C:\Users\22112\.julia\packages\CImGui\HviPp\examples\demo.jl:65
_ZN11ImFontAtlas7AddFontEPK12ImFontConfig at C:\Users\22112\.julia\artifacts\27ef50bab46adeedd512c09d3e6ee063ba1da615\bin\libcimgui.dll (unknown line)
_ZN11ImFontAtlas18AddFontFromFileTTFEPKcfPK12ImFontConfigPKt at C:\Users\22112\.julia\artifacts\27ef50bab46adeedd512c09d3e6ee063ba1da615\bin\libcimgui.dll (unknown line)
ImFontAtlas_AddFontFromFileTTF at C:\Users\22112\.julia\packages\LibCImGui\DfBwq\lib\x86_64-w64-mingw32.jl:5615 [inlined]
AddFontFromFileTTF at C:\Users\22112\.julia\packages\CImGui\HviPp\src\wrapper.jl:3142 [inlined]
AddFontFromFileTTF at C:\Users\22112\.julia\packages\CImGui\HviPp\src\wrapper.jl:3142
unknown function (ip: 0000028fe2713289)
jl_apply at C:/workdir/src\julia.h:1879 [inlined]
do_call at C:/workdir/src\interpreter.c:126
eval_value at C:/workdir/src\interpreter.c:226
eval_stmt_value at C:/workdir/src\interpreter.c:177 [inlined]
eval_body at C:/workdir/src\interpreter.c:624
jl_interpret_toplevel_thunk at C:/workdir/src\interpreter.c:762
jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:912
jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:856
ijl_toplevel_eval at C:/workdir/src\toplevel.c:921 [inlined]
ijl_toplevel_eval_in at C:/workdir/src\toplevel.c:971
eval at .\boot.jl:370 [inlined]
include_string at .\loading.jl:1903
_include at .\loading.jl:1963
include at .\client.jl:478
unknown function (ip: 0000028fe270ca56)
jl_apply at C:/workdir/src\julia.h:1879 [inlined]
do_call at C:/workdir/src\interpreter.c:126
eval_value at C:/workdir/src\interpreter.c:226
eval_stmt_value at C:/workdir/src\interpreter.c:177 [inlined]
eval_body at C:/workdir/src\interpreter.c:624
jl_interpret_toplevel_thunk at C:/workdir/src\interpreter.c:762
jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:912
jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:856
ijl_toplevel_eval at C:/workdir/src\toplevel.c:921 [inlined]
ijl_toplevel_eval_in at C:/workdir/src\toplevel.c:971
eval at .\boot.jl:370 [inlined]
eval_user_input at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:153
repl_backend_loop at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:249
#start_repl_backend#46 at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:234
start_repl_backend at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:231
#run_repl#59 at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:379
run_repl at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:365
jfptr_run_repl_61185.clone_1 at C:\Users\22112\AppData\Local\Programs\Julia-1.9.2\lib\julia\sys.dll (unknown line)
#1017 at .\client.jl:421
jfptr_YY.1017_34710.clone_1 at C:\Users\22112\AppData\Local\Programs\Julia-1.9.2\lib\julia\sys.dll (unknown line)
jl_apply at C:/workdir/src\julia.h:1879 [inlined]
jl_f__call_latest at C:/workdir/src\builtins.c:774
#invokelatest#2 at .\essentials.jl:816 [inlined]
invokelatest at .\essentials.jl:813 [inlined]
run_main_repl at .\client.jl:405
exec_options at .\client.jl:322
_start at .\client.jl:522
jfptr__start_47602.clone_1 at C:\Users\22112\AppData\Local\Programs\Julia-1.9.2\lib\julia\sys.dll (unknown line)
jl_apply at C:/workdir/src\julia.h:1879 [inlined]
true_main at C:/workdir/src\jlapi.c:573
jl_repl_entrypoint at C:/workdir/src\jlapi.c:717
mainCRTStartup at C:/workdir/cli\loader_exe.c:59
BaseThreadInitThunk at C:\WINDOWS\System32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\WINDOWS\SYSTEM32\ntdll.dll (unknown line)
Allocations: 7303878 (Pool: 7299944; Big: 3934); GC: 14

I recently discovered this issue, as it was working fine before. Maybe it is not appropriately installed.

Gnimuc commented 1 year ago

Which version are you using?

FaresX commented 1 year ago

v1.82.0. I think this issue can be reproduced after the folder .julia is fully removed.

FaresX commented 1 year ago

I downgraded the version of package CImGuiPack_jll from 0.1.3 to 0.1.2 and the issue was resolved.

Gnimuc commented 1 year ago

https://github.com/JuliaImGui/LibCImGui.jl/pull/5

Gnimuc commented 1 year ago

This should be fixed.