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

inline media preview broken since yesterday #395

Closed
HeikoAdams opened this issue Sep 7, 2015 · 36 comments
Closed

inline media preview broken since yesterday #395

HeikoAdams opened this issue Sep 7, 2015 · 36 comments
Labels

Comments

@HeikoAdams
Copy link

Since yesterday it looks like inline mediapreview is broken. When starting corebird from terminal I get the following errors:

** (corebird:6044): WARNING **: Twitter.vala:133: Unrecognized image file format for http://pbs.twimg.com/profile_images/344513261578877263/a9729b5b25e2b6a1b2bf88dc2e359f00_normal.jpeg

** (corebird:6044): WARNING **: Twitter.vala:133: Unrecognized image file format for http://pbs.twimg.com/profile_images/467693156893728768/n5kKTG2S_normal.jpeg

** (corebird:6044): WARNING **: Utils.vala:66: Image file '/home/heiko/.cache/corebird/assets/media/thumbs/640857222956781568_15822932_0.png' contains no data

** (corebird:6044): WARNING **: InlineMediaDownloader.vala:156: 'http://pbs.twimg.com/media/COTIP3gUcAAVOK3.jpg` couldn't be loaded from disk.

** (corebird:6044): WARNING **: Utils.vala:66: Image file '/home/heiko/.cache/corebird/assets/media/thumbs/640853715382091776_313821005_0.png' contains no data

** (corebird:6044): WARNING **: InlineMediaDownloader.vala:156: 'http://pbs.twimg.com/media/COTFDF8WIAALAAT.jpg` couldn't be loaded from disk.

** (corebird:6044): WARNING **: Utils.vala:66: Image file '/home/heiko/.cache/corebird/assets/media/thumbs/640849437980532736_15822932_0.png' contains no data

** (corebird:6044): WARNING **: InlineMediaDownloader.vala:156: 'http://pbs.twimg.com/media/COTBKtWWgAAq76b.jpg` couldn't be loaded from disk.

** (corebird:6044): WARNING **: Utils.vala:66: Image file '/home/heiko/.cache/corebird/assets/media/thumbs/640842775022407680_174160697_0.png' contains no data

** (corebird:6044): WARNING **: InlineMediaDownloader.vala:156: 'http://pbs.twimg.com/media/COS7G5ZWcAA7U4t.jpg` couldn't be loaded from disk.

** (corebird:6044): WARNING **: Utils.vala:66: Image file '/home/heiko/.cache/corebird/assets/media/thumbs/640842182199394304_15822932_0.png' contains no data

** (corebird:6044): WARNING **: InlineMediaDownloader.vala:156: 'http://pbs.twimg.com/media/COS6kYAVAAA8H5H.jpg` couldn't be loaded from disk.

** (corebird:6044): WARNING **: Utils.vala:66: Image file '/home/heiko/.cache/corebird/assets/media/thumbs/640840741942657024_2974537143_0.png' contains no data

** (corebird:6044): WARNING **: InlineMediaDownloader.vala:156: 'http://pbs.twimg.com/media/COS5Oh6WsAAvawK.jpg` couldn't be loaded from disk.

** (corebird:6044): WARNING **: Utils.vala:66: Image file '/home/heiko/.cache/corebird/assets/media/thumbs/633282488694108160_184203603_633282486957535232.png' contains no data

** (corebird:6044): WARNING **: InlineMediaDownloader.vala:156: 'https://pbs.twimg.com/tweet_video/CMnfEQ2UcAA1oHg.mp4` couldn't be loaded from disk.

@baedert
Copy link
Owner

baedert commented Sep 8, 2015

I think I could reproduce this for a little while yesterday but not anymore, does it still happen for you?

@HeikoAdams
Copy link
Author

The "unrecognized file format" error is still present. The other ones are gone.

@baedert
Copy link
Owner

baedert commented Sep 8, 2015

For new media or only old one? Can you rm ~/.cache/corebird/, then start corebird again and check if it still happens?

@HeikoAdams
Copy link
Author

It still happens even after killing the cache dir

@baedert
Copy link
Owner

baedert commented Sep 8, 2015

Wait, we are talking about the current master version, right?

@HeikoAdams
Copy link
Author

Yes

@baedert
Copy link
Owner

baedert commented Sep 8, 2015

