-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the CImGui.Text(text) function segfaults on aarm (v1.82) #74
Comments
Does the following vararg version of the text API work on aarch macOS?
|
BTW, |
I have tried a couple of variations, in steps towards the normal here's what happens
the |
The first , in the ccall macro version should be ; |
duh... sorry its morning here. I see, does
|
ccall only support a limited version of varadic arguments where each vararg should be of the same type. |
I noticed there is also a (probably) related issue with
complains, and
complains as well. Do you know if it is possible to splat into the call? I guess I could splat before the macro expansion with an eval, but eww... |
Clang.jl has a prototype for wrapping vararg functions: https://github.com/JuliaInterop/Clang.jl/blob/9a519baa45000d2afe1262ae7463cc0795671721/gen/generator.toml#L163 But I never use that. Isn't the |
I meant that if I were to call
Anyhow, I tested with
so accepting only one string, but it still shows |
Does it work if you directly use |
Nope, still |
According to https://github.com/cimgui/cimplot/blob/d68fa3abd4fe75312089e9332917a6c326704a58/cimplot.h#L965, the correct way to invoke the API is EDIT: updated the wrong |
Got it working with, otherwise it would print
Shall I make an issue to implot? or is that a generator issue? |
This is a blocker for me on Apple Silicon. Has there been any progress? Also, I note that |
Is this still happening? I thought there was an effective workaround in upstream already
Running macOS Sequoia 15.0 on a Apple M3 Pro |
It is indeed. |
Ok, does this segfault too? @ccall ig.lib.libcimgui.igText("foo"::Cstring)::Cvoid I'm wondering if the problem is how we're calling these vararg functions, or the fact that we're calling them at all. |
No segfault there: import CImGui as ig, ModernGL, GLFW
ig.set_backend(:GlfwOpenGL3)
ctx = ig.CreateContext()
ig.render(ctx; window_size=(1280, 760), window_title="ImGui Window", opengl_version=v"3.3") do
ig.Begin("Makie demo")
@ccall ig.lib.libcimgui.igText("foo"::Cstring)::Cvoid
ig.End()
end Rendering foo just fine |
Hi,
I have recently begun to switch my project to the newer version. And albeit for the most part it was a pretty painless transition, strings just don't want to behave properly.
the demo app
include(joinpath(pathof(CImGui), "..", "..", "demo", "demo.jl"))
segafults withI tried all sort of combinations (yes also
@sprintf
) but the only one that works is if I override with the followingCImGui.Text(text) = CImGui.TextUnformatted(text)
(basically we force to input the\0
at the end)If I add a
\0
manually,unsafe_convert
gets angrybut at least it shows that it is doing what it is supposed to do (i think).
when running everything through rosetta, it works.
I am not even sure this is an issue of this package, could it be an issue of julia on aarm?
The text was updated successfully, but these errors were encountered: