Bug 185540

Summary: Amarok.Lyrics.fromUtf8(title, "GB12312"); crash amarok.
Product: [Applications] amarok Reporter: Ignacio Serantes <kde>
Component: Tools/Script ManagerAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: crash CC: peterzhoulei
Priority: NOR    
Version: 2.0.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Amarok backtrace

Description Ignacio Serantes 2009-02-25 17:20:32 UTC
Version:           2.0.1 (using KDE 4.2.0)
OS:                Linux
Installed from:    SuSE RPMs

Under KDE 4.2.00 (KDE 4.2.0) "release 102", instruction:

Amarok.Lyrics.fromUtf8(title, "GB12312"); crash amarok.

You can test in a script or in in "Amarok Script Console".

And yes, I know that correct encoding "GB2312", but I think that things go wrong if you misspelled a text and your application crash ;).
Comment 1 Mark Kretschmann 2009-02-27 17:00:04 UTC
Please paste a valid crash backtrace here. Also, debug output (amarok --debug) could be helpful.


For more information please see here:

http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports
Comment 2 Ignacio Serantes 2009-02-27 22:28:58 UTC
Created attachment 31689 [details]
Amarok backtrace

I install debug package form openSUSE repositories.
Comment 3 Nikolaj Hald Nielsen 2009-03-01 17:58:56 UTC
SVN commit 933806 by nhnielsen:

Don't crash if using an invalid codec name in AmarokLyricsScript::toUtf8, AmarokLyricsScript::QStringtoUtf8 or AmarokLyricsScript::fromUtf8 but simply return an empty QString or QByteArray respectively.
BUG: 185540


 M  +10 -0     AmarokLyricsScript.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=933806