Bug 56929 - Random ActivityNotFoundException
Summary: Random ActivityNotFoundException
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 7.3 (15.2)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2017-05-29 11:22 UTC by Vladislav Kosev
Modified: 2017-08-21 20:16 UTC (History)
2 users (show)

Tags: bb
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:
RESOLVED NORESPONSE

Description Vladislav Kosev 2017-05-29 11:22:20 UTC
Hi,

Since 15.2 I began to get Unhandled .NET exceptions in Visual Studio while the application is not running. I have the following event in the Event log:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Mono.AndroidTools.ActivityNotFoundException
   at Mono.AndroidTools.Internal.AdbOutputParsing.CheckStartResult(System.String, System.String)
   at Mono.AndroidTools.AndroidDevice+<ExecuteIntentCommandAsync>d__85.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult()
   at AndroidDeviceExtensions+<StartActivityWithDebugging>d__13.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at Xamarin.VisualStudio.Android.MonoAndroidDebuggerSession+<>c__DisplayClass10_1+<<StartMonoDroid>b__3>d.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
   at Merq.AsyncManager.Run(System.Func`1<System.Threading.Tasks.Task>)
   at Xamarin.VisualStudio.Android.MonoAndroidDebuggerSession.StartMonoDroid(Mono.Debugging.Soft.SoftDebuggerRemoteArgs)
   at Xamarin.VisualStudio.Android.MonoAndroidDebuggerSession.OnRun(Mono.Debugging.Client.DebuggerStartInfo)
   at Mono.Debugging.Client.DebuggerSession+<>c__DisplayClass86_0.<Run>b__0()
   at Mono.Debugging.Client.DebuggerSession.<Dispatch>b__85_0(System.Object)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()


After this the Visual Studio crashes and is restarted. It happens on at least two solutions, so it's not solution related. I get 1-2 per day. I can't spot a reproduction scenario. It probably is after a failed build for Android.
Comment 1 Vladislav Kosev 2017-05-29 20:04:46 UTC
I test on a Xiaomi device and there I have to click install on every other build. Sometimes I get distracted and I forget. I just forgot and on the next build I got the same error.

I will write when I have more info.
Comment 2 Vladislav Kosev 2017-05-29 20:33:28 UTC
Just had it again under the same conditions.
Comment 3 Jon Douglas [MSFT] 2017-06-23 17:01:04 UTC
Thank you for taking the time to submit the bug. We are unable to reproduce this issue. Please attach a reproduction to the bug by starting with a clean Xamarin.Android project and adding just the code necessary to demonstrate the issue.

Some typical issues with ActivityNotFoundException can be that you aren't defining your activity with an [Activity] attribute and it's not making the AndroidManifest.xml as an <activity> element. Please upload a reproduction project so we can further diagnose this issue.
Comment 4 Jon Douglas [MSFT] 2017-08-21 20:16:10 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!