After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 55461 - gnome_mime_type_of_file() returns bogus result for pdf files.
gnome_mime_type_of_file() returns bogus result for pdf files.
Status: RESOLVED OBSOLETE
Product: gnome-libs
Classification: Deprecated
Component: general
1.2.x
Other other
: Urgent critical
: 1.4.1
Assigned To: gnome-libs Maintainers
Pawel Salek
: 54690 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2001-05-30 08:28 UTC by scott bain
Modified: 2003-02-09 03:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The attached file, when balsa crashed (750.80 KB, application/octet-stream)
2001-05-30 09:47 UTC, scott bain
Details
check-mime.c (652 bytes, text/plain)
2001-05-30 10:56 UTC, Pawel Salek
Details

Description scott bain 2001-05-30 08:32:11 UTC
Package:  balsa
Severity: grave
Version:  1.1.5
Synopsis: Sending mail with an attachment.  Balsa crashes
Class:    sw-bug

C compiler: 2.8.1
glib: 1.2.8
GTK+: 1.2.8
ORBit: ORBit 0.5.2
gnome-libs: gnome-libs 1.2.11
libxml: 1.8.10
gnome-print: gnome-print-0.25
gnome-core: gnome-core 1.2.4


Description:
Sending mail with an attachment.  Balsa crashes




------- Bug moved to this database by unknown@bugzilla.gnome.org 2001-05-30 04:32 -------

Unknown version 1.1.x in product balsa. Setting version to the default, "unspecified".
The original reporter (scott.bain@mclaren.co.uk) of this bug does not have an account here.
Reassigning to the exporter, unknown@bugzilla.gnome.org.
Reassigning to the default owner of the component, pawsa@theochem.kth.se.

Comment 1 Pawel Salek 2001-05-30 09:30:46 UTC
1. I assume the crash can be reproduced?
2. Could you please attach this troublesome file to this report?
2. If not, can you provide the stack trace?
Comment 2 scott bain 2001-05-30 09:47:37 UTC
Created attachment 587 [details]
The attached file, when balsa crashed
Comment 3 scott bain 2001-05-30 09:49:24 UTC
Pawel

Ive tried a couple of other file attachments and the same thing has
happened.  I will try to investigate further

Comment 4 scott bain 2001-05-30 10:07:04 UTC
If I attach a file of a different file type ie .ZIP then its OK.
PDF's that arrive are OK and show (appplication PDF)
If that file is attached in a compose window then the icon becomes
very small, and the mime ID is now (PDF document)

Ive reloaded balsa 1.1.4 and that is OK.  The problem only shows up
with 1.1.5

FYI Config line was:

 ./configure --disable-flock --enable-fcntl --disable-more-warnings
--enable-threads --prefix=/opt/gnome --with-esmtp=no
Comment 5 Pawel Salek 2001-05-30 10:55:13 UTC
OK, this is almost certainly bug in gnome-libs package, ro exactly in
/etc/mime-magic. I attach a program that calls several gnome-mime
functions that can be used for testing detected MIME type. Only
gnome_mime_type recognizes correctly PDF files as application/pdf.
Other functions return "PDF document" as MIME type which is
illustrative but incorrect.

We cannot do much in balsa except for checking if the returned mime
type contains slash character but this is a workaround, not the solution.
Comment 6 Pawel Salek 2001-05-30 10:56:45 UTC
Created attachment 588 [details]
check-mime.c
Comment 7 Pawel Salek 2001-05-30 11:06:36 UTC
I have noticed it is connected with the bug #54690 filed previously
for gnome-libs. Having examined /etc/mime-magic I conclude that the
set of corrupted entries there is substantial.

What is the preferred route for balsa in this case?
Comment 8 Joshua Eichorn 2001-09-25 05:47:30 UTC
my bad sorry for the spam
Comment 9 Kjartan Maraas 2002-01-27 01:07:55 UTC
Is this still a problem?
Comment 10 Kjartan Maraas 2002-03-18 23:03:40 UTC
Is this still a problem?
Comment 11 Pawel Salek 2002-03-19 08:39:35 UTC
Not quite. We have a workaround for it and we slowly migrate to
gnome-vfs (altough I have already got feedback that we should not push
this migration due to gnome-vfs portability problems). 

If you ask whether the bug still exists, the answer is: yes (as of
gnome-libs-1.2.13).
Comment 12 Kjartan Maraas 2002-08-01 13:46:50 UTC
So, is mime-magic still full of corrupted entries? Should this be
fixed in 1.4.x? Is it still this way in 2.0.x?
Comment 13 Pawel Salek 2002-08-01 13:57:25 UTC
I do not know generally, but we (balsa) use gnome-vfs for mime-type
discovery with gnome-2.0.x and it (gnome-vfs) does not have this problem.
Comment 14 Kjartan Maraas 2002-08-01 16:30:42 UTC
Reassigning to the right maintainer alias.
Comment 15 Kjartan Maraas 2002-09-14 13:55:04 UTC
I think this is just a plain bug. Changing the text to

0	string		%PDF-		application/pdf

in mime-magic is probably the right fix.

I wonder if we should just copy magic.mime from file(1) since it's
been fixed there in newer releases too...
Comment 16 Pawel Salek 2002-09-14 14:48:38 UTC
It actually is *the* fix. I did that and it worked perfectly.
Comment 17 Kjartan Maraas 2002-10-06 10:10:47 UTC
*** Bug 54690 has been marked as a duplicate of this bug. ***
Comment 18 Luis Villa 2003-02-09 03:32:54 UTC
Because of the release of GNOME2.0 and 2.2, and the apparent lack of interest in
a further release of GNOME 1.4, many GNOME1.4 bugs are being closed. If you feel
your bug was incorrectly labeled as a GNOME1.4 bug, or also applied to GNOME2,
please reopen it and reassign it to another component more relevant to GNOME2.
Thanks, and hope you enjoy GNOME2.