Rotate simulator with mouse down?

I’m trying to track down a crash in my app when the screen is rotated while the user is touching the screen. But in the simulator, when I try to rotate (crtl+left or ctrl+right) with the mouse clicked down the simulator does not rotate. How can I get the simulator to roate while holding down the mouse? Thanks!

I think you’re thinking about this the wrong way.  To investigate the bug, you should replicate it on an actual device, and look at the output in the Xcode console to see if there are any error messages.  Here’s a blog post that talks about how to read the Xcode console when you’re debugging your app: http://www.coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

  • Andrew

adb doesn’t give me anything in the log after the orient, the app just closes.

Is it really just not possible to perform that input combination in the simulator?

I doubt there’s a way to duplicate this in the simulator.  Even if there were, it might not crash the simulator.  You should definitely focus your efforts on actual devices.

Instead of what’s suggested in the debugging blog post, try looking at the log with just the command “adb logcat”.  This will print the entire log, not just those from your app.  It’ll be a lot of information, but maybe you’ll be able to spot something that helps.  At the very least, if the app is crashing, there should be a dump of information about the crash.

What’s your config.lua?  What code do you have that relates to system orientation, i.e., do you use system.orientation, do you have an event listener for orientation change or resize events?

I know there are some Android utilities that help users manage the device’s screen orientation by letting them overwrite the settings that an app wants to run in.  Do you have one of those utilities on your device?

Does the crash happen no matter where the user is touching when they rotate the device, or only if they’re touching something on your screen that has a touch listener attached to it?

  • Andrew

I think you’re thinking about this the wrong way.  To investigate the bug, you should replicate it on an actual device, and look at the output in the Xcode console to see if there are any error messages.  Here’s a blog post that talks about how to read the Xcode console when you’re debugging your app: http://www.coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

  • Andrew

adb doesn’t give me anything in the log after the orient, the app just closes.

Is it really just not possible to perform that input combination in the simulator?

I doubt there’s a way to duplicate this in the simulator.  Even if there were, it might not crash the simulator.  You should definitely focus your efforts on actual devices.

Instead of what’s suggested in the debugging blog post, try looking at the log with just the command “adb logcat”.  This will print the entire log, not just those from your app.  It’ll be a lot of information, but maybe you’ll be able to spot something that helps.  At the very least, if the app is crashing, there should be a dump of information about the crash.

What’s your config.lua?  What code do you have that relates to system orientation, i.e., do you use system.orientation, do you have an event listener for orientation change or resize events?

I know there are some Android utilities that help users manage the device’s screen orientation by letting them overwrite the settings that an app wants to run in.  Do you have one of those utilities on your device?

Does the crash happen no matter where the user is touching when they rotate the device, or only if they’re touching something on your screen that has a touch listener attached to it?

  • Andrew