You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The logic for printing UserBinaryMessages assumes that the payload is utf8 encoded. Non-utf8 encoded payloads, like those produced by programs that use the opentelemetry library, will lead to a runtime error.
You can reproduce this by running the following to produce an eventlog:
module Main where
import Debug.Trace.Binary
import Data.ByteString
main :: IO ()
main = traceBinaryEventIO (pack [0x0080])
and then when you load this into ghc-events you will get output like the following:
> ghc-events inc repro.eventlog
93401: cap 0: creating thread 1
94801: cap 0: running thread 1
102801: cap 0: stopping thread 1 (making a foreign call)
103101: cap 0: running thread 1
ghc-events: user error (Cannot decode byte '\x80': Data.Text.Internal.Encoding.decodeUtf8: Invalid UTF-8 stream)
Threadscope will also crash when showing relevant events.
I'll try to fix this. I feel like if we fail to decode as utf8 then we should have some sort of fallback format like base64 rather than throwing an error. Or perhaps we can just use decodeUtf8Lenient
The text was updated successfully, but these errors were encountered:
The logic for printing UserBinaryMessages assumes that the payload is utf8 encoded. Non-utf8 encoded payloads, like those produced by programs that use the opentelemetry library, will lead to a runtime error.
You can reproduce this by running the following to produce an eventlog:
and then when you load this into ghc-events you will get output like the following:
Threadscope will also crash when showing relevant events.
I'll try to fix this. I feel like if we fail to decode as utf8 then we should have some sort of fallback format like base64 rather than throwing an error. Or perhaps we can just use
decodeUtf8Lenient
The text was updated successfully, but these errors were encountered: