Skip to content
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.

Crash EXC_BAD_ACCESS #20

Open
leverdeterre opened this issue Apr 29, 2016 · 4 comments
Open

Crash EXC_BAD_ACCESS #20

leverdeterre opened this issue Apr 29, 2016 · 4 comments

Comments

@leverdeterre
Copy link

I have activated FBMemoryProfiler in my project and it cause quickly a crash.
I suppose it's an access to my NSPersistentStoreCoordinator...

#import <UIKit/UIKit.h>
#import "MyAppDelegate.h"
#import <FBAllocationTracker/FBAllocationTrackerManager.h>
#import <FBMemoryProfiler/FBMemoryProfiler.h>

int main(int argc, char *argv[])
{
    int retVal = 0;
    @autoreleasepool {
        [[FBAllocationTrackerManager sharedManager] startTrackingAllocations];
        [[FBAllocationTrackerManager sharedManager] enableGenerations];
        FBMemoryProfiler *memoryProfiler = [FBMemoryProfiler new];
        [memoryProfiler enable];
        retVal = UIApplicationMain(argc, argv, nil, NSStringFromClass([MyAppDelegate class]));
    }
    return retVal;
}

capture d ecran 2016-04-29 a 17 00 35

@Gricha
Copy link

Gricha commented Apr 29, 2016

Interesting! Thank you for reporting, I will look more closely into that. We probably want to perform class check over there in a different manner (use object_getClass from runtime instead and bail out if it's nil)

Thanks!

@chengxiaoyu00
Copy link

dyld: Library not loaded: @rpath/FBAllocationTracker.framework/FBAllocationTracker
Referenced from: /private/var/mobile/Containers/Bundle/Application/1180E0E0-80DC-47A8-AB1C-B138C3E9A8CB/VideoConference.app/VideoConference
Reason: image not found

@Gricha
Copy link

Gricha commented May 29, 2016

@chengxiaoyu00 This can happen when you embed frameworks, but do not supply either actual frameworks or search paths to Xcode projects. You can add Copy Files step to you Xcode Build phases, providing proper path to your frameworks.

screen shot 2016-05-29 at 7 36 03 pm

@chengxiaoyu00
Copy link

@Gricha Thank you for your answer !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants