VS 2010 with Mono for Android crashes on debugging

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

VS 2010 with Mono for Android crashes on debugging

martze
Hi,

this morning VS 2010 notified me of an update for mono for android, and i installed it. Since then VS keeps crashing. More precisely:
- When i debug on device, VS crashes as soon as an IndexOutOfRangeException is thrown. I tested the following snippet on 3 devices (Samsung Galaxy SII i9100g, Samsung Galaxy S, HTC Desire S). When I test on an emulator, the debugger silently closes the connection, and the app crashes.

Snippet:

using System;
using Android.App;
using Android.OS;

namespace Testprojekt
{
[Activity(Label = "Testprojekt", MainLauncher = true)]
public class TestActivity : Activity
{
protected override void OnCreate(Bundle bundle)
{
throw (new IndexOutOfRangeException());
}
}
}

I'm using:

MS Win 7 Enterprise
6.1.7601  SP1 build 7601
MS Visual Studio 2010 Premium:
10.0.40219.1 SP1Rel
MS .NET Framework
4.0.30319 SP1Rel
Mono for Android 4.0.6

Devices:

Samsung Galaxy SII i9100g (Android 2.3.6)
Samsung Galaxy S  (Android 2.3.3)
HTC Desire S (didn't check version, borrowed)

Can anyone reproduce or (better) tell me a solution for that problem?

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: VS 2010 with Mono for Android crashes on debugging

Daved
I have pretty much the same setup as you. I did not experience any crashes when I tried your code. Is it possible that you can zip the project up and post it here.

Dave
Reply | Threaded
Open this post in threaded view
|

Re: VS 2010 with Mono for Android crashes on debugging

Jonathan Pobst
In reply to this post by martze
I cannot reproduce this.  When I try the same, the debugger pauses at
the exception, highlights it green, and shows an Unhandled Exception
dialog telling about the exception. (Win 7 64 bit, Nexus One)

Does your snippet reproduce the bug for you, or is it more complicated
like maybe the exception is being thrown from a background thread or
something?

Jonathan


On 4/5/2012 7:20 AM, martze wrote:

> Hi,
>
> this morning VS 2010 notified me of an update for mono for android, and i
> installed it. Since then VS keeps crashing. More precisely:
> - When i debug on device, VS crashes as soon as an IndexOutOfRangeException
> is thrown. I tested the following snippet on 3 devices (Samsung Galaxy SII
> i9100g, Samsung Galaxy S, HTC Desire S). When I test on an emulator, the
> debugger silently closes the connection, and the app crashes.
>
> Snippet:
>
> using System;
> using Android.App;
> using Android.OS;
>
> namespace Testprojekt
> {
> [Activity(Label = "Testprojekt", MainLauncher = true)]
> public class TestActivity : Activity
> {
> protected override void OnCreate(Bundle bundle)
> {
> throw (new IndexOutOfRangeException());
> }
> }
> }
>
> I'm using:
>
> MS Win 7 Enterprise
> 6.1.7601  SP1 build 7601
> MS Visual Studio 2010 Premium:
> 10.0.40219.1 SP1Rel
> MS .NET Framework
> 4.0.30319 SP1Rel
> Mono for Android 4.0.6
>
> Devices:
>
> Samsung Galaxy SII i9100g (Android 2.3.6)
> Samsung Galaxy S  (Android 2.3.3)
> HTC Desire S (didn't check version, borrowed)
>
> Can anyone reproduce or (better) tell me a solution for that problem?
>
> Thank you
>
> --
> View this message in context: http://mono-for-android.1047100.n5.nabble.com/VS-2010-with-Mono-for-Android-crashes-on-debugging-tp5620230p5620230.html
> Sent from the Mono for Android mailing list archive at Nabble.com.
> _______________________________________________
> Monodroid mailing list
> [hidden email]
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>

_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
Reply | Threaded
Open this post in threaded view
|

Re: VS 2010 with Mono for Android crashes on debugging

martze
Exactly this code in a fresh project causes the Crash.
It also crashes when I slowly step in debug mode to the position the exception is thrown.
The Crash occurs in exactly that moment when the dialog appears for other exceptions where this doesnt happen.