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

[Tumblerd] Broke generating thumbnails after webp-pixbuf-loader update #69

Closed
ManuLinares opened this issue Mar 17, 2023 · 17 comments
Closed

Comments

@ManuLinares
Copy link

upgraded webp-pixbuf-loader (0.2.1-1 → 0.2.2-1), gives segfault when trying to generate webp thumbnails on tumblerd (Thunar)

https://pastebin.com/tgFAjmuF

I'm on EndeavourOS XFCE
tumbler 4.18.0-1.1
thunar 4.18.4-1.1

@aruiz
Copy link
Owner

aruiz commented Mar 17, 2023

Can you install debugging symbols and recreate the stack trace? it is really hard to understand what is going on without them.

@yaneti
Copy link

yaneti commented Mar 17, 2023

FWIW here its crashing here:

#0  stop_load (data=0x7f42e4074000, error=0x7f42f2ffc6e0) at ../io-webp.c:129
Downloading source file /usr/src/debug/webp-pixbuf-loader-0.2.2-1.fc37.x86_64/redhat-linux-build/../io-webp.c
129           WebPData data = { .bytes = context->buffer->data, .size = context->buffer->len }; 

Only on a certain image that I can't share unfortuntely

full bt:

(gdb) bt
#0  stop_load (data=0x7f42e4074000, error=0x7f42f2ffc6e0) at ../io-webp.c:129
#1  0x00007f42fea81c83 in gdk_pixbuf_loader_close (loader=loader@entry=0x7f42e401b420, error=error@entry=0x0) at ../gdk-pixbuf/gdk-pixbuf-loader.c:859
#2  0x00007f42fea81f8e in gdk_pixbuf_loader_write (loader=loader@entry=0x7f42e401b420, buf=<optimized out>, buf@entry=0x7f42e419fa60 "\377\330\377", <incomplete sequence \340>, 
    count=<optimized out>, count@entry=65535, error=error@entry=0x55a3a6c4e200) at ../gdk-pixbuf/gdk-pixbuf-loader.c:562
#3  0x00007f42fee73f35 in eog_image_real_load (error=0x55a3a6c4e200, job=0x55a3a6c4e1e0, data2read=(EOG_IMAGE_DATA_IMAGE | EOG_IMAGE_DATA_DIMENSION | EOG_IMAGE_DATA_EXIF | EOG_IMAGE_DATA_XMP), 
    img=0x7f42e403fd80) at ../src/eog-image.c:1091
#4  eog_image_load (img=0x7f42e403fd80, data2read=(EOG_IMAGE_DATA_IMAGE | EOG_IMAGE_DATA_DIMENSION | EOG_IMAGE_DATA_EXIF | EOG_IMAGE_DATA_XMP), job=0x55a3a6c4e1e0, error=0x55a3a6c4e200)
    at ../src/eog-image.c:1354
#5  0x00007f42fee7b1fd in eog_job_load_run (job=0x55a3a6c4e1e0) at ../src/eog-jobs.c:573
#6  0x00007f42fee72309 in eog_job_process (job=0x55a3a6c4e1e0) at ../src/eog-job-scheduler.c:153
#7  eog_job_scheduler (data=<optimized out>) at ../src/eog-job-scheduler.c:128
#8  0x00007f42feb46982 in g_thread_proxy (data=0x55a3a645d360) at ../glib/gthread.c:831
#9  0x00007f42fe0ae12d in start_thread (arg=<optimized out>) at pthread_create.c:442
#10 0x00007f42fe12fbc0 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

@yaneti
Copy link

yaneti commented Mar 17, 2023

Oh.. the problem apparently is that its a image.webp but is actually a JPEG

@aruiz
Copy link
Owner

aruiz commented Mar 17, 2023

@ManuLinares can you confirm that your problem is different from @yaneti's?

@ManuLinares
Copy link
Author

@ManuLinares can you confirm that your problem is different from @yaneti's?

Yes, it is a jpeg file with webp extension.
I can build from git like this https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=webp-pixbuf-loader-git but how do I enable debugging symbols.

@aruiz
Copy link
Owner

aruiz commented Mar 18, 2023

Typically distros have a debugging symbol package, for arch this is it:

https://wiki.archlinux.org/title/Debugging/Getting_traces

