WalletConnect / a2

An Asynchronous Apple Push Notification (apns2) Client for Rust
MIT License
136 stars 47 forks source link

'tokio-runtime-worker' has overflowed its stack fatal runtime error: stack overflow #46

Closed ss025 closed 3 years ago

ss025 commented 4 years ago

Hi,

Upgrading to 0.5.3 is causing stack overflow error. After investigation, I found that in fmt::Display , it is calling self.

https://github.com/pimeys/a2/blob/master/src/error.rs

impl<'a> fmt::Display for Error {
    fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            Error::ResponseError(Response {
                error: Some(ErrorBody { ref reason, .. }),
                ..
            }) => write!(fmt, "{} (reason: {:?})", self, reason),
            _ => write!(fmt, "{}", self),
        }
    }
}

Here are other references :

https://users.rust-lang.org/t/tokio-runtime-worker-stack-overflow/39421 https://users.rust-lang.org/t/thread-tokio-runtime-worker-has-overflowed-its-stack/43211