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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGSEGV when debugging in PyCharm #164

Open
TheTomer opened this issue Dec 12, 2021 · 1 comment
Open

SIGSEGV when debugging in PyCharm #164

TheTomer opened this issue Dec 12, 2021 · 1 comment

Comments

@TheTomer
Copy link

Hi, I'm trying to debug my code, which uses the following line:

with rawpy.imread(img_arw_path) as img_raw:

Whenever I set a break point after the scope of the 'with', PyCharm throws the following error:
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
Has this happened to anyone here? How do I resolve it?

@letmaik letmaik changed the title rawpy.imread(...) as img_raw leads to Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) in debug mode SIGSEGV when debugging in PyCharm Dec 12, 2021
@letmaik
Copy link
Owner

letmaik commented Dec 12, 2021

The only way rawpy can crash is when raw.raw_image is accessed after the file is closed, which is documented. I'm guessing that you have some code like im = raw.raw_image inside the with and then Python being Python, this variable still exists after the with block. The debugger in PyCharm probably tries to visualize everything and accesses this variable. A work-around would be to del im at the end inside the with block. Then the variable is gone for good.

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