Skip to content

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

Description

@ArsenLuca

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions