Bug 117201

Summary: file validate.c: line 517 (enum_sections): assertion failed
Product: [Fedora] Fedora Reporter: Michael Schwendt <bugs.michael>
Component: desktop-file-utilsAssignee: Dan Williams <dcbw>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-03-01 19:50:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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