Skip to content

iOS app crashes on launch in xcode #14419

Description

@oliveriobw

Description

Crash when app is loading in Xcode.
Reproducible maybe 50% of the time

Reproduction Steps and Sample Code

Steps

  • Create iOS project
  • Define a controller, loaded at launch, with no buttons
  • Launch the app

Result

Crash at this point:

image

Solution

-(void)setButtons:(NSArray*)buttons viewController:(UIViewController*)viewController side:(NSString*)side animated:(BOOL)animated
{
  NSMutableArray *barButtonItems = [NSMutableArray new];
  
  if([buttons isKindOfClass:[NSNull class]])
    return;  //added

Additional Information

Sorry cannot give more detail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions