~eliasnaur/gio#388: 
kitchen demo crashes on wasm on iOS

Currently, the latest version of kitchen demo (available at https://gioui.org/) is crashing on iPhone SE 2020 (may others), and I can't scroll the textarea too.

I don't know why I can't scroll yet. Steps to reproduce:

  1. Enable the switch button (to enable the "spinning animation").
  2. Try to scroll.
  3. Type (and delete) something into the single-line Editor.
  4. Try to scroll.
  5. Repeat the last step or wait couple of seconds.

Logs:

WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost
writeSync — wasm.js:57panic: unknown parameter type
writeSync — wasm.js:57
writeSync — wasm.js:57goroutine 9 [running]:
writeSync — wasm.js:57gioui.org/internal/gl.paramVal(0x7ff8000000000002, 0x0, 0x7e406)
writeSync — wasm.js:57	/home/build/go/pkg/mod/gioui.org@v0.0.0-20220213191812-0d32ab3f62dc/internal/gl/gl_js.go:456 +0xe
writeSync — wasm.js:57gioui.org/internal/gl.(*Functions).GetFramebufferAttachmentParameteri(0x8861c0, 0x8d40, 0x405, 0x8210, 0x0)
writeSync — wasm.js:57	/home/build/go/pkg/mod/gioui.org@v0.0.0-20220213191812-0d32ab3f62dc/internal/gl/gl_js.go:248 +0x9
writeSync — wasm.js:57gioui.org/gpu/internal/opengl.(*Backend).BeginFrame(0xad4800, 0xb2818, 0xb8ec20, 0x1, 0x640, 0x4b0, 0x0, 0x0)
writeSync — wasm.js:57	/home/build/go/pkg/mod/gioui.org@v0.0.0-20220213191812-0d32ab3f62dc/gpu/internal/opengl/opengl.go:254 +0x46
writeSync — wasm.js:57gioui.org/gpu.(*gpu).frame(0x8fa6c0, 0xb2818, 0xb8ec20, 0x0, 0x0)
writeSync — wasm.js:57	/home/build/go/pkg/mod/gioui.org@v0.0.0-20220213191812-0d32ab3f62dc/gpu/gpu.go:376 +0xa
writeSync — wasm.js:57gioui.org/gpu.(*gpu).Frame(0x8fa6c0, 0x86e3a0, 0xb2818, 0xb8ec20, 0x640, 0x4b0, 0x0, 0x1)
writeSync — wasm.js:57	/home/build/go/pkg/mod/gioui.org@v0.0.0-20220213191812-0d32ab3f62dc/gpu/gpu.go:357 +0x3
writeSync — wasm.js:57gioui.org/app.(*Window).render(0x86e000, 0x86e3a0, 0x640, 0x4b0, 0x0, 0x0)
writeSync — wasm.js:57	/home/build/go/pkg/mod/gioui.org@v0.0.0-20220213191812-0d32ab3f62dc/app/window.go:246 +0x13
writeSync — wasm.js:57gioui.org/app.(*Window).validateAndProcess(0x86e000, 0xb6750, 0x83a4e0, 0x640, 0x4b0, 0x0, 0x86e3a0, 0x640, 0x4b0)
writeSync — wasm.js:57	/home/build/go/pkg/mod/gioui.org@v0.0.0-20220213191812-0d32ab3f62dc/app/window.go:212 +0xf
writeSync — wasm.js:57gioui.org/app.(*Window).processEvent(0x86e000, 0xb6750, 0x83a4e0, 0xb2758, 0x8865b0)
writeSync — wasm.js:57	/home/build/go/pkg/mod/gioui.org@v0.0.0-20220213191812-0d32ab3f62dc/app/window.go:751 +0x4e
writeSync — wasm.js:57gioui.org/app.(*callbacks).Event(0x86e498, 0xb2758, 0x8865b0)
writeSync — wasm.js:57	/home/build/go/pkg/mod/gioui.org@v0.0.0-20220213191812-0d32ab3f62dc/app/window.go:433 +0xa
writeSync — wasm.js:57gioui.org/app.(*window).draw(0x83a4e0, 0x810100)
writeSync — wasm.js:57	/home/build/go/pkg/mod/gioui.org@v0.0.0-20220213191812-0d32ab3f62dc/app/os_js.go:610 +0x10
writeSync — wasm.js:57gioui.org/app.(*window).animCallback(0x83a4e0)
writeSync — wasm.js:57	/home/build/go/pkg/mod/gioui.org@v0.0.0-20220213191812-0d32ab3f62dc/app/os_js.go:480 +0x9
writeSync — wasm.js:57gioui.org/app.newWindow.func3(0x83a4e0, 0x830020, 0x3, 0x4)
writeSync — wasm.js:57	/home/build/go/pkg/mod/gioui.org@v0.0.0-20220213191812-0d32ab3f62dc/app/os_js.go:112 +0x24
writeSync — wasm.js:57created by gioui.org/app.newWindow
writeSync — wasm.js:57	/home/build/go/pkg/mod/gioui.org@v0.0.0-20220213191812-0d32ab3f62dc/app/os_js.go:99 +0x54
wasm.js:157exit code: – 2
_resume — wasm.js:582Error: Go program has already exited

Maybe it's duplicated of https://todo.sr.ht/~eliasnaur/gio/297, but now affects kitchen-demo. I'm not sure why the list is not scrolling, that doesn't affect Android on WASM or macOS on WASM.

Status
REPORTED
Submitter
~inkeliz
Assigned to
No-one
Submitted
8 months ago
Updated
2 months ago
Labels
No labels applied.

~eliasnaur 8 months ago

Enable the switch button (to enable the "spinning animation").

This reminds me of a long-standing issue I have on my Pixel 1 (native Android, not WebAssembly) where enabling the rotation animation will make everything except the scrollbar disappear. The compute renderer doesn't suffer from that problem, so I'm guessing the default renderer does something divide-by-zero-ish that crashes the GPU/driver.

~inkeliz 2 months ago*

That issue persists, not exactly. I think Gio is ignoring some events. Opening https://gioui.org/files/wasm/kitchen/index.html on iOS, and try to modify or scroll the "multi-line input", or slide the slider (...), sometimes doesn't work and freezes the element/widget.

It doesn't crashes the page, but makes many components unresponsive.

~gedw99 2 months ago*

Yep can confirm same problems on Kitchen demo . On iPhone 8.

Register here or Log in to comment, or comment via email.