rawpy icon indicating copy to clipboard operation
rawpy copied to clipboard

SIGSEGV when debugging in PyCharm

Open TheTomer opened this issue 2 years ago • 1 comments

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?

TheTomer avatar Dec 12 '21 17:12 TheTomer

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.

letmaik avatar Dec 12 '21 22:12 letmaik