-
-
Notifications
You must be signed in to change notification settings - Fork 152
Open
Labels
External IssueIssue in dependencies - can't make progress in giu yet.Issue in dependencies - can't make progress in giu yet.bugSomething isn't workingSomething isn't working
Description
What happend?
The app crashes when there's a Markdown element (containing whatever, even just a line of plain text) and I resize the app's window. It doesn't crash if you resize quickly (or a little); so I guess it takes a bunch of update/refresh events to make the app crash.
Stacktrace:
goroutine 1 [running, locked to thread]:
github.com/AllenDang/cimgui-go/internal.(*Pool[...]).Allocate(0x104cda9a0, 0x1400025ad20)
go/pkg/mod/github.com/!allen!dang/cimgui-go@v1.2.0/internal/pool.go:37 +0x164
github.com/AllenDang/cimgui-go/immarkdown.MarkdownLinkCallback.Handle(0x1400022f6f8?)
go/pkg/mod/github.com/!allen!dang/cimgui-go@v1.2.0/immarkdown/cimmarkdown_typedefs.go:784 +0x34
github.com/AllenDang/cimgui-go/immarkdown.MarkdownConfig.SetLinkCallback({0x140001802a0}, 0x104c83e40?)
go/pkg/mod/github.com/!allen!dang/cimgui-go@v1.2.0/immarkdown/cimmarkdown_funcs.go:459 +0x2c
github.com/AllenDang/giu.(*MarkdownWidget).OnLink(0x140000a3880, 0x104cd34b0)
go/pkg/mod/github.com/!allen!dang/giu@v0.11.0/Markdown.go:95 +0x74
github.com/AllenDang/giu.Markdown({0x104b2f838, 0x3})
go/pkg/mod/github.com/!allen!dang/giu@v0.11.0/Markdown.go:82 +0x118
main.loop()
Projects/giu11md/main.go:12 +0x30
github.com/AllenDang/giu.(*MasterWindow).render(0x1400003c660)
go/pkg/mod/github.com/!allen!dang/giu@v0.11.0/MasterWindow.go:253 +0x200
github.com/AllenDang/cimgui-go/backend.loopCallback()
go/pkg/mod/github.com/!allen!dang/cimgui-go@v1.2.0/backend/backend.go:36 +0x44
github.com/AllenDang/cimgui-go/backend/glfwbackend._Cfunc_igGLFWRunLoop(0x134633410, 0x104845c48, 0x104845c94, 0x104845ce0, 0x104845d78)
_cgo_gotypes.go:409 +0x30
github.com/AllenDang/cimgui-go/backend/glfwbackend.(*GLFWBackend).Run.func1(0x6f00000000001?)
go/pkg/mod/github.com/!allen!dang/cimgui-go@v1.2.0/backend/glfwbackend/glfw_backend.go:264 +0xa8
github.com/AllenDang/cimgui-go/backend/glfwbackend.(*GLFWBackend).Run(0x10486dbe8?, 0x1400006eed8?)
go/pkg/mod/github.com/!allen!dang/cimgui-go@v1.2.0/backend/glfwbackend/glfw_backend.go:264 +0x40
main.main.(*MasterWindow).Run.func1()
go/pkg/mod/github.com/!allen!dang/giu@v0.11.0/MasterWindow.go:270 +0xe4
golang.design/x/hotkey/mainthread.Call(0x1400011c018)
go/pkg/mod/golang.design/x/hotkey@v0.4.1/mainthread/os_darwin.go:36 +0x80
github.com/AllenDang/giu.mainthreadCallPlatform(...)
go/pkg/mod/github.com/!allen!dang/giu@v0.11.0/mainthread_mac.go:9
github.com/AllenDang/giu.(*MasterWindow).Run(...)
go/pkg/mod/github.com/!allen!dang/giu@v0.11.0/MasterWindow.go:262
main.main()
Projects/giu11md/main.go:19 +0x88
exit status 2
Code example
main.go
package main
import (
g "github.com/AllenDang/giu"
)
func loop() {
var md_content = "[https://example.org](https://example.org)"
g.SingleWindow().Layout(
g.Row(
g.Markdown(md_content),
),
)
}
func main() {
w := g.NewMasterWindow("Markdown", 500, 300, 0)
w.Run(loop)
}
To Reproduce
- Run my demo
- try resizing the window for a bit (it doesn't happen instantly)
Version
v0.11.0
OS
darwin / arm64 (macOS 14.6.1)
Metadata
Metadata
Assignees
Labels
External IssueIssue in dependencies - can't make progress in giu yet.Issue in dependencies - can't make progress in giu yet.bugSomething isn't workingSomething isn't working