segfault when switching between animated webp images (another one)
Related to #286 (closed)
I tested the latest master with the aforementioned issue, so after !150 (merged) and !152 (merged) were applied. I see a different crash with the same test case animated webp images.
Reproduction steps:
- Put any two (or more) animated webp images in a directory together.
- Open one of the images in EOG.
- Switch rapidly between the images using the arrow keys. This issue seems to be some kind of race condition where the image gets unloaded before it's been loaded, so it may help reproduce to have a slow computer (or temporarily limit the CPU frequency).
You will eventually get a crash. It usually takes me 5-10 seconds of trying before I get one.
Backtrace:
#0 stop_load (data=0x7fffd8040920, error=0x7fffe3ffe7e0) at ../webp-pixbuf-loader-0.2.2/io-webp.c:129
#1 0x00007ffff7b4437b in gdk_pixbuf_loader_close
(loader=loader@entry=0x7fffcbfec5b0, error=error@entry=0x555555cb3680)
at ../gdk-pixbuf/gdk-pixbuf/gdk-pixbuf-loader.c:859
#2 0x00007ffff7f78808 in eog_image_real_load
(error=0x555555cb3680, job=0x555555cb3660, data2read=<optimized out>, img=<optimized out>)
at ../src/eog-image.c:1182
#3 eog_image_load
(img=<optimized out>, data2read=<optimized out>, job=job@entry=0x555555cb3660, error=error@entry=0x555555cb3680) at ../src/eog-image.c:1355
#4 0x00007ffff7f7927b in eog_job_load_run (job=0x555555cb3660) at ../src/eog-jobs.c:575
#5 0x00007ffff7f767b7 in eog_job_process (job=0x555555cb3660) at ../src/eog-job-scheduler.c:153
#6 eog_job_scheduler (data=<optimized out>) at ../src/eog-job-scheduler.c:128
#7 0x00007ffff7c25315 in g_thread_proxy (data=0x55555567be30) at ../glib/glib/gthread.c:831
#8 0x00007ffff709ebb5 in start_thread (arg=<optimized out>) at pthread_create.c:444
#9 0x00007ffff7120d90 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
System + Version Information:
- Arch Linux x86_64
- EOG 44.0 (master)
- webp-pixbuf-loader 0.2.2 (distribution package)
- libwebp 1.3.0 (distribution package)
Test Case: