You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This one gets me from time to time, as the process of routing a URL ends up adding a route elsewhere, and the outcome is always "fun".
routeURL:withParameters:executeRouteBlock: uses fast enumeration of self.routes to match for a valid route handler.
However, while this enumeration is happening, register or remove methods may be called which will modify the mutable array of self.routes.
I suggest that in routeURL:withParameters:executeRouteBlock: you first copy self.routes to an immutable NSArray and use that to enumerate the routes contained.
You'd be protected against the dreaded Collection <__NSArrayM: 0x17405dc70> was mutated while being enumerated. error.
Thank you. Keep up the good work,
Brian M. Criscuolo
warmwinds software
The text was updated successfully, but these errors were encountered:
There are other places where self.routes is enumerated in the code; any place this is happening is ripe for having a local copy of the array to be used for the enumeration.
This one gets me from time to time, as the process of routing a URL ends up adding a route elsewhere, and the outcome is always "fun".
routeURL:withParameters:executeRouteBlock:
uses fast enumeration ofself.routes
to match for a valid route handler.However, while this enumeration is happening,
register
orremove
methods may be called which will modify the mutable array of self.routes.I suggest that in
routeURL:withParameters:executeRouteBlock:
you first copy self.routes to an immutable NSArray and use that to enumerate the routes contained.You'd be protected against the dreaded
Collection <__NSArrayM: 0x17405dc70> was mutated while being enumerated.
error.Thank you. Keep up the good work,
Brian M. Criscuolo
warmwinds software
The text was updated successfully, but these errors were encountered: