[Rt-devel] Re: RT::Attribute::Name Unimplemented in RT::Attributes error

Stephen Turner sturner at MIT.EDU
Mon Dec 19 16:19:55 EST 2005


At Monday 12/19/2005 02:05 PM, Jesse Vincent wrote:

> > [This seems more of a dev issue so I've moved it to the devel list]
>
>I'm starting to think that we need a black-magic list.
>
>
> > As I mentioned earlier, the upgrade to SB 1.36 didn't solve this, in
> > fact I've been seeing it more frequently since the upgrade. I've done
> > some more investigation and I seem to have hit upon something that gets
> > rid of the error, although I've no idea why it works.
> >
> > I was thinking the problem must lie in Attributes_Overlay.pm - this is
> > the only module in lib/RT that builds a cache from its objects after
> > doing a search and this part of the code is what triggers the error.
> >
> > On a (misguided) hunch, I decided to rename the cache from
> > $self->{'attr'} to $self->{'attrx'} and lo and behold the error stopped
> > happening. I changed it back and the error started again.
> >
> > I've no idea why this might stop the error, except to speculate that
> > $self->{'attr'} is used somewhere else in the collection class and the
> > use of it in _BuildAccessTable is causing a name collision?
>
>That seemed to make a lot of sense. but a deep grepping doesn't turn
>anything up. Just for kicks, can you try entirely removing this line
>from SB::Record->__Value:
>
>   $field = $self->_Accessible($field, "column") if 
> $self->_Accessible($field, "column");
>
>And see if you're still getting the error? Is there a way to reproduce
>it 100% of the time? Ideally something I could add to the test suite.
>
>This not being fixed is a big enough thing to delay 3.4.5, which I'd
>been planning on putting out todayish. Urg.
>
>--

Sorry - I spoke too soon. Changing {'attr'} to {'attrx'} does not fix the 
problem - eventually it started happening again.

Unfortunately I'm finding it's not possible to reliably reproduce the 
problem. I only get it with web clients - never get it in a perl scrip I 
have that calls $UserObj->Attributes->Named.

At one point I had two browsers open and the error was appearing in one but 
not the other. Later I was just refreshing the RT home page in a single 
browser over & over, and I was alternating between error & no error.

I did try removing that line from SB::Record and I have not been able to 
get the error with that line removed - it only starts appearing again if I 
put the line back in.

One thing I did do is to put some logging in Attributes_Overlay -> 
_BuildAccessTable just before
    push @{$self->{'attr'}->{$attr->Name}}, $attr;
(the error occurs somewhere in $attr->Name). Here's what I saw:

- ref ($attr) always shows RT::Attribute whether or not the error occurs
- $attr->ReadableAttributes is an empty array whenever the array occurs; it 
has a list of the RT::Attribute attributes when there's no error.
- Data:Dumper on $attr shows identical results whether or not the error occurs.

I'm wondering if it would be a workaround to change Attributes->Named to 
simply limit the query by Name ?

Steve






More information about the Rt-devel mailing list