I'm using ruby motion. Below are the details of my environment.
$ motion --version
2.9
$ bundle
Using bubble-wrap (1.4.0)
Using motion-require (0.0.7)
Using formotion (1.6)
Using motion-layout (0.0.1)
Using thor (0.18.1)
Using rubymotion_generators (0.1.0)
Using bundler (1.3.5)
When I run my app and click a button that is suppose to load a form built with formation, my app abruptly crashes with this error message.
* Simulator session ended with error: Error Domain=DTiPhoneSimulatorErrorDomain Code=1 "The simulated application quit." UserInfo=0x10011e200 {NSLocalizedDescription=The simulated application quit., DTiPhoneSimulatorUnderlyingErrorCodeKey=-1}
Running with rake debug=1 I see the following:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xc7243c89
0x0081309f in objc_msgSend ()
(gdb)
My app was working perfectly fine before upgrading rubymotion and once I updated rubymotion I had to update some of my gems as well.
How can I resolve this or troubleshoot this?
This is almost always when you're trying to access an object that has been deallocated. Try changing your variable to an instance variable (
@myvar) or a global ($myvar) and see if that fixes the issue. Obviously, you don't want to use a global in production, but give it a shot.