ethereon / lycon

A minimal and fast image library for Python and C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When lycon.save 10000+ times, it occurs Fatal Python error: deallocating None

ArsenLuca opened this issue · comments

As title states

`
import lycon
from tqdm import tqdm
image_full_path = "00010640.jpg" # any image

for i in tqdm(range(20000)):
image = lycon.load(image_full_path)
image = lycon.resize(image, width=512, height=512, interpolation=lycon.Interpolation.LINEAR)
lycon.save("test.jpg", image)
`
It happens at about the 10344th iteration:

` 52%|██████████████████████████████████████████████████████████████████████████████████████▎ | 10344/20000 [01:06<00:56, 171.48it/s]Fatal Python error: deallocating None

Thread 0x00007f46eb57e700 (most recent call first):
File "/root/anaconda3/envs/xxx/lib/python3.7/threading.py", line 300 in wait
File "/root/anaconda3/envs/xxx/lib/python3.7/threading.py", line 552 in wait
File "/root/anaconda3/envs/xxx/lib/python3.7/site-packages/tqdm/_monitor.py", line 60 in run
File "/root/anaconda3/envs/xxx/lib/python3.7/threading.py", line 926 in _bootstrap_inner
File "/root/anaconda3/envs/xxx/lib/python3.7/threading.py", line 890 in _bootstrap
`

But if I use cv2.imwrite instead of lycon.save, no such fatal error happened
@ethereon @aleozlx