Bug 59312 - Launching photo intent many times causes camera to display black screen
Summary: Launching photo intent many times causes camera to display black screen
Status: NEEDINFO
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 7.4 (15.3)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL: https://github.com/Gishe/CameraCrash
Depends on:
Blocks:
 
Reported: 2017-09-07 20:59 UTC by Sean Irving
Modified: 2017-10-04 17:12 UTC (History)
2 users (show)

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


Attachments
Log files from the first time the camera loads black screen. (40.63 KB, text/plain)
2017-09-07 20:59 UTC, Sean Irving
Details

Description Sean Irving 2017-09-07 20:59:41 UTC
Created attachment 24633 [details]
Log files from the first time the camera loads black screen.

This appears to be only a problem on android Oreo (preview 4 is what we are running)

Expected:
User can launch the photo intent any number of times.

Actual:
Launching the photo intent 40-100 times will cause the camera intent to display just a black screen.  Attempting to initialize the camera in the stand alone app or other applications afterwards will result in the same black screen until the device is reset.
Comment 1 Jon Douglas [MSFT] 2017-09-08 20:04:57 UTC
Hey Sean,

Thanks for the logs and sample project, to get a little bit more information on this issue, can you provide the following?

1. Full Version Information (VS Windows - About -> Visual Studio | VS Mac - Visual Studio for Mac -> About)

2. Can you ensure you're on a release version of Oreo? This was released 8/21/2017 for most devices. You can opt into the beta program to get a release version of Oreo before your carrier sends an update.

3. Your sample does not compile after directly downloading, it is missing drawables and other items. If you can please fix this, I can look into this further.

My first impressions on this issue is that it might be an actual bug with Oreo and might be able to be reproduced in Java/Kotlin as well. I don't believe we do anything special and these bindings should be pretty straight forward. At the point you're noticing a screen going black, I would assume this is a OS issue rather than Xamarin issue. However I will need a working sample project first to investigate further.

Setting this to NEEDINFO until the project is tidied up. Thanks again for the report.
Comment 2 Sean Irving 2017-09-08 20:27:38 UTC
Sorry about the sample project it should be updated to build now.

Below is the visual studio data you requested, I'm using a flashed version of bullhead from 06-23-17 on a Nexus 5x.

Microsoft Visual Studio Professional 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.7.02046

Installed Version: Professional

Visual Basic 2015   00322-50350-19114-AA005
Microsoft Visual Basic 2015

Visual C# 2015   00322-50350-19114-AA005
Microsoft Visual C# 2015

Visual C++ 2015   00322-50350-19114-AA005
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - ENU   00322-50350-19114-AA005
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   7.18.00214.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1 (Beta8)   14.1.11107.0
ASP.NET and Web Tools 2015.1 (Beta8)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

AWS Toolkit for Visual Studio 2015   1.11.6.3
AWS Toolkit for Visual Studio 2015.
Copyright 2011-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.

This software includes third party software subject to the following copyrights:
- Logging from log4net, Apache License 
  [http://logging.apache.org/log4net/license.html]
- Putty for PPK to PEM conversion, MIT license 
  [http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html]
- NGit for AWS Elastic Beanstalk incremental push
  [https://github.com/mono/ngit/blob/master/NGit.license.txt]
- NSch dependency for NGit
  [https://github.com/mono/ngit/blob/master/NSch.license.txt]
- Sharpen dependency for NGit
  [https://github.com/mono/ngit/blob/master/Sharpen/AssemblyInfo.cs]
- ICSharpCode.SharpZipLib dependency for NGit
  [http://www.icsharpcode.net/opensource/sharpziplib/]
- Mono.Posix.dll and Mono.Security.dll dependencies for NGit
  [http://mono-project.com/FAQ:_Licensing#Licensing]
- MPFProj for Visual Studio Project Framework
  [http://mpfproj10.codeplex.com/license]
- JSON Checker for JSON validation
  [http://www.raboof.com/projects/jsonchecker/]

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

DevExpress.DeploymentTool   1.0
A useful tool for deploying DevExpress assemblies.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JetBrains ReSharper Ultimate 2017.1.3    Build 108.0.20170613.154143
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2017 JetBrains, Inc.

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Mono Debugging for Visual Studio   4.6.8-pre (ec7034f)
Support for debugging Mono processes with Visual Studio.

Node.js Tools   1.2.40726.00
Adds support for developing and debugging Node.js apps in Visual Studio

Node.js Tools - Profiling   1.2.40726.00
Profiling support for Node.js projects.

NuGet Package Manager   3.4.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.60519.0
Microsoft SQL Server Data Tools

TypeScript   1.8.36.0
TypeScript tools for Visual Studio

Xamarin   4.6.0.299 (b63523e27)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.4.0.21 (2851083)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.12.0.20 (80b8487)
Visual Studio extension to enable development for Xamarin.iOS.

XtraReports package   1.0
XtraReports package
Comment 3 Jon Douglas [MSFT] 2017-09-08 20:39:05 UTC
Hi Sean,

Thanks for getting that done so quickly. Can you please update your device with a newer image such as:

8.0.0 (OPR6.170623.013, Aug 2017)

https://dl.google.com/dl/android/aosp/bullhead-opr6.170623.013-factory-203642e1.zip

Or simply opt into the beta program and install the Android Oreo release that way.

Can you then please test out and see if this behavior is still occurring? If so, then I will take a further look into this on the Java/Kotlin side and see if this is an OS issue or Xamarin issue.

You might ask "Why do I have to upgrade?" The reason being is that preview images are often very buggy and a final release version should indicate if the bug was fixed or not. 

Thanks in advance! Once you've done that, I will start my investigation.
Comment 4 Sean Irving 2017-09-08 20:43:02 UTC
Sorry for the confusion that is the android image I flashed I was assuming the numbers in the file were the build date.
Comment 5 Jon Douglas [MSFT] 2017-10-04 17:12:47 UTC
(In reply to Sean Irving from comment #4)
> Sorry for the confusion that is the android image I flashed I was assuming
> the numbers in the file were the build date.

Hi Sean, 

No worries. I am still unable to reproduce this issue on released to wild versions of Android Oreo on a Pixel and Android Oreo emulators. Is this still an issue? Have you perhaps tried a simple Java (Android) application based on your reproduction to see if it's just a hardware issue?

Note You need to log in before you can comment on or make changes to this bug.