facebookarchive / FBMemoryProfiler

iOS tool that helps with profiling iOS Memory usage.
Other
3.41k stars 377 forks source link

FBMemoryProfiler crash with __NSCFCalendar,_screenPageMap. #15

Open c-xiaoqiang opened 8 years ago

c-xiaoqiang commented 8 years ago

I have test the FBMemoryProfiler in my project and cause some crash:

  1. FBObjectiveCObject ->subobject->0xffffffffffffffff & namePath = @"_screenPageMap":

fbtest1

when I filter it the crash fixed. if ([self.namePath[0] isEqualToString:@"_screenPageMap"]) { NSLog(@""); return retainedObjects; }

  1. FBAllocationTrackerManager:- (NSArray *)instancesForClass:(__unsafe_unretained Class)aCls inGeneration:(NSInteger)generation fbtest2 fbtest3

in FBAllocationTrackerImpl std::vector<id> instancesOfClassForGeneration I filter it with code: if ([NSStringFromClass(aCls) isEqualToString:@"__NSCFCalendar"]) { return std::vector<id> {}; }

then my project run complete with retain cycles button tap.

Gricha commented 8 years ago

Quite interesting. I will look more closely into that. While your workaround is fine, I'll try to find a root cause of that. If we're unable to avoid that, we can just filter it out.

Thanks for reporting!