[ wxwindows-Bugs-1518012 ] 2.7 MIME type loading produces error on Ubuntu

SourceForge.net noreply at sourceforge.net
Thu Jul 6 02:02:34 PDT 2006


Bugs item #1518012, was opened at 2006-07-06 09:02
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1518012&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Unix specific
Group: Must fix
Status: Open
Resolution: None
Priority: 5
Submitted By: Alex Bligh (abligh)
Assigned to: Nobody/Anonymous (nobody)
Summary: 2.7 MIME type loading produces error on Ubuntu

Initial Comment:
When MIME types are loaded (for instance on
initializing a zip file) on Ubuntu, an error is
produced: "Failed Failed to convert file contents to
Unicode."

This is caused with the following call-stack.

#0  wxTextFile::OnRead (this=0x7fffffc9e810,
conv=@0x2aaaabf40490) at ../src/common/textfile.cpp:135
#1  0x00002aaaabd65f77 in wxTextBuffer::Open
(this=0x7fffffc9e810, conv=@0x2aaaabf40490) at
../src/common/textbuf.cpp:201
#2  0x00002aaaabd88525 in
wxMimeTypesManagerImpl::LoadGnomeDataFromKeyFile
(this=0x172cdc0, filename=@0x7fffffc9eb80,
dirs=@0x7fffffc9ebe0) at ../src/unix/mimetype.cpp:283
#3  0x00002aaaabd8edd7 in
wxMimeTypesManagerImpl::LoadGnomeMimeFilesFromDir
(this=0x172cdc0, dirbase=@0x17abf30,
dirs=@0x7fffffc9ebe0) at ../src/unix/mimetype.cpp:546
#4  0x00002aaaabd8f410 in
wxMimeTypesManagerImpl::GetGnomeMimeInfo
(this=0x172cdc0, sExtraDir=@0x7fffffc9ece0) at
../src/unix/mimetype.cpp:615
#5  0x00002aaaabd925aa in
wxMimeTypesManagerImpl::Initialize (this=0x172cdc0,
mailcapStyles=15, sExtraDir=@0x7fffffc9ece0) at
../src/unix/mimetype.cpp:1333

The file it is trying to read is 
  /usr/share/mime-info/palm.keys
which I have attached below.

On Ubuntu Dapper, this file is installed as standard. I
expect what is happening is the top bit set characters
are confusing the UTF8 converter.

Whether the file is right or wrong, it seems to me we
should be handling errors in mime-type-files (which
anyone could install) gracefully. It isn't entirely
clear to me that they have to be in UTF-8 anyway. I can
understand the need for a debugging log, but do we need
an error? This will produce an error on every Ubuntu
box on any app which initializes the MIME subsystem.
Moreover, the error isn't really very useful in
identifying the broken mime-type file.

Alex

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1518012&group_id=9863




More information about the wx-dev mailing list