[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] How to debug "org-clock-display: Args out of range: [48230 48230
From: |
Nick Dokos |
Subject: |
Re: [O] How to debug "org-clock-display: Args out of range: [48230 48230 48230 38618 38618 0 0 0 0 0 ...], 61" |
Date: |
Thu, 12 Jan 2012 17:56:22 -0500 |
Nick Dokos <address@hidden> wrote:
> Gregor Zattler <address@hidden> wrote:
>
>
> > Debugger entered--Lisp error: (args-out-of-range [49569 49569 49569 39957 3=
> > 9957 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] 61)
> > aref([49569 49569 49569 39957 39957 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0=
> > 0 0 0 0 0 0] 61)
>
> This tries to get the 61st element of a vector that has at most 30 or so
> elements, hence the complaint. But of course, that's hardly
> enlightening. However, the backtrace shows that this code is inside the
> function org-clock-sum (in org-clock.el). And if you look at that
> function, you see (where I have elided large swathes of code):
>
> (let* (...
> (lmax 30)
> (ltimes (make-vector lmax 0))
> ...
>
> So ltimes is a vector with *exactly* 30 elements. I would change that 30
> to 100 or so (something greater than 61 in any case) and retest. If that
> fixes it, then we know the culprit and then we can dedice which is the
> unreasonable one: the code or your subtree :-)
>
Or maybe that 61 is way off base. After all, there are only 5 non-trivial
entries in the vector.
The code that sets the level seems suspect to me:
(let* ((headline-forced
(get-text-property (point)
:org-clock-force-headline-inclusion))
(headline-included
(or (null headline-filter)
(save-excursion
(save-match-data (funcall headline-filter))))))
(setq level (- (match-end 1) (match-beginning 1)))
What do match-beginning/match-end return if headline-filter is nil?
The save-match-data is not done, so we get the results of whatever
random search was done last before this code executed.
Nick
- [O] How to debug "org-clock-display: Args out of range: [48230 48230 48230 38618 38618 0 0 0 0 0 ...], 61", Gregor Zattler, 2012/01/05
- Re: [O] How to debug "org-clock-display: Args out of range: [48230 48230 48230 38618 38618 0 0 0 0 0 ...], 61", Bernt Hansen, 2012/01/05
- Re: [O] How to debug "org-clock-display: Args out of range: [48230 48230 48230 38618 38618 0 0 0 0 0 ...], 61", Gregor Zattler, 2012/01/12
- Re: [O] How to debug "org-clock-display: Args out of range: [48230 48230 48230 38618 38618 0 0 0 0 0 ...], 61", Nick Dokos, 2012/01/12
- Re: [O] How to debug "org-clock-display: Args out of range: [48230 48230 48230 38618 38618 0 0 0 0 0 ...], 61",
Nick Dokos <=
- [O] [BUG] org-clock-sum cannot handle headings with more than 29 stars (was: Re: How to debug "org-clock-display: Args out of range: [48230 48230) 48230 38618 38618 0 0 0 0 0 ...], 61", Gregor Zattler, 2012/01/14
- Re: [O] [BUG] org-clock-sum cannot handle headings with more than 29 stars (was: Re: How to debug "org-clock-display: Args out of range: [48230 48230) 48230 38618 38618 0 0 0 0 0 ...], 61", Nick Dokos, 2012/01/14
- [O] [BUG][PATCH] document number of stars limitation with respect to org-clock-sum (was: Re: org-clock-sum cannot handle headings with more than 29 stars), Gregor Zattler, 2012/01/22
- [O] [PATCH 2/3] Document max number of stars in headings in manual, Gregor Zattler, 2012/01/22
- [O] [Accepted] [O, 2/3] Document max number of stars in headings in manual, Bastien Guerry, 2012/01/24
- [O] [PATCH 1/3] Document max number of stars in headings in docstring of org-inlinetask-minlevel, Gregor Zattler, 2012/01/22
- [O] [Accepted] [O, 1/3] Document max number of stars in headings in docstring of org-inlinetask-minlevel, Bastien Guerry, 2012/01/24
- [O] [PATCH 3/3] Document max number of stars in clocking section, Gregor Zattler, 2012/01/22
- [O] [Accepted] [O, 3/3] Document max number of stars in clocking section, Bastien Guerry, 2012/01/24
- Re: [O] [BUG][PATCH] document number of stars limitation with respect to org-clock-sum, Bastien, 2012/01/24