BoltsFramework / Bolts-ObjC

Bolts is a collection of low-level libraries designed to make developing mobile apps easier.
Other
5.65k stars 578 forks source link

EXC_BAD_ACCESS in BfTask.m #322

Open greensmartdev opened 6 years ago

greensmartdev commented 6 years ago

This error occurs while running a project incorporating the Bolts framework compiled with bitcode on Xcode 9.4.1. The project is being run on device and the launch screen of the app even comes up, and then it crashes with the error in the title.

This is the relevant code snippet

BOOL completed; @synchronized(self.lock) { completed = self.completed; if (!completed) { [self.callbacks addObject:[^{ [executor execute:executionBlock]; } copy]]; } } if (completed) { [executor execute:executionBlock]; }

the exception is being thrown by the line:

[executor execute:executionBlock];

The stack trace is:

MyProject was compiled with optimization - stepping may behave oddly; variables may not be available.