You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
will crash with libGuardMalloc turned on. I'm guessing that the problem is that addChildViewController: is directly instance variables with its knowledge of UIViewController using offsets relative to self which in this case is a mock and not the controller itself. This ends up being a weird looking crash that is a pain to diagnose, and could end up "working" but corrupting the heap in weird and wonderful ways.
The problem can be avoided by not passing in the mock object. Should we be issuing a warning where partial mocks are being used instead of the object that they are mocking (I'm thinking -[OCMPartialMockObject handleUnRecordedInvocation:])
The text was updated successfully, but these errors were encountered:
It can happen with any class that knows the internals of another. It's pretty nasty actually because it can cause very subtle memory corruption that shows up later in other tests.
will crash with
libGuardMalloc
turned on. I'm guessing that the problem is thataddChildViewController:
is directly instance variables with its knowledge ofUIViewController
using offsets relative toself
which in this case is a mock and not the controller itself. This ends up being a weird looking crash that is a pain to diagnose, and could end up "working" but corrupting the heap in weird and wonderful ways.The problem can be avoided by not passing in the mock object. Should we be issuing a warning where partial mocks are being used instead of the object that they are mocking (I'm thinking
-[OCMPartialMockObject handleUnRecordedInvocation:]
)The text was updated successfully, but these errors were encountered: