Bug 41623 - "Step Over" on an Android App deployed to a physical/virtual device crashes the app
Summary: "Step Over" on an Android App deployed to a physical/virtual device crashes t...
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger ()
Version: 6.1.0 (C7)
Hardware: PC Mac OS
: High major
Target Milestone: 7.0 (C8)
Assignee: Andi McClure
URL:
: 41696 ()
Depends on:
Blocks:
 
Reported: 2016-06-08 21:34 UTC by Manish Sinha
Modified: 2016-08-03 09:25 UTC (History)
11 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Manish Sinha 2016-06-08 21:34:27 UTC
Steps to reproduce
* Create an Android App
* Set a breakpoint on base.OnCreate(savedInstanceState);
* Deploy to device with debugger
* When breakpoint is hit, click Step Over

Expected: Debugging should continue
Actual: Device gets disconnected

Screencast: http://screencast.com/t/BiIXh4Ro
Ide.Log and XS Info: https://gist.github.com/9a46249da839070ab31924309e04997e
Comment 1 Manish Sinha 2016-06-09 16:00:07 UTC
Update:

App crashes under both Device and Emulator using both mono-4.4.0-branch/5995f74 and mono-4.5.1-branch/e8b9107
Comment 2 David Karlaš 2016-06-09 16:33:10 UTC
Problem is on runtime side, I'm not sure if it's Mono or Xamarin.Android thing, but I'm moving this to Xamarin.Android, imo someone who has setup for debugging android apps with lldb should connect and reproduce this and see what is happening, this is all I can see in LogCat:
06-09 18:21:54.527: E/mono-rt(4233): Stacktrace:
06-09 18:21:54.527: E/mono-rt(4233): Attempting native Android stacktrace:
06-09 18:21:54.529: E/mono-rt(4233):  at ???+0 [0xa37eb600]
06-09 18:21:54.530: E/mono-rt(4233): =================================================================
06-09 18:21:54.530: E/mono-rt(4233): Got a SIGSEGV while executing native code. This usually indicates
06-09 18:21:54.530: E/mono-rt(4233): a fatal error in the mono runtime or one of the native libraries 
06-09 18:21:54.530: E/mono-rt(4233): used by your application.
06-09 18:21:54.530: E/mono-rt(4233): =================================================================
06-09 18:21:54.530: A/libc(4233): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 4253 (Debugger agent)
Comment 5 Peter Collins 2016-06-10 14:20:57 UTC
*** Bug 41696 has been marked as a duplicate of this bug. ***
Comment 8 Andi McClure 2016-06-29 20:36:05 UTC
Crash stack

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 24923]
0x0000007f8168bab0 in ss_start (ss_req=0x7f6a364ce0, method=<optimized out>, sp=0x0, info=<optimized out>, 
    ctx=<optimized out>, tls=0x7f878a2800, step_to_catch=<optimized out>, frames=<optimized out>, 
    nframes=<optimized out>)
    at /Users/builder/data/lanes/1196/b0e167d8/source/mono/mono/mini/debugger-agent.c:5323
5323	/Users/builder/data/lanes/1196/b0e167d8/source/mono/mono/mini/debugger-agent.c: No such file or directory.
(gdb) bt
#0  0x0000007f8168bab0 in ss_start (ss_req=0x7f6a364ce0, method=<optimized out>, sp=0x0, info=<optimized out>, 
    ctx=<optimized out>, tls=0x7f878a2800, step_to_catch=<optimized out>, frames=<optimized out>, 
    nframes=<optimized out>)
    at /Users/builder/data/lanes/1196/b0e167d8/source/mono/mono/mini/debugger-agent.c:5323
#1  0x0000007f81688048 in ss_create (thread=<optimized out>, size=<optimized out>, depth=<optimized out>, 
    filter=<optimized out>, req=<optimized out>)
    at /Users/builder/data/lanes/1196/b0e167d8/source/mono/mono/mini/debugger-agent.c:5493
#2  event_commands (p=<optimized out>, end=<optimized out>, command=<optimized out>, buf=<optimized out>)
    at /Users/builder/data/lanes/1196/b0e167d8/source/mono/mono/mini/debugger-agent.c:7557
#3  debugger_thread (arg=<optimized out>)
    at /Users/builder/data/lanes/1196/b0e167d8/source/mono/mono/mini/debugger-agent.c:9904
#4  0x0000007f817c5ad0 in inner_start_thread (arg=<optimized out>)
    at /Users/builder/data/lanes/1196/b0e167d8/source/mono/mono/utils/mono-threads-posix.c:92
#5  0x0000007f8ab58d28 in __pthread_start(void*) () from target:/system/lib64/libc.so
#6  0x0000007f8ab10b88 in __start_thread () from target:/system/lib64/libc.so
#7  0x0000000000000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Comment 9 Andi McClure 2016-08-02 15:19:12 UTC
This was resolved by #3219 #3228 on Jun 30
Comment 11 Jatin 2016-08-03 09:25:21 UTC
I have verified this issue with the latest master build, below is the environment information for the same:

https://gist.github.com/Rajneesh360Logica/39d46caee2cdb680f3111c101f71e94c

And have observed that now "Step Over" on an Android App deployed to a physical/virtual device does not crash the app.

Below is the screencast for the same:
http://www.screencast.com/t/MxGhNGUpgXJn

Hence, marking this as verified - fixed