Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

EXC_BAD_ACCESS when deallocating RBLPopover #75

@3rdcycle

Description

@3rdcycle

Disclaimer: I'm new to this stuff and might simply be doing something wrong.

Deallocating an RBLPopover that was initialized with an RBLViewController causes the app to crash with EXC_BAD_ACCESS in custom_viewWillMoveToWindow: when accessing self.rbl_viewController. My guess is that the associated rbl_viewController already got dealloced and left a dangling pointer.

Here's how I setup the popover:

- (IBAction)showPopover:(id)sender {
    PopoverContentViewController *contentViewController = [[PopoverContentViewController alloc] initWithNibName:@"PopoverContentViewController" bundle:nil];

    self.popover = [[RBLPopover alloc] initWithContentViewController:contentViewController];
    self.popover.behavior = RBLPopoverViewControllerBehaviorTransient;
    [self.popover showRelativeToRect:self.button.bounds ofView:self.button preferredEdge:CGRectMinYEdge];
}

I can send a minimal working example if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions