Samsung Galaxy S7 sm-g935f crashes

sm-g935f (Android M), aka Samsung Galaxy S7 appeared in the last few days in our Xamarin Insights logs. All "SIGILL (mscorlib)" crashes.

Stacktrace:

System.ExecutionEngineException SIGILL

We released the app a few weeks ago. We used (and still are using) Xamarin for Visual Studio 3.x (to be precise: 3.11.1689 - so we didn't update to Xamarin 4.x).

So far all good till the Samsung Galaxy S7 crashes appeared. I'm wondering what can be the problem. Anyone had issues with the same device?

Sharing some more infos:

Nuget packages referenced in the app:

  <package id="PCLCrypto" version="1.0.2.15130" targetFramework="MonoAndroid50" />
  <package id="PCLStorage" version="1.0.2" targetFramework="MonoAndroid22" />
  <package id="Validation" version="2.0.6.15003" targetFramework="MonoAndroid50" />
  <package id="Xamarin.Android.Support.v4" version="22.2.1.0" targetFramework="MonoAndroid50" />
  <package id="Xamarin.Forms" version="1.4.2.6359" targetFramework="MonoAndroid50" />
  <package id="Xamarin.Insights" version="1.10.2.110" targetFramework="MonoAndroid50" />
  <package id="ZXing.Net.Mobile" version="1.5.4.0" targetFramework="MonoAndroid50" />

Properties > Application:
Compile using Android version: API Level 21 (Android 5.0)
Minimum Android to target: API Level 15 (Android 4.0.3)
Target Android version API Level 21

Properties > Android options (Release)
Packaging: Only "Enable Proguard" is checked.
Linker: "Only SDK Assemblies"
Advanced: Supported architectures:
* armeabi
* armeabi-v7a
* armeabi-v8a
* (no x86 or x86_64)

I just tried the app in the Nexus 4 Marshmallow Preview 1 Xamarin Player image, and the app started without problems. It seems that on S7 devices it crashes just after the splash screen, so just at the beginning.

I'm still waiting for a real S7 device to investigate, but in the meantime any ideas/suggestions are appreciated. Thank you.

Posts

  • PaoloBroccoPaoloBrocco USMember ✭✭
    edited March 2016

    I updated Xamarin Visual Studio to the latest version, and updated all xamarin packages to the latest stable version compatible with Xamarin Forms Android:

      <package id="PCLCrypto" version="1.0.2.15130" targetFramework="MonoAndroid50" />
      <package id="PCLStorage" version="1.0.2" targetFramework="MonoAndroid22" />
      <package id="Qontis.Mobile" version="2.0.0.1863-alpha" targetFramework="MonoAndroid50" />
      <package id="Validation" version="2.0.6.15003" targetFramework="MonoAndroid50" />
      <package id="Xamarin.Android.Support.Design" version="23.0.1.3" targetFramework="MonoAndroid60" />
      <package id="Xamarin.Android.Support.v4" version="23.0.1.3" targetFramework="MonoAndroid60" />
      <package id="Xamarin.Android.Support.v7.AppCompat" version="23.0.1.3" targetFramework="MonoAndroid60" />
      <package id="Xamarin.Android.Support.v7.CardView" version="23.0.1.3" targetFramework="MonoAndroid60" />
      <package id="Xamarin.Android.Support.v7.MediaRouter" version="23.0.1.3" targetFramework="MonoAndroid60" />
      <package id="Xamarin.Forms" version="2.1.0.6529" targetFramework="MonoAndroid60" />
      <package id="Xamarin.Insights" version="1.11.4" targetFramework="MonoAndroid50" />
      <package id="ZXing.Net.Mobile" version="2.0.4.46" targetFramework="MonoAndroid60" />
    

    Compile using Android version: Use Latest Platform (Android 6.0 (Marshmallow))
    Minimum Android to target: API Level 15 (Android 4.0.3)
    Target Android version API Level 23

    I'm having problem (the app crashes during or after scan) when using ZXing.Net.Mobile and scanning a QR code.

    The app does not crash in debug mode.

    If I deploy via Visual Studio, even if I uncheck "Use Shared Runtime", Mono Shared Runtime is installed all the time.
    If I delete the Mono Shared Runtime, the app crashes around 50% of the times. If I keep it it seems to work.

    The problem is that the release from the app store doesn't come with the shared runtime.

    Anyone has some ideas?

  • Chris_LamontChris_Lamont USUniversity ✭✭

    Thanks a lot Paolo, just released an app and getting the same problem, will try your solution.

  • prashantvcprashantvc USXamarin Team Xamurai

    I have filed a bug for this issue at https://bugzilla.xamarin.com/show_bug.cgi?id=39859
    If you new information please add it to the bug report

  • DavidLaundav.0631DavidLaundav.0631 USUniversity ✭✭

    We're getting this error reported on Insights too for Android - also after releasing with Cycle7. Is there any news on this issue, @prashantvc?

  • prashantvcprashantvc USXamarin Team Xamurai

    @DavidLaundav.0631

    A candidate fixes for this issue are included in the Cycle 8 Beta update:

    • Xamarin.Android 6.2.0.47
    • XamarinVS 4.2.0.584

    Could you give it a try and let us know if it helps?

  • rarenivarrarenivar USMember ✭✭
    edited September 2016

    Does anybody know if updating to Xamarin.Android 6.2.0.47 and XamarinVS 4.2.0.584 resolves the issue of Samsung Galaxy S7 crashes?

  • pnavkpnavk GEUniversity ✭✭
    edited April 18

    I encountered this recently with the following setup:

    • Xamarin Studio v6.3
    • Xamarin.Android v7.2.0.1

    On the following Devices:
    * Samsung Galaxy S7 (v7.0)
    * Samsung Galaxy S4 (v4.4)
    * Samsung Note 5 (v6.0)

    After spending days troubleshooting, it appears that this issue is related to the way the SplashScreen is implemented. As per: https://developer.xamarin.com/guides/android/user_interface/creating_a_splash_screen/

    As soon as I remove the following Item from my SplashActivity's theme:
    <item name="android:windowBackground">@drawable/splash_activity_background</item>

    The app launches on those devices in release mode without a crash.
    As soon as I add that line back in, the crash occurs on launch again (System.ExecutionEngineException SIGILL)

    Unfortunately, we have to implement the SplashScreen the "wrong way" without using a windowBackground. The app launches with an ugly blank screen before displaying our landing Activity. It sucks, but its vastly superior to a crash on launch on very commonly used devices. - If anyone has a better workaround apart form using android:windowBackground please share!

    Hope this helps others solve this issue.

  • pnavkpnavk GEUniversity ✭✭

    After a couple days of troubleshooting I was able to narrow this crash down to the way the SplashScreen is implemented, specifically by setting the android:windowBackground Item to a drawable background image.

    We saw the System.ExecutionEngineException SIGILL crash during launch on the following devices:

    • Samsung Galaxy S7 (v7.0)
    • Samsung Galaxy S4 (v4.4)
    • Samsung Note 5 (v6.0)

    Each running a different version of Android. All devices had the same behavior of crashing shortly after the splash screen.

    Our splash screen implementation followed the Xamarin guide: https://developer.xamarin.com/guides/android/user_interface/creating_a_splash_screen/

    When the windowBackground Item was removed from our Theme, we experienced NO CRASHES on the above devices. When the item was added back, the crashes began to occur again.

    Crashes only happen in Release mode.

    Our workaround was to avoid setting a windowBackground in our SplashScreenActivity's theme. Unfortunately, the side effect of this is an ugly blank screen that displays on App launch. As much as that sucks, it is vastly superior to a crash on launch, especially on very commonly used Android devices.

    Hope this helps!

  • pnavkpnavk GEUniversity ✭✭

    After a couple days of troubleshooting I was able to narrow this crash down to the way the SplashScreen is implemented, specifically by setting the android:windowBackground Item to a full screen drawable background image.

    We saw the System.ExecutionEngineException SIGILL crash during launch on the following devices:

    • Samsung Galaxy S7 (v7.0)
    • Samsung Galaxy S4 (v4.4)
    • Samsung Note 5 (v6.0)

    Each running a different version of Android. All devices had the same behavior of crashing shortly after the splash screen.

    Our splash screen implementation followed the Xamarin guide: https://developer.xamarin.com/guides/android/user_interface/creating_a_splash_screen/

    When the windowBackground Item was removed from our Theme, we experienced NO CRASHES on the above devices. When the item was added back, the crashes began to occur again.

    Crashes only happen in Release mode.

    Our fix was replacing the Full Screen Drawable to just a simple Icon with a flat color background. This fixed the issue on the Galaxy S7. We are going to be testing on the S4 and Note 5 as well.

    Hope this helps!

  • pnavkpnavk GEUniversity ✭✭

    After a couple days of troubleshooting I was able to narrow this crash down to the way the SplashScreen is implemented, specifically by setting the android:windowBackground Item to a drawable background image.

    We saw the System.ExecutionEngineException SIGILL crash during launch on the following devices:

    • Samsung Galaxy S7 (v7.0)
    • Samsung Galaxy S4 (v4.4)
    • Samsung Note 5 (v6.0)

    Each running a different version of Android. All devices had the same behavior of crashing shortly after the splash screen.

    Our splash screen implementation followed the Xamarin guide: https://developer.xamarin.com/guides/android/user_interface/creating_a_splash_screen/

    When the windowBackground Item was removed from our Theme, we experienced NO CRASHES on the above devices. When the item was added back, the crashes began to occur again.

    Crashes only happen in Release mode.

    Our workaround was to avoid setting a windowBackground in our SplashScreenActivity's theme. Unfortunately, the side effect of this is an ugly blank screen that displays on App launch. As much as that sucks, it is vastly superior to a crash on launch, especially on very commonly used Android devices.

    Hope this helps!

Sign In or Register to comment.