User forums > General (but related to Code::Blocks)

Kind of a feature request (regarding random crashes)

(1/4) > >>

arthur1966:
Hi,

I'm using CB to develop a quite large project on linux. (Thx for CB, btw)

I've been having random crashes while using the editor, in very different intervals (sometimes no crashes for months, somtimes several a day).

Because of the crashes, I've switched from the latest stable to svn trunk - because it was an improvement.

I'm pretty sure, the crashes stem from the realtime code scanner, since they always happen during plain source editing.

Now. I know, that hunting random crashes is difficult, and that, most likely, there will always some remain.

But - having to fear random crashes while editing a huge codebase is a psychological problem for the developer. One always has to make sure, that sources are always saved - or you have to try to remember, which edits have made to which files and may have not been saved yet. It's additional stress and, quite frankly, highly annoying. I did try autosave, but that's not a solution. It's only littering the filesystem - and the last save may already be a minute old when the crash happens.

So, this is the feature proposal: add a crash handler, that dumps all open files in some directory, in their current editing state.

It doesn't matter, if it takes me a minute to sift through the dump - basically, I'd be using git to find actual changes anyway. The important thing is, that no edit is lost in a crash. Crashes would still be a hassle and cost a few minutes to clean up - but the important thing is: one could be certain, that nothing was lost, no change was forgotten.

I'm pretty sure, this can't be done as an addon, since it needs to be a signal handler, and it may also have to be hardwired into the editor.

regards,
arthur

PS: I didn't post this to the bug tracker, because "random crash" is nothing that can be tracked or "fixed", since that's the definition of "random".
PPS: I did try to narrow down the crash occurrences - either a crash report or a way to reproduce. The crash messages usually point to something UI-related, but never the same message twice. And repeating the same edit never crashed it a second time. Also, CB is the only software with random crashes on that machine, so it's unlikely hardware-related.

BlueHazzard:
are you using wxWidgets 3.0 ? There is a known bug in the Symbol Browser that leads to random crashes. Disable the Symbol Browser in the Settings->Editor->Code Completition->Disable symbol browser and you should be fine

arthur1966:
2.8.12

I've now disabled the Symbol Browser. Thx.

However, my opinion stands, that an editor should never lose any content just because of crashes. IMO a very basic requirement.

oBFusCATed:

--- Quote from: arthur1966 on June 09, 2017, 11:21:48 am ---So, this is the feature proposal: add a crash handler, that dumps all open files in some directory, in their current editing state.

--- End quote ---

I'd rather try to fix the bugs, instead of going this route. What happens if the editor data structures are damaged?


--- Quote from: arthur1966 on June 09, 2017, 11:21:48 am ---PS: I didn't post this to the bug tracker, because "random crash" is nothing that can be tracked or "fixed", since that's the definition of "random".
PPS: I did try to narrow down the crash occurrences - either a crash report or a way to reproduce. The crash messages usually point to something UI-related, but never the same message twice. And repeating the same edit never crashed it a second time. Also, CB is the only software with random crashes on that machine, so it's unlikely hardware-related.

--- End quote ---

You can either start codeblocks under gdb or enable core files and then inspect them when CB crashes or uploaded them somewhere.
Make sure you have a build with debug symbols - most major distros have special packages that contain them.
Also you can run under valgrind, but it will be very slow, so I doubt you'll have the patience to wait.

p.s. The symbol browser is broken in wx3.x, in wx2.8 it seems to work.
p.p.s. The only guarantee we give is through the autosave plugin. You could modify it to save the file more often. Or even to detect crashes.

arthur1966:

--- Quote from: oBFusCATed on June 09, 2017, 03:29:56 pm ---I'd rather try to fix the bugs, instead of going this route.

--- End quote ---

Does it have to be either or? Does finding current bugs prevent new bugs from being introduced?


--- Quote from: oBFusCATed on June 09, 2017, 03:29:56 pm ---What happens if the editor data structures are damaged?

--- End quote ---

That would probably make the data written during the crash unreadable. In those rare cases.

Not having the data - every time - is not preferable, IMO.

Losing data because of editor crashes reminds me of MS-DOS times :)

Navigation

[0] Message Index

[#] Next page

Go to full version