Closed cowboymacke closed 1 month ago
v2.7.5
go version
go1.22.3 darwin/arm64
Problem happens you object are drag from the web view into the canvas/iframe,
Follow example on https://ebitengine.org/en/documents/webassembly.html
<!DOCTYPE html> <iframe src="main.html" width="640" height="480"></iframe> <img src="https://ebitengine.org/images/logo.png">
https://github.com/user-attachments/assets/d7a97c11-13f0-4364-8d83-bbc3278e19d1
Not to crash the engine
Engine crash with following console output
goroutine 630 [running]: wasm_exec.js:22 syscall/js.Value.Get({{}, 0x7ff8000000000002, 0x0}, {0x131fad, 0xa}) wasm_exec.js:22 /opt/homebrew/Cellar/go/1.22.3/libexec/src/syscall/js/js.go:290 +0xc wasm_exec.js:22 github.com/hajimehoshi/ebiten/v2/internal/ui.(*UserInterface).appendDroppedFiles(0x1cb0248, {{}, 0x7ff8000100002292, 0x284a878}) wasm_exec.js:22 /Users/ling/go/pkg/mod/github.com/hajimehoshi/ebiten/v2@v2.7.5/internal/ui/ui_js.go:713 +0xa wasm_exec.js:22 created by github.com/hajimehoshi/ebiten/v2/internal/ui.(*UserInterface).setCanvasEventHandlers.func13 in goroutine 12 wasm_exec.js:22 /Users/ling/go/pkg/mod/github.com/hajimehoshi/ebiten/v2@v2.7.5/internal/ui/ui_js.go:693 +0xa
Only been verified on safari and chrome
The point is
panic: syscall/js: call of Value.Get on null
there.
As we discussed in the Discord server, I'm waiting for @cowboymacke's PR. thanks!
Ebitengine Version
v2.7.5
Operating System
Go Version (
go version
)go1.22.3 darwin/arm64
What steps will reproduce the problem?
Problem happens you object are drag from the web view into the canvas/iframe,
Follow example on https://ebitengine.org/en/documents/webassembly.html
https://github.com/user-attachments/assets/d7a97c11-13f0-4364-8d83-bbc3278e19d1
What is the expected result?
Not to crash the engine
What happens instead?
Engine crash with following console output
Anything else you feel useful to add?
Only been verified on safari and chrome