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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Occasional panics while using streaming API #98

Open
hdevalence opened this issue Jun 22, 2020 · 1 comment
Open

Occasional panics while using streaming API #98

hdevalence opened this issue Jun 22, 2020 · 1 comment

Comments

@hdevalence
Copy link
Contributor

While using the streaming API I occasionally get panics like

thread 'main' panicked at 'byte index 140 is out of bounds of `Woo! 馃檶 CC Search now includes openly licensed images from @smithsonian, @Europeanaeu, and @sciencemuseum! 馃攷 https://t.co/76rOFxYXsc`', /home/hdevalence/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/str/mod.rs:1920:47

The tweet is here: https://twitter.com/creativecommons/status/1275116645225299976

I think this is maybe related to the transformation mentioned in #90 (changing between codepoint offsets and byte offsets).

@QuietMisdreavus
Copy link
Collaborator

The next time this happens, would it be possible to capture a backtrace? I'm wondering what's trying to slice the text (and also where the index 140 is coming from, since none of the entities i'm seeing from Twitter lie on that index), since it doesn't seem like the streaming code is doing anything special above "try the Tweet deserializer". Unless the streaming API is giving different data from the REST API, this is just a confusing situation.

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

No branches or pull requests

2 participants