Xamarin-macios: [watchOS] "System.NotSupportedException: Stack walks are not supported on this platform" when using arm64_32 arch.

Created on 25 Jun 2019  路  3Comments  路  Source: xamarin/xamarin-macios

Steps to Reproduce

  1. Create a watchOS project
  2. Set the Release config. architecture to ARMv7k + ARM64_32 for the extension project
  3. Create a PCL project (PCL 4.5 - Profile259) with embeded resource files (localization)
  4. Reference the PCL project (eg: MyApp.Resources)
  5. Deploy (Release) on a real Apple Watch Series 4
  6. Try to call the ResourceManager of the PCL project

Expected Behavior

Deploys fine.
_resourceManager = MyApp.Resources.Strings.Resources.ResourceManager;
or
_resourceManager = Resources.ResourceManager;
should work and give access to the ResourceManager

Actual Behavior

Deploys fine.
An exception occurs when trying to get the ResourceManager.

If the call is inside a try/catch, the exception has no stacktrace/inner:
Launched watch application 'com.formyfit.formyfit.watchkitapp' on 'Formyfit鈥檚 Apple聽Watch' with pid 467 2019-06-25 12:43:34.570717+0200 FormyfitV2iOSFormyfitExtension[467:97619] Started Watch Connectivity Session on Watch 2019-06-25 12:43:34.600724+0200 FormyfitV2iOSFormyfitExtension[467:97619] ############## _resourceManager = Resources.ResourceManager; --- FAIL ############### 2019-06-25 12:43:34.600814+0200 FormyfitV2iOSFormyfitExtension[467:97619] ############## DETAILS ############### 2019-06-25 12:43:34.609096+0200 FormyfitV2iOSFormyfitExtension[467:97619] ### Exception : System.NotSupportedException: Stack walks are not supported on this platform. 2019-06-25 12:43:34.609185+0200 FormyfitV2iOSFormyfitExtension[467:97619] ### Exception Message : Stack walks are not supported on this platform. 2019-06-25 12:43:34.609239+0200 FormyfitV2iOSFormyfitExtension[467:97619] ### Exception StackTrace : 2019-06-25 12:43:34.609284+0200 FormyfitV2iOSFormyfitExtension[467:97619] ### Inner Exception :

If not handled (app crashes)
Launched watch application 'com.formyfit.formyfit.watchkitapp' on 'Formyfit鈥檚 Apple聽Watch' with pid 467 2019-06-25 12:43:34.570717+0200 FormyfitV2iOSFormyfitExtension[467:97619] Started Watch Connectivity Session on Watch 2019-06-25 12:43:34.612609+0200 FormyfitV2iOSFormyfitExtension[467:97619] *** Terminating app due to uncaught exception 'System.Reflection.TargetInvocationException', reason: 'Exception has been thrown by the target of an invocation.' *** First throw call stack: (0x1c42b3c4 0x1b60aee0 0x43899dc 0x289e6f8 0x289e488 0x2ea5ba30 0x2ea7ca38 0x2ea82f58 0x2ea601ac 0x2ea5fd84 0x2ea841c4 0x2ea5f8b4 0x2ea6429c 0x2ea5f590 0x2fe7a0b0 0x2fe72098 0x2ea841c4 0x2fe7199c 0x2fe79ee0 0x2fe62148 0x2feb1cc4 0x339e8830 0x33959420 0x33959728 0x3395a670 0x3395b908 0x3393eaa4 0x3430fba0 0x1ff285b4 0x1ff2d574 0x1fe94828 0x1fec3544 0x33eef6d8 0x1c3bd1a4 0x1c3bcab0 0x1c3b7b70 0x1c3b7478 0x1e5ec530 0x33ed7f28 0x1c086f50 0x1c089864 0x1cddc5e8 0x24949444 0x2ea91994 0x4390c64 0x28adea4 0x1be57cfc) libc++abi.dylib: terminating with uncaught exception of type NSException Watch application 'com.formyfit.formyfit.watchkitapp' terminated.

