multani / sonata

GTK 3 client for the Music Player Daemon - I'm looking for new maintainers!
GNU General Public License v3.0
125 stars 41 forks source link

--hidden gives harmless Traceback #3

Open quite opened 13 years ago

quite commented 13 years ago

I can see no harmful side-affects of these tracebacks, but they do occur... When sonata is invoced, music is indeed playing and there is a cover.jpg is the song's directory.

kelebek:~> sonata --hidden Error grabbing key 173, 0x8e09050 Error grabbing key 171, 0x8e09050 Error grabbing key 172, 0x8e09050 Error grabbing key 174, 0x8e09050 /usr/local/lib/python2.7/site-packages/sonata/img.py:23: GtkWarning: gdk_pixbuf_scale_simple: assertion `dest_width > 0' failed crop_pixbuf = pixbuf.scale_simple(image_width, image_height, gtk.gdk.INTERP_HYPER) Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/sonata/artwork.py", line 491, in artwork_set_image pix2 = img.pixbuf_add_border(pix2) File "/usr/local/lib/python2.7/site-packages/sonata/img.py", line 29, in pixbuf_add_border width = pix.get_width() AttributeError: 'NoneType' object has no attribute 'get_width' Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/sonata/artwork.py", line 491, in artwork_set_image pix2 = img.pixbuf_add_border(pix2) File "/usr/local/lib/python2.7/site-packages/sonata/img.py", line 29, in pixbuf_add_border width = pix.get_width() AttributeError: 'NoneType' object has no attribute 'get_width'

multani commented 13 years ago

Hum, I don't know how to reproduce this... I think the problem lies in sonata/img.py, get_pixbuf_of_size() function. Can you have a look there and give me more details about what's happening when it fails. I'm particularly interested into the (first) value of each variables in the function.

quite commented 13 years ago

Oh dear, negative number going in as size!

size 75 pixbuf <gtk.gdk.Pixbuf object at 0x9f2b0f4 (GdkPixbuf at 0xa140600)> image_width 400 image_height 400 size -49 pixbuf <gtk.gdk.Pixbuf object at 0x9f2b0f4 (GdkPixbuf at 0xa140600)> image_width 400 image_height 400 /usr/local/lib/python2.7/site-packages/Sonata-1.6.2.1-py2.7-linux-i686.egg/sonata/img.py:32: GtkWarning: gdk_pixbuf_scale_simple: assertion `dest_width > 0' failed gtk.gdk.INTERP_HYPER) Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/Sonata-1.6.2.1-py2.7-linux-i686.egg/sonata/artwork.py", line 557, in artwork_set_image pix2 = img.pixbuf_add_border(pix2) File "/usr/local/lib/python2.7/site-packages/Sonata-1.6.2.1-py2.7-linux-i686.egg/sonata/img.py", line 39, in pixbuf_add_border width = pix.get_width() AttributeError: 'NoneType' object has no attribute 'get_width' size 75 pixbuf <gtk.gdk.Pixbuf object at 0x9f2911c (GdkPixbuf at 0xa1403a0)> image_width 400 image_height 400 size -49 pixbuf <gtk.gdk.Pixbuf object at 0x9f2911c (GdkPixbuf at 0xa1403a0)> image_width 400 image_height 400 Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/Sonata-1.6.2.1-py2.7-linux-i686.egg/sonata/artwork.py", line 557, in artwork_set_image pix2 = img.pixbuf_add_border(pix2) File "/usr/local/lib/python2.7/site-packages/Sonata-1.6.2.1-py2.7-linux-i686.egg/sonata/img.py", line 39, in pixbuf_add_border width = pix.get_width() AttributeError: 'NoneType' object has no attribute 'get_width'

multani commented 13 years ago

On Wed, Nov 30, 2011 at 12:17:42AM -0800, Daniel wrote:

Oh dear, negative number going in as size! Wut!?

So you mean, get_pixbuf_size() is called with negative size parameter? It looks like in artwork.py, there is fullwidth = self.notebook_get_allocation()[2] - 50 and fullwidth is then passed as the parameter to get_pixbuf_size().

Somehow, the notebook object, which contains the main tabs of Sonata has some problems of some sort. Are you running fullscreen, or maybe the notebook objet is not yet constructed, I don't know :)

quite commented 13 years ago

Yes, negative it is. This is uponstarting sonata with --hidden, so perhaps it is not constructed somehow? (no fullscreen at this moment). It is odd that you don't get that error. I tried in a plain XFCE desktop environ now, just to rule out my very tweaked awesomewm setup, and some oddities with systray, or something like that... but error is the same.

multani commented 12 years ago

I tried to reproduce this, but I can't :(

I have song which is currently playing in MPD, and I know it has a cover. I start Sonata with --hidden and it doesn't show up, but I don't have any traceback nor warnings in the console. I'm also using awesome WM, so I guess it's not the problem.

Can you tell me which version of Sonata you are using (Git's commit), and if you can reproduce it with the last changes from my 'integration' branch?

quite commented 12 years ago

I still get it, with a clean install from current integration branch. Also tried in awesomewm with the default config. Well, no matter hmm, it's harmless... :)