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
This one really puzzles me. Do you see \n in any other config file? (~/.kde[4]/share/config/*)
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
So this is about mimetypes again, not a KConfig bug. Does "kmimetypefinder foo.mp3" answer audio/mpeg (accuracy 100) or is there a newline (a real one this time, I think), before audio/mpeg?
i obtain this : $ kmimetypefinder foo.mp3 audio/mpeg (accuracy 100)
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 "ASSERT: \"!mimeName.contains('\\n')\" in file /home/neoclust/rpm/BUILD/kdebase-4.1.85/apps/konqueror/settings/filetypes/mimetypedata.cpp, line 53") at global/qglobal.cpp:2102 #10 0xb744b535 in qFatal (msg=0xb759eb78 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2303 #11 0xb744b5e5 in qt_assert (assertion=0xb47c70ba "!mimeName.contains('\\n')", file=0xb47c6e10 "/home/neoclust/rpm/BUILD/kdebase-4.1.85/apps/konqueror/settings/filetypes/mimetypedata.cpp", 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
the patches applied for the debuging are : http://web.davidfaure.fr/tmp/nonewline.diff http://web.davidfaure.fr/tmp/kopenwithdialog-nonewline.diff
Good, getting somewhere. I made a separate test program to understand where this comes from - please unpack, then cmake . && make && ./kallmimes If it asserts, then the bug is in kbuildsycoca4. Uncomment this debug output in kded/kbuildmimetypefactory.cpp: kDebug() << "Creating mimetype" << name << "from file" << file << "path" << fullPath; and add this line after it: Q_ASSERT(!name.contains('\n')); Rebuild, then run kbuildsycoca4 --noincremental, and tell me if it asserts. If kallmimes works fine then, hmm, I'm even more puzzled and the bug is in the filetypes editor.
Created attachment 29603 [details] kallmimes.tar.bz2
ok it assert with it ASSERT: "!mimetype.contains('\n')" 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.
this is how this is in the konsole : "video/x-flic" "audio/x-ape" "application/sieve" " video/x-mpeg2" ASSERT: "!mimetype.contains('\n')" in file /home/neoclust/rpm/BUILD/testprogs/kallmimes/kallmimes.cpp, line 39 Abandon
nspluginscan bug, please test http://www.davidfaure.fr/tmp/pluginscan.cpp.diff
\o/ now i obtain : [Added Associations] audio/ogg=kde4-amarok.desktop;
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 ";\n" instead of just ";" as specified by https://developer.mozilla.org/En/NP_GetMIMEDescription Let's have the workaround, anyway, can't hurt.
SVN commit 901122 by dfaure: Don't generate mimetypes like "\nvideo/x-mpeg2" -- the bug was in the NP_GetMIMEDescription implementation of /usr/lib/mozilla/plugins/mplayerplug-in.so, which returns mimetypes separated by ";\n" instead of just ";" as specified by https://developer.mozilla.org/En/NP_GetMIMEDescription... Nicolas will report that bug, but let's have the workaround anyway, can't hurt. BUG: 178562 M +1 -1 pluginscan.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=901122