crash

Bug #443414 reported by Kamil Páral
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lrcShow-X
Fix Committed
Low
Unassigned

Bug Description

Traceback (most recent call last):
  File "/home/ripper/Plocha/lrcShow-X/mainGuiQt4.py", line 261, in customEvent
    self.artist=self.di.getArtist().encode(self.locale)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: ordinal not in range(128)
Traceback (most recent call last):
  File "/home/ripper/Plocha/lrcShow-X/mainGuiQt4.py", line 261, in customEvent
    self.artist=self.di.getArtist().encode(self.locale)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
http://www.google.com/pda/search?mrestrict=xhtml&hl=en&lr=&num=5&q=lyrics+intitle%3A%22Kylie+Minogue%22+intitle%3A%22Red+Blooded+Woman%22
http://www.lyrics007.com/Kylie%20Minogue%20Lyrics/Red%20Blooded%20Woman%20Lyrics.html

Revision history for this message
Kamil Páral (kamil.paral) wrote :

Happened again:

Traceback (most recent call last):
  File "/home/ripper/Plocha/lrcShow-X/mainGuiQt4.py", line 261, in customEvent
    self.artist=self.di.getArtist().encode(self.locale)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: ordinal not in range(128)
Traceback (most recent call last):
  File "/home/ripper/Plocha/lrcShow-X/mainGuiQt4.py", line 261, in customEvent
    self.artist=self.di.getArtist().encode(self.locale)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 5: ordinal not in range(128)
Traceback (most recent call last):
  File "/home/ripper/Plocha/lrcShow-X/mainGuiQt4.py", line 771, in checkTime
    title=self.di.getTitle().encode(self.locale)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2: ordinal not in range(128)
Traceback (most recent call last):
  File "/home/ripper/Plocha/lrcShow-X/mainGuiQt4.py", line 261, in customEvent
    self.artist=self.di.getArtist().encode(self.locale)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: ordinal not in range(128)

I think it happens when I minimize application to system tray.

Revision history for this message
frank (xujia19) wrote :

Would you please provide the media player you currently use? Thank you.

Revision history for this message
Kamil Páral (kamil.paral) wrote :

Rhythmbox, Ubuntu 9.04.

Revision history for this message
OutLikeAShoe (outlikeashoe) wrote :

Maybe it's just a song not well tagged that causes troubles.
Otherwise it could be a real encoding error that i can check only with a file that reproduces the bug.
In this case, I'm sorry, but I need an example of song (the mp3 file or whatever format you were listening to) that reproduces this error. You should give us a link to download it or you can send it at my email addr, so I can check what does the player give to the application as artist information.

Changed in lrcshow-x:
importance: Undecided → Low
Revision history for this message
Kamil Páral (kamil.paral) wrote :

Right, I have tuns of mp3's with incorrect UTF-8 names. But you must expect that, because almost all mp3's come from Windows world, where they encode tags with proprietary encodings.

Example: http://www.turboupload.com/yefe5b6mv4t5/08_-_Rikaji,_ze_dabel_zdech'_(Some_Say_the_Devil_Is_Dead).mp3.html

Revision history for this message
OutLikeAShoe (outlikeashoe) wrote :

Yes, we already know that and we're trying to do our best to fully support internationalization.
But sometimes a wrong encoding could create little issues like this one.
We already check for the encoding in a very high number of places in the whole code (we have to check artist, title, lyrics, filenames and so on..) maybe I've just forget to check in the Rhythmbox player interface, or maybe it's an irreparable encoding issue that could be solved only manually.
I'll check that file with rhythmbox (an maybe with an hex editor) and I'll let you know any news about this issue.

Revision history for this message
OutLikeAShoe (outlikeashoe) wrote :

Oh.. I forget.. I'll also add a try/except to avoid the crash and just show the normal "No valid tag information" message.

Revision history for this message
Kamil Páral (kamil.paral) wrote :

> Oh.. I forget.. I'll also add a try/except to avoid the crash and just show the normal "No valid tag information" message.

That's exactly the correct solution :)

You don't have to check that song, I know the tags are incorrect (encoded in cp1250 instead of utf8). But that should not crash the program, just display en error.

Revision history for this message
OutLikeAShoe (outlikeashoe) wrote :

Ok.. If you're interested, the file you've linked us had the following encoding error:

>>> print "Říkají, že ďábel zdech".decode("utf-8").encode("windows-1250").decode("iso-8859-1")
Øíkají, že ïábel zdech

And this is irreparable for a normal application.

Revision history for this message
Kamil Páral (kamil.paral) wrote :

Of course, that is a standard problem with encodings. You can't tell in which encoding the text is and therefore you can't decode it right. That applies to music file tags, video text subtitles, etc etc. Nothing to do except for report an error ("music file tag is not in a valid utf-8 encoding").

Revision history for this message
OutLikeAShoe (outlikeashoe) wrote :

Should be fixed.. try to download the latest version here: http://www.sanfanling.cn/svn/lrcShow-X/trunk/lrcShow-X/

Changed in lrcshow-x:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.