Skip to content
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

In wasm os.StdErr is invalid #65

Closed
ldemailly opened this issue Jul 16, 2024 · 1 comment · Fixed by #66
Closed

In wasm os.StdErr is invalid #65

ldemailly opened this issue Jul 16, 2024 · 1 comment · Fixed by #66

Comments

@ldemailly
Copy link
Member

Not sure what we can do though without any log but... at least it shouldn't panic

panic: runtime error: invalid memory address or nil pointer dereference

console_logging.go:98 +0x4

@ldemailly
Copy link
Member Author

full stack

[Log] panic: runtime error: invalid memory address or nil pointer dereference (wasm_exec.js, line 22)
[Log] [signal 0xb code=0x0 addr=0x0 pc=0x0] (wasm_exec.js, line 22)
[Log]  (wasm_exec.js, line 22)
[Log] goroutine 1 [running]: (wasm_exec.js, line 22)
[Log] fortio.org/log.ConsoleLogging() (wasm_exec.js, line 22)
[Log] 	fortio.org/[email protected]/console_logging.go:98 +0x4 (wasm_exec.js, line 22)
[Log] fortio.org/log.ColorMode(...) (wasm_exec.js, line 22)
[Log] 	fortio.org/[email protected]/console_logging.go:129 (wasm_exec.js, line 22)
[Log] fortio.org/log.SetColorMode() (wasm_exec.js, line 22)
[Log] 	fortio.org/[email protected]/console_logging.go:106 +0xb (wasm_exec.js, line 22)
[Log] fortio.org/log.init.0() (wasm_exec.js, line 22)
[Log] 	fortio.org/[email protected]/logger.go:191 +0x2b (wasm_exec.js, line 22)

because we assume we can check in init if it's a console - we need to revert to stdout when invalid
(or wasm should provide a valid stream?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant