<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>178562</bug_id>
          
          <creation_ts>2008-12-23 13:20:38 +0000</creation_ts>
          <short_desc>systemsettings wrongly write ~/.local/share/applications/mimeapps.list</short_desc>
          <delta_ts>2008-12-24 14:31:18 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kio</product>
          <component>general</component>
          <version>SVN</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nicolas L.">kde</reporter>
          <assigned_to name="David Faure">faure</assigned_to>
          <cc>faure</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>685760</commentid>
    <comment_count>0</comment_count>
    <who name="Nicolas L.">kde</who>
    <bug_when>2008-12-23 13:20:38 +0000</bug_when>
    <thetext>Version:            (using Devel)
Installed from:    Compiled sources

Test done with kde 4.1.85

if i add Amarok in the audio/ogg mimetype, the ~/.local/share/applications/mimeapps.list file is writen like this: 

[Added Associations]
\naudio/ogg=kde4-amarok.desktop</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>685980</commentid>
    <comment_count>1</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2008-12-23 20:16:35 +0000</bug_when>
    <thetext>This one really puzzles me. Do you see \n in any other config file? (~/.kde[4]/share/config/*)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>685994</commentid>
    <comment_count>2</comment_count>
    <who name="Nicolas L.">kde</who>
    <bug_when>2008-12-23 20:44:35 +0000</bug_when>
    <thetext>yes i have some in /home/test/.kde4/share/config/filetypesrc

its content is like this : 

[EmbedSettings]
embed-\napplication/ogg=true
embed-\napplication/x-nsv-vp3-mp3=true
embed-\napplication/x-ogg=true
embed-\naudio/basic=true
embed-\naudio/flac=true
embed-\naudio/midi=true
embed-\naudio/mp3=true
embed-\naudio/mpeg=true
embed-\naudio/mpeg2=true
embed-\naudio/mpeg3=true
embed-\naudio/ogg=true
embed-\naudio/x-basic=true
embed-\naudio/x-flac=true
embed-\naudio/x-mpeg=true
embed-\naudio/x-mpeg2=true
embed-\naudio/x-mpeg3=true
embed-\naudio/x-mpegurl=true
embed-\naudio/x-scpls=true
embed-\nvideo/divx=true
embed-\nvideo/fli=true
embed-\nvideo/mp4=true
embed-\nvideo/vnd.divx=true
embed-\nvideo/vnd.vivo=true
embed-\nvideo/x-fli=true
embed-\nvideo/x-mpeg=true
embed-\nvideo/x-mpeg2=true
embed-application/asx=true
embed-application/futuresplash=true
embed-application/vnd.rn-realaudio=true
embed-application/x-drm-v2=true
embed-application/x-google-vlc-plugin=true
embed-application/x-mplayer2=true
embed-application/x-ms-wmp=true
embed-application/x-ms-wmv=true
embed-application/x-quicktimeplayer=true
embed-audio/wav=true
embed-audio/x-ms-wax=true
embed-audio/x-ms-wmv=true
embed-audio/x-pn-realaudio=true
embed-audio/x-realaudio=true
embed-interface/x-winamp-skin=false
embed-text/htmlh=false
embed-unknown/mime-type=true
embed-video/divx=true
embed-video/msvideo=true
embed-video/vnd.divx=true
embed-video/x-ms-asf-plugin=true
embed-video/x-ms-wm=true
embed-video/x-ms-wmp=true
embed-video/x-ms-wvx=true
embed-video/x-quicktime=true
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686039</commentid>
    <comment_count>3</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2008-12-23 21:58:21 +0000</bug_when>
    <thetext>So this is about mimetypes again, not a KConfig bug.

Does &quot;kmimetypefinder foo.mp3&quot; answer
audio/mpeg
(accuracy 100)

or is there a newline (a real one this time, I think), before audio/mpeg?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686043</commentid>
    <comment_count>4</comment_count>
    <who name="Nicolas L.">kde</who>
    <bug_when>2008-12-23 22:03:26 +0000</bug_when>
    <thetext>i obtain this : 

$ kmimetypefinder foo.mp3
audio/mpeg
(accuracy 100)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686113</commentid>
    <comment_count>5</comment_count>
    <who name="Nicolas L.">kde</who>
    <bug_when>2008-12-24 00:33:45 +0000</bug_when>
    <thetext>i started to add the nonewline patch you gave me  ( the one that apply on apps/ )
now i can go on the file association part anymore ( i removed /home/test/.kde4/share/config/filetypesrc  and ~/.local/share/applications/mimeapps.list  but this is  the same.

Application : Configuration du système (systemsettings), signal SIGABRT
[Current thread is 1 (Thread 0xb5fa46d0 (LWP 13502))]

Thread 1 (Thread 0xb5fa46d0 (LWP 13502)):
[KCrash Handler]
#6  0xffffe424 in __kernel_vsyscall ()
#7  0xb68c3d90 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#8  0xb68c57f8 in abort () at abort.c:88
#9  0xb744b445 in qt_message_output (msgType=QtFatalMsg, 
    buf=0xbfd40280 &quot;ASSERT: \&quot;!mimeName.contains(&apos;\\n&apos;)\&quot; in file /home/neoclust/rpm/BUILD/kdebase-4.1.85/apps/konqueror/settings/filetypes/mimetypedata.cpp, line 53&quot;) at global/qglobal.cpp:2102
#10 0xb744b535 in qFatal (msg=0xb759eb78 &quot;ASSERT: \&quot;%s\&quot; in file %s, line %d&quot;) at global/qglobal.cpp:2303
#11 0xb744b5e5 in qt_assert (assertion=0xb47c70ba &quot;!mimeName.contains(&apos;\\n&apos;)&quot;, file=0xb47c6e10 &quot;/home/neoclust/rpm/BUILD/kdebase-4.1.85/apps/konqueror/settings/filetypes/mimetypedata.cpp&quot;, line=53)
    at global/qglobal.cpp:1872
#12 0xb47c1bf4 in MimeTypeData (this=0x9077380, mime={d = 0xbfd42318}) at /usr/src/debug/kdebase-4.1.85/apps/konqueror/settings/filetypes/mimetypedata.cpp:53
#13 0xb47bf1b6 in TypesListItem (this=0x9077360, parent=0x90789a8, mimetype={d = 0xbfd42374}) at /usr/src/debug/kdebase-4.1.85/apps/konqueror/settings/filetypes/typeslistitem.cpp:39
#14 0xb47b3d1e in FileTypesView::readFileTypes (this=0x8f2fd48) at /usr/src/debug/kdebase-4.1.85/apps/konqueror/settings/filetypes/filetypesview.cpp:216
#15 0xb7ad0ae3 in KCModule::qt_metacall (this=0x8f2fd48, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x8ea7a38) at /usr/src/debug/kdelibs-4.1.85/build/kdeui/kcmodule.moc:77
#16 0xb47b4372 in FileTypesView::qt_metacall (this=0x8f2fd48, _c=QMetaObject::InvokeMetaMethod, _id=29, _a=0x8ea7a38)
    at /usr/src/debug/kdebase-4.1.85/build/apps/konqueror/settings/filetypes/filetypesview.moc:73
#17 0xb755ab8a in QMetaCallEvent::placeMetaCall (this=0x8fe8af8, object=0x8f2fd48) at kernel/qobject.cpp:529
#18 0xb755c782 in QObject::event (this=0x8f2fd48, e=0x8fe8af8) at kernel/qobject.cpp:1155
#19 0xb6c5a05f in QWidget::event (this=0x8f2fd48, event=0x8fe8af8) at kernel/qwidget.cpp:7551
#20 0xb6bfffac in QApplicationPrivate::notify_helper (this=0x8d82620, receiver=0x8f2fd48, e=0x8fe8af8) at kernel/qapplication.cpp:3803
#21 0xb6c082ad in QApplication::notify (this=0xbfd42b94, receiver=0x8f2fd48, e=0x8fe8af8) at kernel/qapplication.cpp:3768
#22 0xb7a269b0 in KApplication::notify (this=0xbfd42b94, receiver=0x8f2fd48, event=0x8fe8af8) at /usr/src/debug/kdelibs-4.1.85/kdeui/kernel/kapplication.cpp:307
#23 0xb754c853 in QCoreApplication::notifyInternal (this=0xbfd42b94, receiver=0x8f2fd48, event=0x8fe8af8) at kernel/qcoreapplication.cpp:587
#24 0xb754d535 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x8d6d310) at kernel/qcoreapplication.h:209
#25 0xb754d71c in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1091
#26 0xb757872d in postEventSourceDispatch (s=0x8d85168) at kernel/qcoreapplication.h:214
#27 0xb62c1cba in IA__g_main_context_dispatch (context=0x8d84838) at gmain.c:1814
#28 0xb62c53d8 in g_main_context_iterate (context=0x8d84838, block=1, dispatch=1, self=0x8d82758) at gmain.c:2448
#29 0xb62c5598 in IA__g_main_context_iteration (context=0x8d84838, may_block=1) at gmain.c:2511
#30 0xb757834a in QEventDispatcherGlib::processEvents (this=0x8d8fa18, flags={i = -1076614536}) at kernel/qeventdispatcher_glib.cpp:319
#31 0xb6c9c92a in QGuiEventDispatcherGlib::processEvents (this=0x8d8fa18, flags={i = -1076614488}) at kernel/qguieventdispatcher_glib.cpp:198
#32 0xb754aec3 in QEventLoop::processEvents (this=0xbfd42b20, flags={i = -1076614424}) at kernel/qeventloop.cpp:143
#33 0xb754b081 in QEventLoop::exec (this=0xbfd42b20, flags={i = -1076614360}) at kernel/qeventloop.cpp:194
#34 0xb754d7f2 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:845
#35 0xb6bffe14 in QApplication::exec () at kernel/qapplication.cpp:3331
#36 0x08056a7b in main (argc=-1076613932, argv=0xb7f437d4) at /usr/src/debug/kdebase-workspace-4.1.85/systemsettings/main.cpp:67</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686135</commentid>
    <comment_count>6</comment_count>
    <who name="Nicolas L.">kde</who>
    <bug_when>2008-12-24 01:35:30 +0000</bug_when>
    <thetext>the patches applied for the debuging are : 
http://web.davidfaure.fr/tmp/nonewline.diff
http://web.davidfaure.fr/tmp/kopenwithdialog-nonewline.diff</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686275</commentid>
    <comment_count>7</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2008-12-24 11:44:01 +0000</bug_when>
    <thetext>Good, getting somewhere.
I made a separate test program to understand where this comes from - please unpack, then
cmake . &amp;&amp; make &amp;&amp; ./kallmimes

If it asserts, then the bug is in kbuildsycoca4. Uncomment this debug output in kded/kbuildmimetypefactory.cpp:
     kDebug() &lt;&lt; &quot;Creating mimetype&quot; &lt;&lt; name &lt;&lt; &quot;from file&quot; &lt;&lt; file &lt;&lt; &quot;path&quot; &lt;&lt; fullPath;
and add this line after it:
    Q_ASSERT(!name.contains(&apos;\n&apos;));
Rebuild, then run kbuildsycoca4 --noincremental, and tell me if it asserts.

If kallmimes works fine then, hmm, I&apos;m even more puzzled and the bug is in the filetypes editor.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686276</commentid>
    <comment_count>8</comment_count>
      <attachid>29603</attachid>
    <who name="David Faure">faure</who>
    <bug_when>2008-12-24 11:44:36 +0000</bug_when>
    <thetext>Created attachment 29603
kallmimes.tar.bz2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686298</commentid>
    <comment_count>9</comment_count>
    <who name="Nicolas L.">kde</who>
    <bug_when>2008-12-24 12:44:55 +0000</bug_when>
    <thetext>ok it assert with it

ASSERT: &quot;!mimetype.contains(&apos;\n&apos;)&quot; in file /home/neoclust/rpm/BUILD/testprogs/kallmimes/kallmimes.cpp, line 39
Abandon


i am rebuilding my kdelibs with the kdebug and the assert you asked.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686301</commentid>
    <comment_count>10</comment_count>
    <who name="Nicolas L.">kde</who>
    <bug_when>2008-12-24 12:45:54 +0000</bug_when>
    <thetext>this is how this is in the konsole  :
&quot;video/x-flic&quot;
&quot;audio/x-ape&quot;
&quot;application/sieve&quot;
&quot;
video/x-mpeg2&quot;
ASSERT: &quot;!mimetype.contains(&apos;\n&apos;)&quot; in file /home/neoclust/rpm/BUILD/testprogs/kallmimes/kallmimes.cpp, line 39
Abandon
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686325</commentid>
    <comment_count>11</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2008-12-24 13:41:31 +0000</bug_when>
    <thetext>nspluginscan bug, please test  http://www.davidfaure.fr/tmp/pluginscan.cpp.diff</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686354</commentid>
    <comment_count>12</comment_count>
    <who name="Nicolas L.">kde</who>
    <bug_when>2008-12-24 14:26:33 +0000</bug_when>
    <thetext>\o/

now i obtain :

[Added Associations]
audio/ogg=kde4-amarok.desktop;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686358</commentid>
    <comment_count>13</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2008-12-24 14:30:03 +0000</bug_when>
    <thetext>OK, for the record, the bug was in the NP_GetMIMEDescription implementation of /usr/lib/mozilla/plugins/mplayerplug-in.so, which returns mimetypes separated by &quot;;\n&quot; instead of just &quot;;&quot; as specified by https://developer.mozilla.org/En/NP_GetMIMEDescription

Let&apos;s have the workaround, anyway, can&apos;t hurt.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686359</commentid>
    <comment_count>14</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2008-12-24 14:31:18 +0000</bug_when>
    <thetext>SVN commit 901122 by dfaure:

Don&apos;t generate mimetypes like &quot;\nvideo/x-mpeg2&quot; -- the bug was in the NP_GetMIMEDescription implementation of
/usr/lib/mozilla/plugins/mplayerplug-in.so, which returns mimetypes separated by &quot;;\n&quot; instead of just &quot;;&quot; as specified by
https://developer.mozilla.org/En/NP_GetMIMEDescription... Nicolas will report that bug, but let&apos;s have the workaround
anyway, can&apos;t hurt.
BUG: 178562


 M  +1 -1      pluginscan.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&amp;revision=901122
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>29603</attachid>
            <date>2008-12-24 11:44:36 +0000</date>
            <delta_ts>2008-12-24 11:44:36 +0000</delta_ts>
            <desc>kallmimes.tar.bz2</desc>
            <filename>kallmimes.tar.bz2</filename>
            <type>application/octet-stream</type>
            <size>1187</size>
            <attacher name="David Faure">faure</attacher>
            
              <data encoding="base64">QlpoOTFBWSZTWRNf+WAAAwF/hMwYAQB8//+ff+//pP/v/+oAAgAIUAQ+ramUttA2wAaCI01JtMoe
qep7U9PRTJqMNI0Nqeiek0eT1QaGmTT0A0SZNNNDU2qeUw1D0jIANAA00NABoAA4yZNGgNGmIyND
EMCaNMQYjQYQAGHGTJo0Bo0xGRoYhgTRpiDEaDCAAwSmk0TQQE0xGJqRp4iaNiTaQ0aM01AaYgPK
es+HupqIH7wZqDMwbJsbTY+6TkzIJIQWIdiIlQgbvG/iCQUZGt8UQzYFQIDZZXDRb91Khvd2ukF1
LBISwzGcQMVEA0xmue8tTJM3NGcOv6Ldv9NAAllGD3GGeg5g8yj6MaUngdj8o8ixfMh+kxVFNYTW
DaeCifuLI3YF9A783VnNGnCKD4o/+3sFyl6BIkB7YQ2QwcCyT7YUW5l6ccR0IkolngJi0RA4QzMg
kMWEOa87sj3HeAUkMGDupqxe2MSnsRossg/ANVtDo9yK5YDNrsmrX1TvP5ozQygGPfKRFvVIw+lc
nJCgZeILy3asvVbHt1RCk6kymtHkh4NJk+0Ohw4BAdfh6xpBTL6YIC1VVspWQ7xSywmHZYNrtTIf
75jpWtbp9si/nEQaMdAtvVl27IfhZQBshXrQIEFOtqY/hmizzADVJyZgdMfXH0cuAMGa8K9DuvT7
/dM+OM5ulNtuwgs7DrnmmV/iPeTm0B2lT1NhX/rdc2xCXl1Pr+NL+Oo9MMC6bgexqO1JO3rPIrcs
toS9PGcuSzd2uuB9VYexh3pPY0sMwiBcQsSilG4S6L8gsHpCR2DQRnOQqU2yR2r1+y1lJIcZJ1hW
oXCfAudlYUkWGohNwmKpKxNySo905qoeF71WmjTikrCjzlci02BDbzXPLlsy70EshhqyjTI3MDwz
1koZNn3tZqvhMNwoCKYxbB6uPgTS3PNivSN7HmKp1dzZIhE4Qzz0ZqoU/1D51SlnZ+wdzNqIcSb0
GWUiEz0hj2yz6/McKhFpajqRalwLhRhjDAUrsD+T4bL56Q/JbMYbssGpio72IzfvOVjkd1K3a1YX
iC8OCAh+Ig78ePFqmx0Y3Xm316GduIpjdrimTKsB2doY0Z62zZuHS7aupFA66fZtcx0bB8puxJHI
om5lN5oe5MGrxjyk+jk+pk1omHbW8jl4X5ebN4gLgBTUxolh+gLcbWRQ6sL3gOtSjQJlAUDSQyec
12kVU0u7PrZnxeGvAHsQtqgzx8c8pIXrLjYrXAnEDxrskHvRpMAE1GI7bnN6vR4qo1undWvq7nID
f/qDyQx6KvmawtaToi94aAcd1FeWjdBy6PUrmsRrNMMLmeng8V9r5MVDyz6d/6duLeLLcjbTBDEi
Gy8K9hmsOzW9BA7u7Ycnys0tjFCidyvEKpq4c3PZaxA755ePDCboZGDGeUm0rYmqiTZK1fMokJoJ
sYQ3Xq3Uix8HiCtXCRCImUeIOd4oldnY4JSZhWhViSfXvkJX2NuvkzYj1tt0McZ+dtNSMmQbU/eV
nmc85ZwZKytZ2JPxMYPktikN9bISJ+eO9gffrv8Lun7ZQzM3/i7kinChICa/8sA=
</data>

          </attachment>
      

    </bug>

</bugzilla>