title: Framework using library crash
body: <p>I have 2 frameworks created by me that use (both of them) a library also created by me.</p>
  
  <p>The first framework initialize the library and makes all its workflow. After finishing the first framework, the second one must start.
  But when the second one is going to start, after initializing the library, the app using both frameworks crashes with a <code>exc_bad_access</code> error. </p>
  
  <p>Apparently the library is created correctly, but if i comment the line of code to initialize the library in the second framework, the workflow continues (it crashes later because it has no library initialization).</p>
  
  <p>Is there anything I'm doing wrong? Should I use two separate libraries instead?</p>
  
  <hr>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Imagine the situation:</p>
  
  <p>Framework A has this methods: <code>start</code>, <code>stop</code>. And while it works it delegate to the methods: <code>infoFromA</code>,<code>frameworkAFinished</code>.</p>
  
  <p>Framework B has this methods: <code>start</code>, <code>stop</code>. And while it works it delegate to the methods: <code>infoFromB</code>,<code>frameworkBFinished</code>.</p>
  
  <p>Both start methods initialize the static library mentioned (lets call it <code>problematicLibrary</code>).</p>
  
  <p>Both frameworks present some views to make its functionality. So lets make an example of the app workflow.</p>
  
  <p>At the app view <code>viewWillAppear</code> method, I start the Framework A just using:</p>
  
  <p><code>[FrameworkA start];</code> , this will initialize the library and present a view. With this view (using my <code>problematicLibrary</code>) some info will be delegated to the <code>infoFromA</code> delegated method. And after all the info is delegated, it will delegate to <code>frameworkAFinished</code>.</p>
  
  <p>When the FrameworkA has delegated to the <code>frameworkAFinished</code> I start the next Framework: <code>[FrameworkB start]</code>. As the other Framework, it will initialize the library and present a view. While debugging, all the initialization of the library is done (create the instances of the needed objects and a new instance of the library is created) and while its presenting the view it goes through the <code>viewDidLoad</code> method and then it throws an <code>exc_bad_access</code> error at the <code>problematicLibrary</code> initialization line (which has been done before and continued to present the view!!)  without going into any other method from the view.</p>
  
  <p>I have checked if the initialization is doing well, and all the variables were at <code>null</code> value before the initialization, and a new memory address is given to the library object.</p>