xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.45k stars 511 forks source link

IOS debug application with Tabs is crashed after sleep #4331

Open oleksiizapara opened 6 years ago

oleksiizapara commented 6 years ago

Steps to Reproduce

  1. run in debug mode IOS application with tabs
  2. Enter sleep mode on iPhone
  3. Wakeup device
  4. Change tab several times

Expected Behavior

Continue working

Actual Behavior

Freeze application, sometimes It even freezes entire iPhone

Workaround

Close application and. start from the device

Environment

Visual Studio Professional 2017 for Mac Version 7.5.3 (build 7) Installation UUID: 838f5ee1-ccfc-43fe-8649-fffbb4ffa45b Runtime: Mono 5.10.1.57 (2017-12/ea8a24b1bbf) (64-bit) GTK+ 2.24.23 (Raleigh theme) Xamarin.Mac 4.4.1.178 (master / eeaeb7e6)

Package version: 510010057

NuGet Version: 4.3.1.4445

.NET Core Runtime: /usr/local/share/dotnet/dotnet Runtime Version: 2.1.1 SDK: /usr/local/share/dotnet/sdk/2.1.301/Sdks SDK Version: 2.1.301 MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.10.1/lib/mono/msbuild/15.0/bin/Sdks

Xamarin.Profiler Version: 1.6.2 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Apple Developer Tools Xcode 9.4.1 (14161) Build 9F2000

Xamarin.Android Version: 8.3.3.2 (Visual Studio Professional) Android SDK: /Users/azapara/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 4.4 (API level 19) 6.0 (API level 23) 7.0 (API level 24) 7.1 (API level 25)

SDK Tools Version: 26.0.1 SDK Platform Tools Version: 25.0.5 SDK Build Tools Version: 25.0.3

Java SDK: /usr java version "1.8.0_101" Java(TM) SE Runtime Environment (build 1.8.0_101-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

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

Xamarin Inspector Version: 1.4.0 Hash: b3f92f9 Branch: master Build date: Fri, 19 Jan 2018 22:00:34 GMT Client compatibility: 1

Xamarin.Mac Version: 4.4.1.193 (Visual Studio Professional)

Xamarin.iOS Version: 11.12.0.4 (Visual Studio Professional) Hash: 64fece5f Branch: d15-7 Build date: 2018-05-29 20:00:44-0400

Build Information Release ID: 705030007 Git revision: 13cecd02aceddf29a1ed57b86f81c02994df1483 Build date: 2018-06-14 15:48:08-04 Xamarin addins: 7065de97cf22c9038fdc39dd627f2c30790fd8af Build lane: monodevelop-lion-d15-7

Operating System Mac OS X 10.13.2 Darwin 17.3.0 Darwin Kernel Version 17.3.0 Thu Nov 9 18:09:22 PST 2017 root:xnu-4570.31.3~1/RELEASE_X86_64 x86_64

Build Logs

https://gist.github.com/skyvolga/421cdd33a2770c5ca49dd014ca3a1d73

Application Output

https://gist.github.com/skyvolga/da763c94e2d163282dfeda86e60a92ec

Example Project (If Possible)

It was reproduced on xamarin-forms-samples/Navigation/TabbedPage

VincentDondain commented 6 years ago

Hi,

Thanks for the bug report. Couple of questions to clarify the issue since I'm having trouble reproducing that:

  1. What do you call sleep mode? Turn off and on the screen? Put the app in background? Do you have to wait a specific time?
  2. Is the debugging session always running when you do that or it stops before the app crashes?

The debugging session should stop if you turn the screen off (maybe what you call sleep) but I haven't seen issues when returning to the app (and moving tabs) after that.

oleksiizapara commented 6 years ago

Hi,

1 Yes, I press on sleep button and one more time to wake up device. Try to change tabs fast about 20 times or more, it does not crash instantly or on the first change. I think one 1 - 5 minutes is enough for this bug. 2 The debug session “Stop” after I pressed on the power button.

On 25 Jun 2018, at 23:45, Vincent Dondain notifications@github.com wrote:

Hi,

Thanks for the bug report. Couple of questions to clarify the issue since I'm having trouble reproducing that:

What do you call sleep mode? Turn off and on the screen? Put the app in background? Do you have to wait a specific time? Is the debugging session always running when you do that or it stops before the app crashes? The debugging session should stop if you turn the screen off (maybe what you call sleep) but I haven't seen issues when returning to the app (and moving tabs) after that.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/xamarin/xamarin-macios/issues/4331#issuecomment-400089480, or mute the thread https://github.com/notifications/unsubscribe-auth/AF2o-QxoJPw3w3XYIQKiR96lWM6zrMLlks5uAUvhgaJpZM4U1Fzn.

therealjohn commented 6 years ago

I'm able to reproduce this. Here are the steps.

  1. Download the sample
  2. Debug the app on a device
  3. Once the app has launched, press the power button to lock the device.
  4. The debug session will disconnect (as expected)
  5. Unlock the device and the app should be in the foreground.
  6. Tap between the 3 tabs quickly for about 30 seconds. I used two thumbs.
  7. Eventually, the app hangs and has to be force quit.

I did not get any meaningful info in the device logs while attached with Console running. @VincentDondain Can you try and take a look?