IBBoard / cawbird

A fork of the Corebird GTK Twitter client that continues to work with Twitter
https://ibboard.co.uk/cawbird/
GNU General Public License v3.0
309 stars 37 forks source link

Selected File is not an image or video #272

Closed ZachBacon closed 3 years ago

ZachBacon commented 3 years ago

Describe the bug As this might be more of a gtk/gstreamer issue within an unsupported platform. But when selecting a png image, Cawbird is saying selected file is not an image.

To Reproduce Steps to reproduce the behavior:

  1. in msys2, install necessary packages pacman -S mingw-w64-x86_64-gstreamer mingw-w64-x86_64-gst-plugins-good mingw-w64-x86_64-gst-plugins-bad mingw-w64-x86_64-gst-libav mingw-w64-x86_64-vala mingw-w64-x86_64-gspell mingw-w64-x86_64-meson
  2. build cawbird using meson but with the option -Dx11=false.
  3. install cawbird and then run
  4. when composing tweet, go to attach an image, select image and see message

Expected behavior To be able to attach an image and post it successfully.

Screenshots If applicable, add screenshots to help explain your problem. https://user-images.githubusercontent.com/8948676/103808940-bd4f4400-5026-11eb-825f-aabf4250db45.mp4

System details:

Additional context Add any other context about the problem here.

Running G_MESSAGES_DEBUG=cawbird cawbird can give useful debug output. cawbird.log

Now I know this isn't really a supported platform and I'm most likely not going to receive much help in this case, but I can at least make tweets even if I can't upload images and I would honestly love to see this functionality work correctly on Windows and would try to help out where I can.

ZachBacon commented 3 years ago

Well, so far no dice, but I also have it running through gdb as well, see if it will catch anything as well

ZachBacon commented 3 years ago

So this one is from before you added more debug code, before I realized you updated the code, but it's ran through gdb, building the latest code now and will test there.

ZachBacon commented 3 years ago

https://gist.github.com/ZachBacon/53b22798842b39ad04eca55d322e67be

ZachBacon commented 3 years ago

here's the latest code ran through gdb, there seems to be a hardlock when trying to @ someone too. This first log is running cawbird using G_MESSAGES_DEBUG=cawbird /mingw64/bin/cawbird cawlog2.txt

and this one is running through gdb

https://gist.github.com/ZachBacon/29cc3f9173010d64c7257d0cd9d3e051

IBBoard commented 3 years ago

"Heap block modifiedpast requested size of 2" doesn't sound promising! Although it would be more helpful to know where that is/what data structure that is. But it's hopefully(!) from some of the C code, because Vala is supposed to do the memory management for us.

A hard lock while @-ing someone is interesting. It might be another instance of the same problem. But the logs seem to finish when you've cancelled it (normally by typing another letter or moving the cursor away) after it has parsed the JSON, which indicates that it got further with that request.

I would suggest setting breakpoints and stepping through it, if you're comfortable with gdb, but given that we've already got debugging before and after pretty much every statement then I doubt it'll help. I think we need some extra switches to warn about more "silent" problems like the heap warning. Or if gdb has a "break on hung thread" like it has "break on error".

ZachBacon commented 3 years ago

The thing is, I didn't cancel, I had to exit manually through gdb or system monitor

IBBoard commented 3 years ago

Maybe it's something that Cawbird automatically does, then. Seems a bit odd, but there are a few "Parsing JSON, Cancellable cancelled" pairs in the logs. And it happens so close to the JSON, so it seems unlikely to be related to you exiting through gdb (plus that wouldn't normally give a clean exit anyway!)

ZachBacon commented 3 years ago

Don't you just love platform related issues? 😅

IBBoard commented 3 years ago

I'm going to treat the main issue as closed, and we can resolved (because it's doing the right thing with file types now) and we can deal with Windows's inability to actually complete the upload separately 🙂

ZachBacon commented 3 years ago

I can agree with that, tackling one issue at a time.