[LRUG] To debug the impossible bug
Matthew Rudy Jacobs
matthewrudyjacobs at gmail.com
Wed Aug 3 06:07:49 PDT 2011
As an extra debug step
I would turn off all backtrace silencers
(look for the initializer)
and check through the exact backtrace.
Of course,
if you can't replicate it in a test case,
that may not be possible.
On 3 August 2011 13:59, Simon Coffey <simon at tribesports.com> wrote:
> Hi Murray,
>
> On 3 August 2011 13:44, Murray Steele <murray.steele at gmail.com> wrote:
> > Ah, well, probably not then :) Although once ActiveRecord has got it's
> > grubby mitts on things who knows what might happen given that what you
> are
> > delegating to might be an association object which is never really nil
> > (proxy objects woo!) until you least expect it.
>
> For the record, background is an AR attribute on the Question model,
> no delegation involved.
>
> > Speaking of AR, is it possible that @question is a scope call that hasn't
> > resolved yet? e.g. it's not nil, because it's a scope proxy object, but
> > when you try to call a method on it, it resolves the scope to fetch the
> > object, which then turns out to be nil? (I am clutching at straws here I
> > think).
>
> It's a great suggestion, but unfortunately, wherever @question is set,
> it's set with a regular model instance, no scope funkiness going on.
> Also, on the page where we saw this particular example of the bug,
> @question should never have been set at all - the request was handled
> by a controller that has nothing whatsoever to do with questions.
>
> Cheers,
> Simon
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20110803/a54409c7/attachment-0003.html>
More information about the Chat
mailing list