Replies: 6 comments 17 replies
-
I have updated package now is not happening current version -> cogentcore.org/core v0.3.5 |
Beta Was this translation helpful? Give feedback.
-
it is happening again. |
Beta Was this translation helpful? Give feedback.
-
It hang on TextField also And it is not showing any crash message nothing. How do I provide more information about it ? |
Beta Was this translation helpful? Give feedback.
-
these are the setting of TextEditor ->
|
Beta Was this translation helpful? Give feedback.
-
i have run the app with go run -race . (v,zip) output ->
|
Beta Was this translation helpful? Give feedback.
-
@heejit @kkoreilly i tried to run following example with package main
import (
"cogentcore.org/core/core"
"cogentcore.org/core/events"
"cogentcore.org/core/styles"
"cogentcore.org/core/styles/abilities"
"cogentcore.org/core/texteditor"
)
func main() {
b := core.NewBody()
btn := core.NewButton(b).SetText("Message")
btn.OnClick(func(e events.Event) {
core.MessageDialog(btn, "Hello, World!", "Message")
})
vi := texteditor.NewEditor(b)
vi.Styler(func(s *styles.Style) {
s.Grow.Set(1, 1)
s.SetTextWrap(false)
s.SetAbilities(false, abilities.Hoverable)
})
b.RunMainWindow()
} and what i found:
A one of them: diff --git a/system/driver/base/app.go b/system/driver/base/app.go
index 05a6bd280..964d25267 100644
--- a/system/driver/base/app.go
+++ b/system/driver/base/app.go
@@ -29,7 +29,7 @@ type App struct {
This system.App `display:"-"`
// Mu is the main mutex protecting access to app operations, including [App.RunOnMain] functions.
- Mu sync.Mutex `display:"-"`
+ Mu sync.RWMutex `display:"-"`
// MainQueue is the queue of functions to call on the main loop.
// To add to it, use [App.RunOnMain].
diff --git a/system/driver/base/app_multi.go b/system/driver/base/app_multi.go
index 913631894..0839129b3 100644
--- a/system/driver/base/app_multi.go
+++ b/system/driver/base/app_multi.go
@@ -43,6 +43,8 @@ func NewAppMulti[W system.Window]() AppMulti[W] {
}
func (a *AppMulti[W]) NScreens() int {
+ a.Mu.RLock()
+ defer a.Mu.RUnlock()
return len(a.Screens)
} @heejit @kkoreilly Go reported 20+ races when i tried to type several lines of text and save them. so who knows what happens on Linux in display server at that time, but there is a lot of room for improvements in the core. |
Beta Was this translation helpful? Give feedback.
-
this is how i create a texteditor and event handler on body for keychord ->
Beta Was this translation helpful? Give feedback.
All reactions