Closed Cardroid closed 4 months ago
Temporarly you can use v0.7.0, I'm working on the fix ;-)
Thank you. I'm looking forward to it being fixed. :)
I've tried the https://github.com/ptxmac/cimgui-go/tree/ptx_fixes branch now and here's the result...
https://github.com/AllenDang/giu/assets/25889754/f11a6690-9436-46cb-8562-2fadd66c4e50
Can I suppose this was fixed? (in #742 )
I'm sorry, but nothing has changed...
I updated the library.
github.com/AllenDang/cimgui-go v0.0.0-20231219093052-24bd5dc22643
github.com/AllenDang/giu v0.7.1-0.20231219095113-bf1aacdc1161
Problem occurs near ImFontGlyphRangesBuilder_BuildRanges
.
Exception 0xc0000005 0x0 0xc000324000 0x7ff6f9a8fc20
PC=0x7ff6f9a8fc20
signal arrived during external code execution
runtime.cgocall(0x7ff6f9968ac0, 0xc000243a08)
C:/Program Files/Go/src/runtime/cgocall.go:157 +0x3e fp=0xc0002439e0 sp=0xc0002439a8 pc=0x7ff6f96a549e
github.com/AllenDang/cimgui-go._Cfunc_ImFontGlyphRangesBuilder_BuildRanges(0xc00002bb20, 0x2025fc88160)
_cgo_gotypes.go:5809 +0x4d fp=0xc000243a08 sp=0xc0002439e0 pc=0x7ff6f97a160d
github.com/AllenDang/cimgui-go.FontGlyphRangesBuilder.BuildRanges.func1(0x7ff6f97a6c46?, 0xc000064c00?)
C:/Users/numbe/go/pkg/mod/github.com/!allen!dang/cimgui-go@v0.0.0-20231219093052-24bd5dc22643/type_accessor.go:98 +0x5d fp=0xc000243a48 sp=0xc000243a08 pc=0x7ff6f97abe7d
github.com/AllenDang/cimgui-go.FontGlyphRangesBuilder.BuildRanges({{0x2025fc88160?, 0xc000243b48?, 0x2025fc8efd0?, 0xc000062440?}}, 0x0?)
C:/Users/numbe/go/pkg/mod/github.com/!allen!dang/cimgui-go@v0.0.0-20231219093052-24bd5dc22643/type_accessor.go:98 +0x45 fp=0xc000243a90 sp=0xc000243a48 pc=0x7ff6f97abda5
github.com/AllenDang/giu.(*FontAtlas).rebuildFontAtlas(0xc0001589a0)
C:/Users/numbe/go/pkg/mod/github.com/!allen!dang/giu@v0.7.1-0.20231219095113-bf1aacdc1161/FontAtlasProsessor.go:268 +0x18b fp=0xc000243c30 sp=0xc000243a90 pc=0x7ff6f9828dab
github.com/AllenDang/giu.(*MasterWindow).beforeRender(0x0?)
C:/Users/numbe/go/pkg/mod/github.com/!allen!dang/giu@v0.7.1-0.20231219095113-bf1aacdc1161/MasterWindow.go:192 +0x55 fp=0xc000243cb0 sp=0xc000243c30 pc=0x7ff6f982b355
github.com/AllenDang/giu.(*MasterWindow).beforeRender-fm()
<autogenerated>:1 +0x25 fp=0xc000243cc8 sp=0xc000243cb0 pc=0x7ff6f982fb05
github.com/AllenDang/cimgui-go.beforeRender()
...
Ok, I managed to reproduce this on a windows VM - Gonna think about the fix
Now this works for cimgui-go. For giu there is a strange sympthom: application starts, runs about... 5 loop iteration and then freezes. I'll try to find out more. Could someone confirm my findings ;-)
I come with my findings:
The problem is in the mainthread library. I don't know why, but it works with no problems only for linux (maybe because linux is the best os :smile: - but thats my personal opinion only).
For mac we have a special - modified - version of mainthread. It turns out that we need same for windows.
I'll update mianthread to disable it on windows. Also I'm going to openanother issue for that mainthread thing and close this one. - GIU works on windows for me after that fix.
lmk if someone still has problems.
What happend?
I think it's an error in the mainthread library, is that correct? How can I fix it?
this is my go.mod file
Code example
```golang package main import ( "github.com/AllenDang/giu" ) func loop() { giu.SingleWindow().Layout( giu.Label("Hello World"), ) } func main() { wnd := giu.NewMasterWindow("window title", 600, 400, 0) wnd.Run(loop) } ```main.go
To Reproduce
Version
master
OS
windows 11 pro