Bug 43174 - Android 5.x no exception is raised when internet access is disabled during System.IO.Stream.Read
Summary: Android 5.x no exception is raised when internet access is disabled during Sy...
Status: CONFIRMED
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 6.0.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2016-08-08 17:18 UTC by John Miller [MSFT]
Modified: 2017-07-06 09:15 UTC (History)
3 users (show)

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


Attachments

Description John Miller [MSFT] 2016-08-08 17:18:45 UTC
**Overview:**

   No exception is raised when internet is disconnected during a Read operation on Android 5.x. Android 6.x does raise an exception. 
   
**Steps to Reproduce:**

   1. Run the attached private sample on an Android 5.0.1 emulator or device
   2. Press the button and watch the Application Output
   3. When "OnConnect Bytes Read" is being output, disconnect internet. (On a device, just toggle airplane mode before it's done reading. On an emulator, remove ethernet and/or disable your computers wifi

**Actual Results:**

   Read stops, but there is not connection exception or notification that there was an error. 
   
**Expected Results:**

   Read() should throw an exception, similar to how it's working when running on Android 6.x (see attached stack trace from a test run on an android 6.1 device)

**Build Date & Platform:**

   === Xamarin Studio Enterprise ===

Version 6.0.2 (build 73)
Installation UUID: e01c3049-a2d2-4e0a-aad8-afe6fb627c4d
Runtime:
	Mono 4.4.2 (mono-4.4.0-branch-c7sr1/f72fe45) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 404020011

=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 7.3 (10183.3)
Build 7D175

=== Xamarin.Mac ===

Version: 2.8.2.22 (Xamarin Enterprise)

=== Xamarin.Android ===

Version: 6.1.2.21 (Xamarin Enterprise)
Android SDK: /Users/johnmiller/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)

SDK Tools Version: 25.1.7
SDK Platform Tools Version: 24.0.0
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.iOS ===

Version: 9.8.2.22 (Xamarin Enterprise)
Hash: f37444a
Branch: cycle7-sr1
Build date: 2016-07-28 12:17:02-0400

=== Xamarin Inspector ===

Version: 0.9.0.14
Hash: 4d868da
Branch: master
Build date: Mon Jun 13 19:14:13 UTC 2016

=== Build Information ===

Release ID: 600020073
Git revision: a6f7a24a9723a2d4f5d33c176615b0d44703ab5b
Build date: 2016-07-26 13:36:15-04
Xamarin addins: f5acb37866a0141bc5ddbe95118f18dae4014568
Build lane: monodevelop-lion-cycle7-sr1

=== Operating System ===

Mac OS X 10.11.2

=== Enabled user installed addins ===

Prism Template Pack 1.3
Xamarin Inspector 0.9.0.14
XamlStyler 1.0.1

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