Cysharp / YetAnotherHttpHandler

YetAnotherHttpHandler brings the power of HTTP/2 (and gRPC) to Unity and .NET Standard.
MIT License
376 stars 33 forks source link

Crash for Unity/GRPC #52

Closed Ragzouken closed 8 months ago

Ragzouken commented 8 months ago

We're using YAHH for GRPC in Unity. In one of our use cases we sometimes get an outright crash:

thread '<unnamed>' panicked at yaha_native\src\binding.rs:607:10:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The issue seems to be with one of our RPCs that streams data back to the Unity client, in this specific failing case we're sending a lot more data than usual: the first item of the stream is ~105064 bytes followed immediately by an item of ~72227 bytes and then continuing 30 times a second at this rate. I'm not sure if that's a lot for HTTP, but size seems to be the only distinguishing feature between it working fine and crashing

mayuki commented 8 months ago

Is the version of the library causing the problem the latest version or 1.0.0?

mayuki commented 8 months ago

We have also confirmed that the problem occurs with the latest version and will investigate.

Ragzouken commented 8 months ago

Just in case it's helpful, we were actually using 1.0.0 (via https://openupm.com/packages/com.cysharp.yetanotherhttphandler/?subPage=versions which doesn't seem to actually track updates properly, so I guess it's not a supported means). I updated to 1.0.1 and indeed we still see the same issue.