Registered Member
|
Yeah i can, pretty standard, txt files, applications : kwrite, kate, emacs, okular, Service is 'embedded advanced text editor' (katepart), okulartxt, default settings for konqueror...... I opens pretty much most stuff, except some specific files, for example a empty text file created with dolphin... ( but also some others which is the case why it matters) |
Registered Member
|
Hi,
i know this is a quite old thread but it seems that the problem still exists in current distributions. A friend of mine who uses the new kde 5 version doesn't seem to have the problem. So it seems that this bug was fixed in newer versions. Is there any workaround to fix this problem for the still often used kde 4 version? I use Debian Testing and have KDE 4.14.2 installed. Kate is 3.14.2 with kate component 3.7 and kwrite 4.14.2 which bases on the same kate component. Both crash when opening newly created files in dolphin or some other text files. I found out that it has to do with the beginning byte in the text file. Newly created text files in dolphin doesn't start empty (why not??) instead they have the two bytes 0x20 0x0A which is a space and newline. When i delete these characters kate/kwrite can open this file without crashing. Also Text files starting with any ascii number from 0-9 seems to cause the crash. When the file starts witch ascii a-z it could be normally opened. That's quite weired for an texteditor to be so specific for the first byte in the file but it is always reproducible to crash these two programs. Ciao, Rainer |
|
Sure it's the *same* crash (with a similar backtrace ending in sycoca?)
It rather smells like a crash caused by the encoding detection (got a backtrace?) => settings|open/save|encoding detection: disabled Still crashes? |
Registered Member
|
I tried disabling the encoding detection but the result is the same. The backtrace (without debug packages installed) from the "kde crash handler" program also has one line with KSycocaEntry in it.
Ciao, Rainer |
Registered Member
|
Cheers, still happens to me too... For some reason KDE packages in debian have been frozen to the dark ages
Same deal here, if I create an empty text file through dolphin kpart crashes, but if I open with another text editor, for example nano, and clear out the file, kwrite opens it. But I still don't know how to fix already filled files. |
|
It's the same backtrace as the OP - and likely some stack corruption.
TextBuffer::load() does not call to KSycoca::name() - see http://lxr.kde.org/source/kde/applicati ... stable-qt4 This is indeed during the encoding detection, but the loop is entered *once* regardless of the setting (so it won't help) The only reference to a "name" symbol I could spot is QTextCodec::name(), which is invoked in certain debug calls. => run "kdebugdialog" and ensure everything that says "kate" (and notably id 13020) is disabled, but if this is indeed some stack corruption, the error is somewhere else => valgrind. |
Registered Member
|
The only "fix" i know is to edit these files to start with any normal alphabet character (a-z) and no space or number. Than i can open them without problems. But it is sad to know that this bug seems to be fixed in newer kde versions and there is no backport of whatever the problem is to the versions debian is using in their latest stable os version. In the kde bugtracker exist two bugs specific to this problem: https://bugs.kde.org/show_bug.cgi?id=345189 https://bugs.kde.org/show_bug.cgi?id=348977 But until today nobody seems to take note of these bugs. Ciao, Rainer |
|
Very good - those bugs have better backtraces.
The problem is the TextLoader instantiation, which apparently tries to resolve
(what means the file cannot be opened for reading???) KMimeType::findByPath however returns "NULL" - this was apparently fixed by http://quickgit.kde.org/?p=kdelibs.git& ... ad6ecb1d1d => delete ~/.local/share/mime/globs (or check it for invalid entries by hand |
Registered Member
|
=> delete ~/.local/share/mime/globs (or check it for invalid entries by hand
Should this be the trick to avoid the program crashing? I tried deleting the glob (and glob2) file but this doen't change the crashing behaviour of kate/kwrite when opening text files with "bad" starting byte. Or do i have to reboot because the file is maybe cached or something else? Ciao, Rainer |
|
I'm actually not 100% sure how this is handled.
delete it, then run "update-mime-database" and ultimately "kbuildsycoca" or "kbuildsycoca4" - try again and hope for the best, but it could still be that the bogus glob entry is recreated automatically, then you're screwed |
|
PS: I've also a glob2 file - I assume it's rewritten with update-mime-database, but be aware of it.
|
Registered Member
|
"update-mime-database" wants a "MIME-DIR" directory as parameter, but which should this be?
I tried as user
but had no permission. Than i tried as root and it run ok but no new glob file in ~/.local/share/mime/ for root nor the user. Ciao, Rainer |
|
|
Registered Member
|
Ok that created both files (globs and globs2) new but it also doesn't change the crashing behaviour.
But thanks for all your help so far. I really appreciate it. Ciao, Rainer |
|
did you attempt to run "kbuildsycoca --noincremental" (it seems unlikely that a different issue leads to the same conditions/backtraces)
|
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft