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
iOS app stops re-drawing mid frame after a while #950
Comments
I think this may be tied to either text or scroller... it does not happen in every app. |
I have seen this happen exactly the same on Android as well esp the bit about rotate = black screen of death + hard reset |
maybe if we audit the GLES interface and make sure its not ignoring errors |
Maybe we can re-use the code that was maxing out refresh event queue to see if this can be reproduced? |
I may have been mistaken as to where the freeze occurs. For the corrupted content to be visible it implies that the publish event has been called... So somehow the paint cycle seems to have finished early (like part way through a widget) and then published but something in gomobile stops the event thread before the next frame. So it could be outside an openGL call. I have not yet been able to capture the stack in this state (in fact I'm not sure how...) |
OK, In the vendored github.com/fyne-io/mobile/gl/work.go around line 90 I updated Of course maybe it just makes it 4*less likely, but I don't think that's the case... |
A modified version of #904 helped to replicate this reliably: package main
import (
"image/color"
"fyne.io/fyne"
"fyne.io/fyne/app"
"fyne.io/fyne/canvas"
"fyne.io/fyne/layout"
"fyne.io/fyne/widget"
)
func main() {
app := app.New()
win := app.NewWindow("Some Window")
cells := make([]fyne.CanvasObject, 0, 80*25)
for i := 0; i < 80; i++ {
for j := 0; j < 25; j++ {
cells = append(cells, canvas.NewRectangle(color.RGBA{R: 255, G: 255, B: 255, A: 128}))
}
}
container := fyne.NewContainerWithLayout(layout.NewGridLayout(25), cells...)
c := 0
b := widget.NewButton("START", func() {
for i := 0; i < 80; i++ {
for j := 0; j < 25; j++ {
index := i*25 + j
obj, _ := container.Objects[index].(*canvas.Rectangle)
if c == 0 {
obj.FillColor = color.RGBA{R: 20, G: 30, B: 100, A: 128}
} else if c == 1 {
obj.FillColor = color.RGBA{R: 100, G: 20, B: 30, A: 128}
} else if c == 2 {
obj.FillColor = color.RGBA{R: 30, G: 100, B: 20, A: 128}
}
obj.Refresh()
}
}
c = (c+1)%3
})
win.SetContent(fyne.NewContainerWithLayout(layout.NewBorderLayout(nil, b, nil, nil), container, b))
win.ShowAndRun()
} |
I think it's finally tracked down and fixed in #1013 |
This is now on develop for testing - please re-open with any details you have if it is observed again. |
This is happening (on iOS) again 😢 |
I think I've found the root cause with solid evidence. I will try to patch a PR with more details of the issue, and hopefully, we can fix it permanently. |
Fix on |
Describe the bug:
Run a Fyne app on an iOS device and it works well for a minute or two.
Then it freezed mid-frame (bottom half of the screen is bgcolour) and does not respond.
Rotating will turn the screen black. Force quit required.
To Reproduce:
Steps to reproduce the behaviour:
Screenshots:
Device (please complete the following information):
I think this happened on 1.2.x as well
The text was updated successfully, but these errors were encountered: