Closed
Description
Describe the bug:
I was following the example given at https://developer.fyne.io/tour/binding/twoway. I changed my keyboard layout to Kannada-itrans. I'm using Ubuntu 20.04 LTS 64 bit system and have install ibus-m17n and fonts-indic packages. While running the application via go run main.go
, after typing couple of characters, the application crashed with the following error.
panic: runtime error: slice bounds out of range [15:14]
goroutine 9 [running]:
fyne.io/fyne/v2/widget.(*RichText).insertAt(0xc000618000, 0xf, {0xc000353f30, 0x3})
/home/ravihara/.asdf/installs/golang/1.17.3/packages/pkg/mod/fyne.io/fyne/[email protected]/widget/richtext.go:222 +0x2b8
fyne.io/fyne/v2/widget.(*Entry).TypedRune(0xc0001a4000, 0xccd)
/home/ravihara/.asdf/installs/golang/1.17.3/packages/pkg/mod/fyne.io/fyne/[email protected]/widget/entry.go:743 +0x11b
fyne.io/fyne/v2/internal/driver/glfw.(*window).charInput.func1()
/home/ravihara/.asdf/installs/golang/1.17.3/packages/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/window.go:1226 +0x25
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0xc00045c200)
/home/ravihara/.asdf/installs/golang/1.17.3/packages/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/common/window.go:58 +0x56
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1
/home/ravihara/.asdf/installs/golang/1.17.3/packages/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/window.go:1395 +0x15b
exit status 2
To Reproduce:
Steps to reproduce the behaviour:
- Go to 'https://developer.fyne.io/tour/binding/twoway' and create a sample project as per the guide. In my case, the sample code was in main.go in main package.
- Export the required font file so as to get the Kannada font to render properly in the InputEntry box
export FYNE_FONT=/usr/share/fonts/truetype/Gubbi/Gubbi.ttf
- Run the fyne application using
go run main.go
- See error
Screenshots:
Example code:
Device (please complete the following information):
- OS: Ubuntu Linux 20.04 LTS 64-Bit (x86-64)
- Version: 20.04 LTS
- Go version: 1.17.3
- Fyne version: 2.1.1
Activity