Error on scrolling or resizing the window


My project gets the error mentioned in the subject above.
It is a EXC_BAD_ACCESS error on the call of either [path stroke] or [path fill], in the -(void)drawRect:(NSRect)dirtyRect method.
I should add that I’m using XCode 4.2 with Snow Leopard and I don’t have the ARC feature, but Product>Analyze menu didn’t get any issue (this is what I usually call to find possible memory errors).
All went well until I added the bezier path.
With the view just filled with green I can resize and scroll with no problem.
I don’t think this was supposed to be like this, just to illustrate the drawing, or was it?

Best regards,


After more than two months, I returned to this problem, and I think I sorted it out, at least for now.
In - (id)initWithFrame:(NSRect)frame I replaced the line

with path = [[NSBezierPath alloc] init]; and then set a dealloc method.
Now its working and I just hope it won’t have bad consequences ahead.