m(
This is basically the same problem as in #271. The same tweets gets quoted twice, we try to download the same media twice, try to save it to the same path twice and only one of them succeeds.

The easy short-term fix could be to just append another piece of information to the media path to differentiate them between quote tweets, but long-term we definitely want to just have an in-memory hashmap of the currently downloading files (and, well, maybe not save them to disk at all...).

@HeikoAdams
Copy link
Author

What about checking if a file already exists before downloading it?

@baedert
Copy link
Owner

baedert commented Sep 9, 2015

That would solve the error messages, but the second tweet would not get signalled when the files are successfully downloaded.

@HeikoAdams
Copy link
Author

Is there no way to pass the already downloaded file to the second tweet if both tweets require the same file?

@baedert
Copy link
Owner

baedert commented Sep 10, 2015

If the file is already downloaded: Yes. But that's not the interesting case. That should already work (and did in my tests)

@baedert baedert added the Bug label Sep 10, 2015
@baedert
Copy link
Owner

baedert commented Sep 11, 2015

Okay, just made the inline media downloading not download the same file twice at the same time. There's also a unit test to ensure it works (and it does here). Can you make sure it also works for you?

@HeikoAdams
Copy link
Author

Okay, the only error-messages I get are:

** (corebird:9363): WARNING **: Utils.vala:66: Image file '/home/heiko/.cache/corebird/assets/media/thumbs/642087867448172544_41116723_0.png' contains no data

** (corebird:9363): WARNING **: InlineMediaDownloader.vala:175: 'http://pbs.twimg.com/media/COknf-XW8AAs175.jpg` couldn't be loaded from disk.

@HeikoAdams
Copy link
Author

After updating to lastest git-master I only get the following errors:

** (corebird:15794): WARNING **: Twitter.vala:133: Unrecognized image file format for http://pbs.twimg.com/profile_images/344513261578877263/a9729b5b25e2b6a1b2bf88dc2e359f00_normal.jpeg

@baedert
Copy link
Owner

baedert commented Sep 12, 2015

okay that one makes sense. So I can close this one and #271.

@baedert baedert closed this as completed Sep 12, 2015
@HeikoAdams
Copy link
Author

Why? The images are still not displayed

@baedert
Copy link
Owner

baedert commented Sep 12, 2015

What images? In what case? Can you just give more inormation?

@HeikoAdams
Copy link
Author

I hope that helps
bildschirmfoto von 2015-09-12 13-59-48

@HeikoAdams
Copy link
Author

BTW: I cleared the cache before starting corebird

@baedert baedert reopened this Sep 15, 2015
@baedert
Copy link
Owner

baedert commented Sep 17, 2015

I can't reproduce that issue at all, I tried getting more people to test it but found exactly one who was willing to try and he couldn't reproduce it either.

@HeikoAdams
Copy link
Author

Okay, I tried again. Clearing the cache (rm -rf .cache/corebird/) and starting corebird from terminal and this time I only get the "unrecognized file format" error but still no inline preview.

I'm running Fedora 23 beta.

@remeh
Copy link
Contributor

remeh commented Sep 24, 2015

Hey,

I don't know if I have exactly the same issue but since 2 or 3 days, I've got segmentation fault which seems to be caused by images:

** (corebird:16173): WARNING **: Twitter.vala:133: Unrecognized image file format for http://pbs.twimg.com/profile_images/568365219064578048/ZH82rnCg_normal.jpeg

** (corebird:16173): WARNING **: Utils.vala:66: Image file '/home/remy/.cache/corebird/assets/media/thumbs/646899366830075905_69004966_0.png' contains no data

** (corebird:16173): WARNING **: InlineMediaDownloader.vala:175: 'https://vine.co/v/eMn7FjnVVYl` couldn't be loaded from disk.

** (corebird:16173): WARNING **: Utils.vala:66: Image file '/home/remy/.cache/corebird/assets/media/thumbs/646897017038499841_23762505_0.png' contains no data

** (corebird:16173): WARNING **: InlineMediaDownloader.vala:175: 'https://instagram.com/p/7_8jRdkEfh/` couldn't be loaded from disk.

(corebird:16173): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

(corebird:16173): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

(corebird:16173): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
zsh: segmentation fault (core dumped)  corebird

Hope this help.

@baedert
Copy link
Owner

baedert commented Sep 24, 2015

Great, another crash I can only reproduce in a non-debug build.

Also, seems like not using --enable-debug seems to reproduce the "no inline media shows up" issue(?)

@remeh
Copy link
Contributor

remeh commented Sep 24, 2015

It's a corebird built from git, can I add some debug flags while compiling ? Is actually --enable-debug a build flag because it doesn't seem to be a runtime flag ? I've never really used Vala but I'll try to help finding the bug.

@baedert
Copy link
Owner

baedert commented Sep 24, 2015

It's fine, I can reproduce it. Yes, --enable-debug should be passed at configure time (when executing the autogen.sh script), but you should get debug messages by setting the G_MESSAGES_DEBUG env var, i.e. G_MESSAGES_DEBUG=all corebird. But that likely doesn't help at all in this case :(

@baedert
Copy link
Owner

baedert commented Sep 24, 2015

Great, seems like there's some bug in gio/glib, but I don't know where since I don't have debugging symbols and as soon as I compile a version (either master or 2.44) in jhbuild and try that, the bug vanishes.

@remeh
Copy link
Contributor

remeh commented Sep 24, 2015

Just FYI, I run corebird with glib 2.44.1

@baedert
Copy link
Owner

baedert commented Sep 24, 2015

Just figured it out! It's a bug in gdk-pixbuf. And then I found out I wasn't the first one: https://bugzilla.gnome.org/show_bug.cgi?id=755269 m(

This bug should've only been in gdk-pixbuf 2.32 and my local one is 2.31 though, so I'm not sure why it still segfaults...

@baedert
Copy link
Owner

baedert commented Sep 24, 2015

Correction: The bug is in 2.31.7 which I have locally installed and 2.32 contains a fix for it.

@remeh
Copy link
Contributor

remeh commented Sep 24, 2015

Ha! I also have gdk-pixbuf 2.31.7 :)

@baedert
Copy link
Owner

baedert commented Sep 27, 2015

@HeikoAdams, can you confirm that gdk-pixbuf version? If you have the same, can you try to downgrade and try it again?

@HeikoAdams
Copy link
Author

I've version 2.32.0

@remeh
Copy link
Contributor

remeh commented Oct 9, 2015

Since gdk-pixbuf 2.32.1 on ArchLinux, problem fixed.

@StuntsPT
Copy link

StuntsPT commented Oct 9, 2015

Confirming that gdk-pixbuf 2.32.1 on ArchLinux fixes the problem.

@baedert
Copy link
Owner

baedert commented Oct 12, 2015

@HeikoAdams Is this stil broken for you?

@HeikoAdams
Copy link
Author

No, it seems to be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants