cogentcore / core

A free and open source framework for building powerful, fast, elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the web with a single Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.76k stars 83 forks source link

Cogent Core Docs stopped unexpectedly due to index out of range #1331

Open runrc opened 5 days ago

runrc commented 5 days ago

Describe the bug

The Cogent Core Docs stopped unexpectedly.

How to reproduce

See the stack trace.

Example code

No response

Relevant output

Cogent Core Docs stopped unexpectedly

There was an unexpected error and Cogent Core Docs stopped running.

Crash log saved in /home/me/.data/Cogent\ Core\ Docs/crash-logs

Platform: Web
System platform: MacOS
App version: dev
Core version:
Time: 2024-11-20 19:32:00
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1.1 Safari/605.1.15

panic: runtime error: index out of range [0] with length 0

goroutine 149 [running]:
runtime/debug.Stack()
/opt/hostedtoolcache/go/1.22.9/x64/src/runtime/debug/stack.go:24 +0x6
cogentcore.org/core/core.handleRecover({0x2721c0, 0x7c36cd8})
/home/runner/work/core/core/core/recover.go:42 +0x5
cogentcore.org/core/core.(*renderWindow).eventLoop.func1()
/home/runner/work/core/core/core/renderwindow.go:376 +0x5
panic({0x2721c0, 0x7c36cd8})
/opt/hostedtoolcache/go/1.22.9/x64/src/runtime/panic.go:770 +0x1a
github.com/cogentcore/webgpu/wgpu.BytesToJS({0x230aae0, 0x0, 0x0})
/home/runner/go/pkg/mod/github.com/cogentcore/webgpu@v0.0.0-20240906154609-e35089e9a725/wgpu/util_js.go:14 +0xc
cogentcore.org/core/system/driver/web.(*Drawer).End(0x3455380)
/home/runner/work/core/core/system/driver/web/drawer.go:68 +0xd
cogentcore.org/core/core.(*renderWindow).renderWindow(0x3c64140)
/home/runner/work/core/core/core/renderwindow.go:705 +0xc0
cogentcore.org/core/core.(*renderWindow).handleWindowEvents(0x3c64140, {0xb329f0, 0x77d3c00})
/home/runner/work/core/core/core/renderwindow.go:438 +0x6f
cogentcore.org/core/core.(*renderWindow).handleEvent(0x3c64140, {0xb329f0, 0x77d3c00})
/home/runner/work/core/core/core/renderwindow.go:422 +0x1f
cogentcore.org/core/core.(*renderWindow).eventLoop(0x3c64140)
/home/runner/work/core/core/core/renderwindow.go:390 +0x10
created by cogentcore.org/core/core.(*renderWindow).goStartEventLoop in goroutine 1
/home/runner/work/core/core/core/renderwindow.go:361 +0x6


### Platform

macOS
kkoreilly commented 4 days ago

Thank you for reporting this. We will try to reproduce and fix this issue soon.