Environment

=== Visual Studio Community 2019 for Mac ===

Version 8.1.1 (build 27)
Installation UUID: cba87396-1c81-4c0c-9f33-c2c45c8cc833
    GTK+ 2.24.23 (Raleigh theme)
    Xamarin.Mac 5.6.0.25 (d16-0 / 50f75273)

    Package version: 518010028

=== Mono Framework MDK ===

Runtime:
    Mono 5.18.1.28 (2018-08/223ea7ef92e) (64-bit)
    Package version: 518010028

=== NuGet ===

Version: 5.0.2.5988

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
    2.2.0
    2.1.9
    2.1.2
    2.1.1
    2.0.5
    2.0.0
SDK: /usr/local/share/dotnet/sdk/2.2.101/Sdks
SDK Versions:
    2.2.101
    2.1.505
    2.1.302
    2.1.301
    2.1.4
    2.0.0
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Sdks

=== Xamarin.Profiler ===

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

=== Updater ===

Version: 11

=== Apple Developer Tools ===

Xcode 10.2.1 (14490.122)
Build 10E1001

=== Xamarin.Mac ===

Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

=== Xamarin.iOS ===

Version: 12.10.0.177 (Visual Studio Community)
Hash: 8b1df11f
Branch: d16-1-arm64-32
Build date: 2019-06-20 14:32:57-0400

=== Xamarin.Android ===

Version: 9.3.0.23 (Visual Studio Community)
Commit: HEAD/d0b48056f
Android SDK: /Users/iulian/Library/Developer/Xamarin/android-sdk-macosx
    Supported Android versions:
        8.0 (API level 26)
        8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 28.0.3
SDK Build Tools Version: 27.0.3

Build Information: 
Mono: mono/mono/2018-08@3a07bd426d3
Java.Interop: xamarin/java.interop/d16-1@5ddc3e3
LibZipSharp: grendello/LibZipSharp/d16-1@44de300
LibZip: nih-at/libzip/rel-1-5-1@b95cf3f
ProGuard: xamarin/proguard/master@905836d
SQLite: xamarin/sqlite/3.27.1@8212a2d
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-1@acabd26

=== Microsoft Mobile OpenJDK ===

Java SDK: /Users/iulian/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android Device Manager ===

Version: 1.2.0.44
Hash: aac645b
Branch: remotes/origin/d16-1
Build date: 2019-05-29 19:55:24 UTC

=== Xamarin Designer ===

Version: 16.1.0.467
Hash: f1657e133
Branch: remotes/origin/d16-1-new-document-model
Build date: 2019-06-18 21:57:42 UTC

=== Xamarin Inspector ===

Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 801010027
Git revision: ce34f6838e6457d0e7d5991a1a693415e6fcae07
Build date: 2019-06-19 19:52:58+00
Build branch: release-8.1
Xamarin extensions: 5104b76623e0df8e5f763f87d170279c0b788e89

=== Operating System ===

Mac OS X 10.14.4
Darwin 18.5.0 Darwin Kernel Version 18.5.0
    Mon Mar 11 20:40:32 PDT 2019
    root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64

Watch Crash Log

FormyfitV2iOSFormyfitExtension.25-06-2019.10-02.log

bug iOS

All 3 comments

@iulian-mirica can you try the latest build from the Preview channel and check if that works for you?

I can reproduce the exception with the custom 12.10.0.177 version, but not with the Preview.

@rolfbjarne Awesome! It's working on the latest build from the Preview channel! :)

Xamarin.iOS
Version: 12.14.0.91 (Visual Studio Community)
Hash: 2f1cc7bb
Branch: d16-2
Build date: 2019-06-07 02:49:22-0400

Great, I'm closing this then :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rolfbjarne picture rolfbjarne  路  4Comments

whitneyschmidt picture whitneyschmidt  路  3Comments

michaelstonis picture michaelstonis  路  3Comments

chamons picture chamons  路  4Comments

jzeferino picture jzeferino  路  3Comments