jupyter-server / pycrdt

CRDTs based on Yrs.
https://jupyter-server.github.io/pycrdt
MIT License
41 stars 10 forks source link

pycrdt throws PanicException in some cases which is unhandled #117

Closed acnebs closed 3 months ago

acnebs commented 3 months ago

Description

Sometimes when calling ydoc.get_update(encoded_update) from pycrdt, a PanicException is thrown which I try to handle from userland but somehow seems to escape my try...except block.

You can read more about this exception from pyo3 in this GH issue: https://github.com/PyO3/pyo3/issues/3519

Specifically, the PanicException that is thrown for me when calling ydoc.get_update(encoded_update) has this exception message:

called Result::unwrap() on an Err value: VarIntSizeExceeded(70)

Reproduce

Struggling to consistently reproduce, am unsure what exact binary payloads are causing the panic.

Expected behavior

No panics, or at least PanicExceptions I can catch.

welcome[bot] commented 3 months ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

davidbrochart commented 3 months ago

Thanks, I opened #118.

acnebs commented 3 months ago

Thanks, that's perfect!