[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#354029: kmail: Crash on 'New Message' -- "KMail got signal 11 (Crashing)"



On Sat, 3 Jun 2006 22:06:23 -0500
Adam Porter <adam@alphapapa.net> wrote:

> > So I did some trial and error by gradually deleting stuff from the
> > bad config file, then moving stuff over from the good one.  This
> > eventually fixed the problem.  But I haven't yet been so thorough
> > as to figure out exactly which line or lines triggered the bug.
> 
> It seems to me that what we really need is to know what lines caused
> the crash.  Without that, what can be done?

Well, I hope to get around to looking into it.  The trial-and-error of
it is too much work, so I have this idea for a no-brains util that
would help with such things, based on the correct 'hilo' (i.e. the
number guessing game) strategy.

	HiLo is not particularly exciting to play because there is a simple
	optimal strategy that narrows the range of possible numbers in half
	each time by choosing the midpoint of the range. For example, for the
	range [1..1000], the midpoint guess is 500. If 500 is too high, the
	next range is [1..499] and next guess is 250; if 500 is too low, the
	next range is [501..1000] and next guess is 750. With this strategy, it
	is possible to guess any number between 1 and 1000 in ten or fewer
	guesses because 1000 can successively be divided by 2 only ten times
	before a 1 is reached. (In other words, the base 2 logarithm of 1000 is
	about 10). This divide-in-half strategy, known as binary search, is
	extremely important in computer applications for efficiently searching
	large information spaces.
	http://community.middlebury.edu/~schar/courses/cs101-f04/hw/hw5/

That is we have two configs, A (good), and B (bad).  So we combine the
first half of A with the last half of B.  Test program again.

If it doesn't fail, combine the second half of A with the first half of
B. Assuming that fails, (it should), we know the line is in the first
half of B.  So we repeat the process the first quarter of A and the
second quarter of B.  Etc. etc.

For a config with X lines, it should require at most 'log X (base 2)'
tests.

More later, knock on wood...




Reply to: