Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Crash in cairo_image_surface_get_width #195

Closed

Description

@ValdikSS

Describe the bug
Cawbird crashes on start, presumably due to incorrect image in the timeline or slow internet.

To Reproduce
I don't have reproducing steps as the crash happens in seconds after running the program.

Expected behavior
The program should not crash.

Screenshots
Watch the video: https://files.catbox.moe/ngae09.mp4

System details:

  • OS: Fedora 32
  • Version: 1.2.0 from home_IBBoard_cawbird and git master commit aeb5a7c self-compiled
  • Libraries: cairomm-1.12.0-12.fc32.x86_64, cairo-1.16.0-8.fc32.x86_64

Additional context

Thread 22 "pool-cawbird" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffa564d700 (LWP 46439)]
0x00007ffff7413214 in cairo_image_surface_get_width () from /lib64/libcairo.so.2
(gdb) bt
#0  0x00007ffff7413214 in cairo_image_surface_get_width () at /lib64/libcairo.so.2
#1  0x00000000004a07f1 in cb_media_loading_finished (media=0x3a42dc0) at ../src/CbMedia.c:152
#2  0x00000000004a19a2 in cb_media_downloader_load_threaded (downloader=0x30f4a10, task_data=0x3a85fe0, cancellable=0x3100d60)
    at ../src/CbMediaDownloader.c:393
#3  0x00000000004a19e9 in load_in_thread (task=0x3a78bd0, source_object=0x30f4a10, task_data=0x3a85fe0, cancellable=0x3100d60)
    at ../src/CbMediaDownloader.c:405
#4  0x00007ffff7281c42 in g_task_thread_pool_thread () at /lib64/libgio-2.0.so.0
#5  0x00007ffff7eda0f4 in g_thread_pool_thread_proxy () at /lib64/libglib-2.0.so.0
#6  0x00007ffff7ed97f2 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#7  0x00007ffff6a3e432 in start_thread () at /lib64/libpthread.so.0
#8  0x00007ffff6bd3913 in clone () at /lib64/libc.so.6

Activity

  1. IBBoard commented on Sep 16, 2020

    @IBBoard
    Owner

    Maybe it's just because of the crash, but it looks like none of the images were loading. Which is odd.

    You're probably right that it's bad images not loading right but then the code assuming it can get a width. I'll see where I forgot to check things properly and then put up a branch for you to test.

    [Edit] Something's definitely odd. From 0:14 in the video you start getting "NOT FOUND" messages, but that relates to JSON loading. I don't know what JSON we'd be loading that can't be found that frequently in the timeline!

    [Edit 2] I'm just guessing here, but the bit where my code says "FIXME: Return an error" when it gets HTTP response codes might have something to do with with! https://github.com/IBBoard/cawbird/blob/aeb5a7c/src/CbMediaDownloader.c#L142

  2. added a commit that references this issue on Sep 16, 2020
  3. IBBoard commented on Sep 16, 2020

    @IBBoard
    Owner

    Okay, can you try that? I still don't know why images wouldn't exist, but I've now learned how to create GErrors in C code and I think we should handle it correctly now 🙂

  4. ValdikSS commented on Sep 16, 2020

    @ValdikSS
    Author

    Unfortunately (or fortunately?) the program does not crash currently. If it happens again, or if reproduce it again, I'll let you know.

  5. IBBoard commented on Sep 17, 2020

    @IBBoard
    Owner

    I've faked some "not found" errors on images by changing the URL before requesting it and it errors to the console, doesn't show the pictures and doesn't crash. I'll assume that "handling errors properly" fixes it until someone reports a problem again!

  6. ValdikSS commented on Sep 17, 2020

    @ValdikSS
    Author

    Seems fixed. I see the error message and Cawbird does not crash. Thanks.

    (cawbird:119787): cawbird-WARNING **: 21:36:59.937: Couldn't load pixbuf: Request on 'https://pbs.twimg.com/media/EiDxm6MWAAIeLvR.jpg:small' returned status 'SSL handshake failed' (https://pbs.twimg.com/media/EiDxm6MWAAIeLvR.jpg:small)
    
  7. IBBoard commented on Sep 17, 2020

    @IBBoard
    Owner

    SSL handshake failed? That's odd. I'd have expected that Fedora 32 had the newer library that resolved the underlying problem with #9. At least it doesn't crash and reports it correctly, though.

  8. j1warren commented on Sep 17, 2020

    @j1warren

    I've also had crashes and cawbird hangs on some starts when most pictures are massively not loaded. Ubuntu 20.04, v1.2.0.

  9. ValdikSS commented on Sep 17, 2020

    @ValdikSS
    Author

    Twitter has issues with picture domain network and/or dns for ≈3 years periodically. The images won't load in any browser as well, so it's not Cawbird issue.

  10. IBBoard commented on Sep 17, 2020

    @IBBoard
    Owner

    @j1warren try the patch or the cawbird-unstable builds. It should (hopefully) fix it.

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions