Version: 1.10.2 (using KDE KDE 3.4.2) Installed from: Gentoo Packages I use kbabel katalog manager for my kde trunk translation. If I mark many files and then exit the catalog manager. I then try to start kbabel editor or catalog manager I get the error: Could'n load the default project: /home/myuser/.kde3.4/share/config/kbabel.defaultproject Ofocourse the file exists in the folder. If I edit it manually and remove the line with markings, the catalog manager & editor work fine again, without complaining. I can reproduce the problem in my system with the below markings line in kbabel.defaultproject: Marker=/extragear-graphics/digikamimageplugin_adjustcurves,/extragear-graphics/digikamimageplugin_adjustlevels,/extragear-graphics/digikamimageplugin_antivignetting,/extragear-graphics/desktop_extragear-graphics_digikamimageplugins,/extragear-graphics/desktop_extragear-graphics_digikam,/extragear-graphics/digikamimageplugin_blowup,/extragear-graphics/digikamimageplugin_blurfx,/extragear-graphics/digikamimageplugin_border,/extragear-graphics/digikamimageplugin_channelmixer,/extragear-graphics/digikamimageplugin_despeckle (Maybe it is some limitation with the size of the loading variable...)
Is it really a crash or do you only get a dialog box witht the error message?
It is a crash. It pops up the message. Ofcouse kbabel (editor or catalog mngr) does not load. And then I get a backtrace dialog for kbabel application crash.
I have looked at the code. I do not understand why it would crash (but I do not understand either why the other bugs about settings are crashing too). (I have not tried yet to reproduce it.) Have a nice day!
Nicolas can you please give me some information on which files should I look for the bug in websvn? You know the code, and I don't have much time to browse all the code. Maybe I could help.
To comment #4: the catalog manager uses the functions CatalogManagerView::readMarker and CatalogManagerView::saveMarker (kdesdk/kbabel/catalogmanagerview.cpp) to set the markers in the (project) configure file. However those functions are very short. The main work is done by the KConfig classes in kdelibs by the corresponding functions handling QStringList in kdelibs/kdecore/kconfigbase.cpp .) That is as far as I have gone with this bug. As there are other bugs for KBabel that seems to be relate to config files somehow, I do not think that it is necessarily a problem of this code. (As for me knowing KBabel's code, sorry, I do not know it that much.) Have a nice day! PS.: to comment #3: I have tried to reproduce it and I could not reproduce it.
Could you attach the kbabelrc file that crashes kbabel?
Created attachment 13320 [details] kbabelrc file during the crash Notice though as I say in my first post, that the file that causes the crash is the kbabelrc.defaultproject and not kbabelrc. In fact If I remove the line Marker= or If I shorten it a bit the crash disappears. The Marker= that Crashes: Marker=/extragear-graphics/digikamimageplugin_adjustcurves,/extragear-graphics/digikamimageplugin_adjustlevels,/extragear-graphics/digikamimageplugin_antivignetting,/extragear-graphics/desktop_extragear-graphics_digikamimageplugins,/extragear-graphics/desktop_extragear-graphics_digikam,/extragear-graphics/digikamimageplugin_blowup,/extragear-graphics/digikamimageplugin_blurfx,/extragear-graphics/digikamimageplugin_border,/extragear-graphics/digikamimageplugin_channelmixer,/extragear-graphics/digikamimageplugin_despeckle the Marker= line that does not crash: Marker=/extragear-graphics/digikamimageplugin_adjustcurves,/extragear-graphics/digikamimageplugin_adjustlevels,/extragear-graphics/digikamimageplugin_antivignetting,/extragear-graphics/desktop_extragear-graphics_digikamimageplugins,/extragear-graphics/desktop_extragear-graphics_digikam or Marker=
Is still this bug unconfirmed ? Hasn't anyone confirmed yet, or am I the only one... Same happens with kde 3.5.0
On Wednesday 21 December 2005 10:17, manolis wrote: (...) > Is still this bug unconfirmed ? Hasn't anyone > confirmed yet, or am I the only one... From what I know it is still not reproduced, even less by a developer. > > Same happens with kde 3.5.0 That is rather bad. :-( Have a nice day!
Happens still in KDE 3.5.3. However, it is not in kbabelrc, but in .kde/share/config/kbabel.defaultproject Removing files from line with "Marker=" fixes the problem. Steps to reproduce: 1. Run catalog manager. 2. Mark many files (I guess 30 is enough, maybe 40). 3. Close Manager and Kbabel. 4. Start KBabel -> message box stating something like "Cannot read kbabel.default project". After clicking OK it crashes. Backtrace: (no debugging symbols found) Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread -1233945728 (LWP 15623)] [KCrash handler] #6 0xb7d7974f in KBabel::Project::identitySettings () from /usr/lib/libkbabelcommon.so.3 #7 0xb7d4eb96 in KBabel::Catalog::identitySettings () from /usr/lib/libkbabelcommon.so.3 #8 0xb7d53b0a in KBabel::Catalog::getNumberOfPluralForms () from /usr/lib/libkbabelcommon.so.3 #9 0xb7d56dbb in KBabel::Catalog::readPreferences () from /usr/lib/libkbabelcommon.so.3 #10 0xb7d6293a in KBabel::Catalog::Catalog () from /usr/lib/libkbabelcommon.so.3 #11 0x0807f74b in KBabelSplash::staticMetaObject () #12 0x080cba0a in KBabelSplash::staticMetaObject () #13 0x08071a93 in ?? () #14 0x0825ca28 in ?? () #15 0xbfe2e3a4 in ?? () #16 0x08123b77 in typeinfo name for QDict<QWidget> () #17 0xbfe2e394 in ?? () #18 0x0813f330 in ?? () #19 0x082348e0 in ?? () #20 0x017c2a64 in ?? () #21 0xb7414148 in vtable for QTimer () from /usr/lib/libqt-mt.so.3 #22 0xbfe2e324 in ?? () #23 0x00000000 in ?? ()
Created attachment 17095 [details] kbabel.defaultproject which crashes KBabel Default project setting which crash KBabel. Save as $HOME/.kde/share/config/kbabel.defaultproject to test.
I can reproduce the crash here. The reason it crashes is the broken error handling of "invalid" project files. The reason the project is suspected as invalid is, the Project::Project constructor has a call to KMimeType::findByURL() and checks for "text/plain" but the type is "application/octet-stream". The project object then is invalid and no initialized correctly but later on use. That leads to the crash. Using the command "file" on a console leads to: hunsum@leviathan:~/.kde/share/config$ file kbabel.defaultproject kbabel.defaultproject: UTF-8 Unicode text, with very long lines hunsum@leviathan:~/.kde/share/config$ cd hunsum@leviathan:~$ file kde-de kde-de: UTF-8 Unicode text hunsum@leviathan:~$ So the reason for the "application/octet-stream" is the very long line it seems. But that should not crash kbabel. I have a patch here to load the project file even with the long line.
Created attachment 18421 [details] add "application/octet-stream" as valid project MIME type Please try this out. I will commit at least in trunk if it works for you.
SVN commit 602716 by johach: Fixed loading of project files with very long lines. They are detected als "application/octet-stream". BUG:113822 M +5 -0 kbproject.cpp --- branches/KDE/3.5/kdesdk/kbabel/common/kbproject.cpp #602715:602716 @@ -76,6 +76,11 @@ // Empty files are allowed too kdWarning() << "Empty KBabel project file!" << endl; } + else if ( mime->name() == "application/octet-stream" ) + { + // this can happen if the file has some very long lines + kdWarning() << "KBabel project file detected as octet-stream! Perhaps there are very long lines in it!" << endl; + } else { // Unknown mime type, abort!