I'm writing an application to make a user-customizable soundboard but while programming it I ran into a very peculiar problem. While I connected my HTC Thunderbolt to the computer via USB to run the application off Eclipse, the application would crash when I choose to "stop recording". However, the problem does not occur when the phone is disconnected. I'd really rather not have to disconnect my phone every time I want to test and debug the application. It doesn't seem to be a normally occurring problem.

By the way, the basic code I'm using at this point in my app is the basic "audio capture" script from the developer.android website but with some switching of the MediaRecorder state and some implementation of permissions. It can be found here: Audio Capture | Android Developers.

Thanks in advance.