-
Notifications
You must be signed in to change notification settings - Fork 901
Description
Hi. I'm trying to apply pyo3 0.21.2 to 0.20 codes.
With 0.20 codes my python app works, but with the new code does not.
The current situation:
- python version = 3.9.15
- the first call of
rust_functionin python succeeds, but the second call fails. - The error was segmentation fault.
- The error messages are slightly different per run:
vk[d].setdefault(a, dict())[p_key] = sound_data
KeyError: 'chr11:871499/2' // <- this string can't be one of p_key, a or d. The string like that comes from another variable.
Exception ignored deletion of interned string failed:
Traceback (most recent call last):
File "python_project.py", line 333, in rust_function
self.rust_have_been_failed = True
KeyError: 'À\xad\x8dU' // <- A value that shouldn't exist if it's working properly.
Thread 1 "python" received signal SIGSEGV, Segmentation fault.
--Type <RET> for more, q to quit, c to continue without paging--
pymalloc_free (ctx=0x0, p=0x1)
at /usr/local/src/conda/python-3.9.15/Objects/obmalloc.c:1866
1866 /usr/local/src/conda/python-3.9.15/Objects/obmalloc.c: No such file or directory.
/usr/local/src/conda/python-3.9.15/Objects/object.c: No such file or directory.
- returning
(String, i32)instead of(Py<PyString>, i32)does not raise the error.
The codes here: https://gist.github.com/Crispy13/03d25f8d556e644b5425ddf1decff6dc
The rust function get input string from python, and return it back with additional i32.
Is it me? What's the cause of the error?
Metadata
Metadata
Assignees
Labels
No labels