Bug 58538 - watchOS extension crashes with release device builds
Summary: watchOS extension crashes with release device builds
Status: RESOLVED DUPLICATE of bug 58114
Alias: None
Product: iOS
Classification: Xamarin
Component: Mono runtime / AOT compiler ()
Version: XI 10.12 (d15-3)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: 15.4
Assignee: Zoltan Varga
Depends on:
Reported: 2017-08-02 08:42 UTC by Pauli Jokela
Modified: 2017-08-02 16:55 UTC (History)
6 users (show)

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

A minimal example project. (31.28 KB, application/zip)
2017-08-02 08:42 UTC, Pauli Jokela
A crash report that has not been symbolicated. (29.54 KB, text/plain)
2017-08-02 08:45 UTC, Pauli Jokela
A crash log that has been symbolicated. (32.35 KB, text/plain)
2017-08-02 09:04 UTC, Pauli Jokela
Updated (symbolicated) crash log (31.96 KB, text/plain)
2017-08-02 12:37 UTC, Pauli Jokela
Updated sample project (47.31 KB, application/zip)
2017-08-02 12:39 UTC, Pauli Jokela

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:

Description Pauli Jokela 2017-08-02 08:42:11 UTC
Created attachment 23959 [details]
A minimal example project.

NOTE: This is the same bug as this one -> https://bugzilla.xamarin.com/show_bug.cgi?id=56312

When running a release build of watchOS application on an Apple Watch device, and also having LLVM and Bitcode enabled (required for App Store releases), the watchOS extension crashes somewhere within System.*, which I've encountered when using the latest version of Newtonsoft.Json (JSON .NET).

Steps to reproduce with the attached sample project:
1. Setup a wildcard bundle id and provisioning profile for a release build
2. Build and deploy the watchOS application to an Apple Watch device
3. Tap the "Crash Me" button inside the application, which should crash the app after a few seconds

My development environment:
- macOS Sierra (10.12.6)
- Visual Studio for Mac (7.1 Preview build 1291, beta channel)

Additional details extracted from Visual Studio for Mac's about screen -> show details:

Visual Studio Community 2017 for Mac (Preview)
Version 7.1 Preview (7.1 build 1291)
Installation UUID: a5127328-c55e-41ca-91d6-385ad5250001
	Mono (d15-3/da80840) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000215


.NET Core
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
SDK: /usr/local/share/dotnet/sdk/2.0.0-preview1-005977/Sdks
SDK Versions:
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks

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

Apple Developer Tools
Xcode 8.3.3 (12175.1)
Build 8E3004b

Version: (Visual Studio Community)
Hash: bf350ba5
Branch: d15-3
Build date: 2017-07-05 11:08:04-0400

Version: (Visual Studio Community)
Android SDK: /Users/dids/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		6.0 (API level 23)
		7.0 (API level 24)
		7.1 (API level 25)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.6
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:

Version: (Visual Studio Community)

Xamarin Inspector
Version: 1.2.2
Hash: b71b035
Branch: d15-1
Build date: Fri, 21 Apr 2017 17:57:12 GMT

Build Information
Release ID: 701001291
Git revision: 3be8a991a38839c5e4d5c012e291bc74011f40c8
Build date: 2017-07-26 14:48:29-04
Xamarin addins: 3bb0c32a14f1b7e368bf5ac53a84c3581c019391
Build lane: monodevelop-lion-d15-3

Operating System
Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

Enabled user installed addins
xUnit.NET 2 testing framework support 0.7.5
Comment 1 Pauli Jokela 2017-08-02 08:45:07 UTC
Created attachment 23960 [details]
A crash report that has not been symbolicated.

I'll attach a properly symbolicated crash log once I can.
Comment 2 Pauli Jokela 2017-08-02 09:04:54 UTC
Created attachment 23961 [details]
A crash log that has been symbolicated.

Managed to symbolicate the crash log, hopefully it helps.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2017-08-02 12:02:30 UTC
This is a duplicate of bug #58114, which has been fixed for 15.4

The sample crashes even with the fix, but it's a different crash I believe is a problem with the test app:

> 2017-08-02 13:55:17.779 WatchAppCrashTest.watchOS.Extension[215:122910] *** Terminating app due to uncaught exception 'System.ArgumentException', reason: 'Get Method not found for 'StringProperty''

*** This bug has been marked as a duplicate of bug 58114 ***
Comment 4 Pauli Jokela 2017-08-02 12:37:02 UTC
Created attachment 23978 [details]
Updated (symbolicated) crash log
Comment 5 Pauli Jokela 2017-08-02 12:39:08 UTC
Created attachment 23979 [details]
Updated sample project

Fixed several issues with the sample project itself.
Comment 6 Pauli Jokela 2017-08-02 12:40:24 UTC
@Rolf Sorry about that, the sample project itself had a few issues related to linking, assemblies and namespaces. I've fixed those and attached a new sample project and a new symbolicated crash log.

You should now be able to only crash the application on a device, and I _think_ only as a release build.
Comment 7 Rolf Bjarne Kvinge [MSFT] 2017-08-02 15:37:12 UTC
Your updated version of the test app works fine with the upcoming 15.4 release, so this is already fixed.

*** This bug has been marked as a duplicate of bug 58114 ***
Comment 8 Pauli Jokela 2017-08-02 16:10:39 UTC
@Rolf Thanks for confirming! I'm not authorized to see bug #58114, so couldn't tell what it was about.

What are you referring to when you say "15.4"? Also is that upcoming release available through beta/alpha channels yet? Thank you in advance. :)
Comment 9 Rolf Bjarne Kvinge [MSFT] 2017-08-02 16:55:12 UTC
(In reply to Pauli Jokela from comment #8)
> What are you referring to when you say "15.4"? Also is that upcoming release
> available through beta/alpha channels yet? Thank you in advance. :)

15.4 is the release after 15.3 (what you're currently using according to the version information you posted).

It's available in the alpha channel as of a few minutes ago: https://releases.xamarin.com/alpha-release-15-4-alpha-1/