@ManuLinares
Copy link
Author

I've recompiled with --buildtype debug on meson and runned coredumpctl -1 gdb after the crashdump

Maybe this backtrace helps?

(gdb) bt full
#0  stop_load (data=0x7f95ac0047a0, error=0x7f95c27fbcc0) at ../io-webp.c:129
        icc_data = <optimized out>
        width = <optimized out>
        height = <optimized out>
        scaled_w = 0
        scaled_h = -339188807
        data = {bytes = 0x7f95c27fbc40 "\020\260O\350\225\177", size = 140281190006176}
        pixbuf = <optimized out>
        pblen = 1823565824
        mux = <optimized out>
        config = {input = {width = -397430768, height = 32661, has_alpha = -1031815776, has_animation = 32661, format = 237000, pad = {0, 199498856, 32662, 32, 48}}, output = {colorspace = 3263151248, width = 32661, height = -1031816256, is_external_memory = 32661, u = {RGBA = {rgba = 0xebc863b96cb16800 <error: Cannot access memory at address 0xebc863b96cb16800>, stride = 0, size = 79}, YUVA = {y = 0xebc863b96cb16800 <error: Cannot access memory at address 0xebc863b96cb16800>, u = 0x0, v = 0x4f <error: Cannot access memory at address 0x4f>, a = 0x0, y_stride = 0, u_stride = 0, v_stride = 410, a_stride = 0, y_size = 0, u_size = 94780246217376, v_size = 140282421345176, a_size = 0}}, pad = {199522989, 32662, 199115447, 32662}, private_memory = 0x19a <error: Cannot access memory at address 0x19a>}, options = {bypass_filtering = 237000, no_fancy_upsampling = 0, use_cropping = 410, crop_left = 0, crop_top = 199115447, crop_width = 32662, crop_height = 200650208, use_scaling = 32662, scaled_width = -397430768, scaled_height = 32661, use_threads = -1031815776, dithering_strength = 32661, flip = 237000, alpha_dithering_strength = 0, pad = {199719879, 32662, 0, 0, 2885699488}}}
        ret = 0
#1  0x00007f960bdbaeaf in gdk_pixbuf_loader_close () at /usr/lib/libgdk_pixbuf-2.0.so.0
#2  0x00007f960bdbb1d7 in gdk_pixbuf_loader_write () at /usr/lib/libgdk_pixbuf-2.0.so.0
#3  0x00007f9608e048a7 in  () at /usr/lib/tumbler-1/plugins/tumbler-pixbuf-thumbnailer.so
#4  0x00005633be603621 in  ()
#5  0x00007f960be99c73 in  () at /usr/lib/libglib-2.0.so.0
#6  0x00007f960be96cb5 in  () at /usr/lib/libglib-2.0.so.0
#7  0x00007f960ba939f8 in  () at /usr/lib/libc.so.6
#8  0x00007f960bb22890 in  () at /usr/lib/libc.so.6

@aruiz
Copy link
Owner

aruiz commented Mar 18, 2023

Okay, same error.

Can you try this branch?

https://github.com/aruiz/webp-pixbuf-loader/tree/wip/jpeg-rename-fix

@ManuLinares
Copy link
Author

It works

@aruiz
Copy link
Owner

aruiz commented Mar 18, 2023

Thanks, I need to work some more on this to get to a fix. I will close once I push it to mainline.

@ManuLinares
Copy link
Author

Thanks for all your help, en un mes y medio te mereces un tranquilo 1ero de Mayo.

@aruiz
Copy link
Owner

aruiz commented Mar 27, 2023

I cannot reproduce anymore, I do wonder if this is a bug in libwebp as I have upgraded Fedora recently.

@aruiz
Copy link
Owner

aruiz commented Mar 27, 2023

Can you check if you can reproduce against libwebp 1.3.0?

@ManuLinares
Copy link
Author

Yeah, same crash.

libwebp 1.3.0-2.1

@aruiz
Copy link
Owner

aruiz commented Mar 27, 2023

Can you build and install the latest commit in mainline?

@ManuLinares
Copy link
Author

Thanks, it works.

@aruiz
Copy link
Owner

aruiz commented Mar 28, 2023

Yay! I will make a release!

@aruiz aruiz closed this as completed Mar 28, 2023
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

3 participants