LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Kate closes unexpectedly (https://www.linuxquestions.org/questions/linux-software-2/kate-closes-unexpectedly-4175638321/)

CVAlkan 09-13-2018 11:18 AM

Kate closes unexpectedly
 
Hi:

I've used Kate for ages, but recently began experiencing some weird behavior. I'm currently using Linux Mint 18.3/Cinnamon 3.6.7/Kate 15.12.3.

Since I don't think any of these have been updated recently, I suspect I must have inadvertently changed some Kate setting, but can't figure out what.

Here are the symptoms:
1) If I have multiple tabs open, Kate will shut down completely when I close a single tab either from the [x] on the tab or the Ctrl+w command. The strange thing is that this only seems to happen with certain files.
2) If there is only 1 tab open and I close it as above, Kate shuts itself down a second or two after the tab closes. This is not as annoying as symptom #1, but up until a week or so ago, Kate didn't behave that way.

I found many references to Kate config files on the web, but (as usual) I had none of these files on my system. Using the find command, I did locate a reference to .local/share/kate/anonymous.katesession. I deleted that but it made no difference and Kate simply rebuilt that file, which seems to hold settings used for recently edited files.

I then tried a complete purge and reinstallation which didn't help either. I suspect there's some other file lurking in some dark corner that I need to alter or delete, but I can't find it.

My other suspicion is that I've somehow activated some Session set up, although there are no named sessions listed in the Kate menu, and I don't believe I've ever used this facility.

Does anyone have any ideas what I did (or maybe what Kate changed)?

Thanks for any help ...

xode 09-13-2018 05:02 PM

This is a completely wild guess on my part but possibly Kate is causing a SIGSEGV (memory segment) violation. If the configuration for your installation of Kate has settings for memory usage, setting those to not try to be "memory efficient" might get rid of your problem if SIGSEGV is the cause.

frankbell 09-13-2018 08:18 PM

I use Kate daily with Slackware, Debian, and Mageia and have not encountered any issues.

Whenever you need to use Kate, start it from the command line. Perhaps it will throw some useful error messages to the terminal if it crashes.

You might also check the log files. I'm not sure of Mint's log structure at the moment--I know that there are sometimes minor variations amongst distros. I think Mint is now using SystemD. This article, towards the end, explains how to use journalctl to narrow down a search of SystemD logs.

CVAlkan 09-14-2018 08:13 AM

Xode and frankbell: Thanks for the responses, but I guess I wasn't clear enough in my description, so let me give it another shot.

First, Kate does not seem to "crash" -- it just closes when I close the tab on a couple specific files, even when other tabs are still open. And by "specific files," I mean those known to me by name.

I have taken those particular files, opened them in other editors (one in Geany and the other in xed), made a few minor changes, and re-saved them. Because Kate still responds to them in the manner I described, I surmised that it must be remembering them by name, and perhaps in some config file that I could not locate. That's also why I suspected the "session" facility, since it was the only thing I found that seemed to be able to treat a selected group of files differently.

Renaming those files, however, didn't change the behavior, so unless Kate "knows" the identity of those files through some other mechanism than "name," my config file inference seems suspect. I tried looking at the files with less and even bless (hex editor), but didn't spot anything interesting (although, to be fair, had no idea what I would be looking for anyway).

But, again, thank you both for offering suggestions. I'm done with those particular files for the moment and Kate seems to be behaving normally with others, so it's not a killer problem - I just dislike it enormously when encountering "strange" behavior.

frankbell 09-14-2018 08:55 PM

Quote:

First, Kate does not seem to "crash" -- it just closes when I close the tab on a couple specific files, even when other tabs are still open. And by "specific files," I mean those known to me by name.
To make sure I understand clearly: The application stops completely when you close tabs containing certain specific files, but not when you close tabs containing other files and this behavior is limited only to those certain specific files. Is that a correct understanding?

Is there something about these files that makes them stand out from others?

What is their encoding?

When Kate closes, does it display its normal prompt to save or discard changes or does it just shut down? Have you checked whether it has left a residual process (I'm sure it has not, but I'd still check because, in troubleshooting, ruling out something is a step forward)?

CVAlkan 09-15-2018 07:37 AM

Yes, your first paragraph is a correct understanding.

There is nothing special about the specific files that I can know of.

All files are UTF-8; since I often use multiple scripts/languages (although these particular files are all Latin/English), UTF-8 is the only encoding I use.

I'm a creature of habit and almost always explicitly save before exiting or even switching tabs, so the "save or discard" message isn't something I thought to check. I'll do that and see what happens.

I did a "ps -e" once and didn't spot anything, but I'll try that again as well.

Thanks again.

hydrurga 09-15-2018 01:38 PM

Quote:

Originally Posted by CVAlkan (Post 5903635)
Yes, your first paragraph is a correct understanding.

If that is indeed a correct understanding then I would find a file which causes the issue, make a copy of it, then gradually strip out its contents, testing with Kate each time, in the hope that you can narrow down whether or not it is some particular content that's causing the problem.

scasey 09-15-2018 01:48 PM

Just a SWAG
The files that cause the behavior contain a hidden control character, like EOF or the like.
hydrurga's suggestion might be a way to find such. Also, opening in vi/vim might reveal more detail...or in your favorite hex editor.


All times are GMT -5. The time now is 06:52 PM.