Bug 117201 - file validate.c: line 517 (enum_sections): assertion failed
Summary: file validate.c: line 517 (enum_sections): assertion failed
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: desktop-file-utils
Version: rawhide
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Dan Williams
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-03-01 16:02 UTC by Michael Schwendt
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-03-01 19:50:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michael Schwendt 2004-03-01 16:02:06 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Gecko/20031114

This is with Fedora Core 1.90 updated to "development".

Description of problem:
Both desktop-file-install and desktop-file-validate break out in panic
when being run on KDE desktop files which have the comment

  # KDE Config File

as the first line. Example:

$ cd /usr/share/applications/kde
$ desktop-file-validate ktip.desktop 

** ERROR **: file validate.c: line 517 (enum_sections): assertion
failed: (name != NULL)
aborting...
Trace/breakpoint trap


If I take out the comment, the tools are happy.

$ grep -v '^#' ktip.desktop > /tmp/ktip.desktop
$ diff -u ktip.desktop /tmp/ktip.desktop 
--- ktip.desktop        2004-01-17 13:48:22.000000000 +0100
+++ /tmp/ktip.desktop   2004-03-01 17:00:29.000000000 +0100
@@ -1,4 +1,3 @@
-# KDE Config File 
 [KDE Desktop Entry]
 Encoding=UTF-8
 Name=Kandalf's Tips

Then desktop-file-validate accepts the modified file and spits out the
errors it finds (which I don't quote here).


Version-Release number of selected component (if applicable):
desktop-file-utils-0.4-1

How reproducible:
Always

Steps to Reproduce:
Run desktop-file-validate on some of the desktop files in
/usr/share/applications/kde. All that have the "# KDE Config File"
comment, cause the error.

Comment 1 Dan Williams 2004-03-01 19:02:30 UTC
desktop-file-validate is in error when it complains about the
assertion.  d-f-v creates a blank section for initial comments, but
that first blank section is still passed to enum_sections(), which
contains the assertion that doesn't accept a NULL name.  Investigating
fix.

Comment 2 Dan Williams 2004-03-01 19:50:20 UTC
fixed in desktop-file-utils-0.4-2, should show up in rawhide today. 
Patch is also upstreamed to freedesktop.org


Note You need to log in before you can comment on or make changes to this bug.