monotouch VMDisconnectedException when debugging on my iPhone 3GS
I'm developping an application with the latest version of monotouch , it works fine on debug mode with the iPhone simulator , it runs fine on release mode on the actual device ( iPhone 3GS ) but , when I try to run it in debug mode on the iPhone , i get the following error :
Loaded assembly: /private/var/mobile/Applications/4E065319-A04A-4BE7-8ABD-D3FA65B57A5B/MyApp.app/Mono.Security.dll [External]
Loaded assembly: /private/var/mobile/Applications/4E065319-A04A-4BE7-8ABD-D3FA65B57A5B/MyApp.app/System.dll [External]
Loaded assembly: /private/var/mobile/Applications/4E065319-A04A-4BE7-8ABD-D3FA65B57A5B/MyApp.app/monotouch.dll [External]
Loaded assembly: /private/var/mobile/Applications/4E065319-A04A-4BE7-8ABD-D3FA65B57A5B/MyApp.app/System.Xml.dll [External]
Loaded assembly: /private/var/mobile/Applications/4E065319-A04A-4BE7-8ABD-D3FA65B57A5B/MyApp.app/System.Web.Services.dll [External]
Loaded assembly: /private/var/mobile/Applications/4E065319-A04A-4BE7-8ABD-D3FA65B57A5B/MyApp.app/MyApp.exe
Mono.Debugger.Soft.VMDisconnectedException: Exception of type 'Mono.Debugger.Soft.VMDisconnectedException' was thrown.
at Mono.Debugger.Soft.Connection.SendReceive (CommandSet command_set, Int32 command, Mono.Debugger.Soft.PacketWriter packet) [0x00000] in <filename unknown>:0
at Mono.Debugger.Soft.Connection.Type_GetSourceFiles (Int64 id, Boolean return_full_paths) [0x00000] in <filename unknown>:0
at Mono.Debugger.Soft.TypeMirror.GetSourceFiles (Boolean return_full_paths) [0x00000] in <filename unknown>:0
at Mono.Debugger.Soft.TypeMirror.GetSourceFiles () [0x00000] in <filename unknown>:0
at Mono.Debugging.Soft.SoftDebuggerSession.ResolveBreakpoints (Mono.Debugger.Soft.TypeMirror t) [0x00000] in <filename unknown>:0
at Mono.Debugging.Soft.SoftDebuggerSession.HandleEvent (Mono.Debugger.Soft.Event e, Boolean dequeuing) [0x00000] in <filename unknown>:0
at Mono.Debugging.Soft.SoftDebuggerSession.HandleEvent (Mono.Debugger.Soft.Event e) [0x00000] in <filename unknown>:0
at Mono.Debugging.Soft.开发者_JS百科SoftDebuggerSession.EventHandler () [0x00000] in <filename unknown>:0
and the app crashes... Does anyone know what this is about ? I'm quite new with monotouch developpement and I can't figure out what's wrong ...
Ok so , I'm leaving this answer for anyone encountering the same problem:
The error shown in my first post isn't specific at all , it just indicates that the app crashed. To get the real error , you need to check your crash log.
To get the iDevice crash log , first connect your iDevice to itunes , synchronize it. Then , go to /users/yourUser/Libraries/Logs/CrashReporter/MobileDevice/YourDevice/
In this folder you can see crash logs for every crashes on your iDevice , open the right one ( YourApp_crashdate.log ) and you will see the real reason for the crash.
In my case , it was "Application failed to launch in time" and I figured out it was because I was trying to debug over 3G , this caused the application to take too much time to load, therefore, IOS closed the app.
Hope this will help someone,
C. Hamel
精彩评论