android: Compiler crashes when building an Android Project (OSX)
Steps to Reproduce
Either compile the project using Visual Studio for Mac, or msbuild on Terminal.
Android build tools tried: 27.0.3 and 26.0.3.
Mono Frameworks tried: 4.8.0 and 4.8.1. (Mono 4 is required to run legacy libraries).
Expected Behavior
Compile and generate .apk file.
Actual Behavior
On Visual Studio for Mac, an alert with “Fatal error” message appears, then it closes automatically (without clicking on OK button of the alert window).
On Terminal the following message appears (full output attached):
Stacktrace:
at <unknown> <0xffffffff>
at Xamarin.Tools.Zip.Native.zip_open (string,Xamarin.Tools.Zip.OpenFlags,Xamarin.Tools.Zip.ErrorCode&) [0x00000] in <0733d002219547e7af60b6fb41716161>:0
at Xamarin.Tools.Zip.ZipArchive.Open (string,Xamarin.Tools.Zip.OpenFlags) [0x00009] in <0733d002219547e7af60b6fb41716161>:0
at Xamarin.Tools.Zip.ZipArchive.Open (string,System.IO.FileMode,string,bool,Xamarin.Tools.Zip.IPlatformOptions) [0x0005a] in <0733d002219547e7af60b6fb41716161>:0
at Xamarin.Android.Tools.Files.ReadZipFile (string,bool) [0x00000] in <fdfe8f54615a4e2ab24c72dc90da5c64>:0
at Xamarin.Android.Tasks.MonoAndroidHelper.IsValidZip (string) [0x00000] in <fdfe8f54615a4e2ab24c72dc90da5c64>:0
at Xamarin.Android.Tasks.GetAdditionalResourcesFromAssemblies.MakeSureLibraryIsInPlace (string,string,string,string,string) [0x00142] in <fdfe8f54615a4e2ab24c72dc90da5c64>:0
at Xamarin.Android.Tasks.GetAdditionalResourcesFromAssemblies.AddAttributeValue (System.Collections.Generic.ICollection`1<string>,Mono.Cecil.CustomAttribute,string,string,bool,string) [0x002c6] in <fdfe8f54615a4e2ab24c72dc90da5c64>:0
at Xamarin.Android.Tasks.GetAdditionalResourcesFromAssemblies/<>c__DisplayClass37_0.<DoExecute>b__1 () [0x001a2] in <fdfe8f54615a4e2ab24c72dc90da5c64>:0
at System.Threading.Tasks.Task.InnerInvoke () [0x00012] in <f712f98eb8e445c8918edaf595bbe465>:0
at System.Threading.Tasks.Task.Execute () [0x00016] in <f712f98eb8e445c8918edaf595bbe465>:0
at System.Threading.Tasks.Task.ExecutionContextCallback (object) [0x00007] in <f712f98eb8e445c8918edaf595bbe465>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x0008d] in <f712f98eb8e445c8918edaf595bbe465>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in <f712f98eb8e445c8918edaf595bbe465>:0
at System.Threading.Tasks.Task.ExecuteWithThreadLocal (System.Threading.Tasks.Task&) [0x0005f] in <f712f98eb8e445c8918edaf595bbe465>:0
at System.Threading.Tasks.Task.ExecuteEntry (bool) [0x0006f] in <f712f98eb8e445c8918edaf595bbe465>:0
at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00000] in <f712f98eb8e445c8918edaf595bbe465>:0
at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00096] in <f712f98eb8e445c8918edaf595bbe465>:0
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <f712f98eb8e445c8918edaf595bbe465>:0
at (wrapper runtime-invoke) <Module>.runtime_invoke_bool (object,intptr,intptr,intptr) [0x0001e] in <f712f98eb8e445c8918edaf595bbe465>:0
(native stacktrace)
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Version Information
=== Visual Studio Community 2017 for Mac ===
Version 7.5 (build 1254) Installation UUID: 8fbd2e42-6a70-4878-b267-e7b22af25c7f Runtime: Mono 5.10.1.47 (2017-12/8eb8f7d5e74) (64-bit) GTK+ 2.24.23 (Raleigh theme) Xamarin.Mac 4.4.0.36 (master / 0c7c49a6)
Package version: 510010047
=== NuGet ===
Version: 4.3.1.4445
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 2.0.5 2.0.0 SDK: /usr/local/share/dotnet/sdk/2.1.4/Sdks SDK Versions: 2.1.4 2.0.0 MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/4.8.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.3 (14154) Build 9E145
=== Xamarin.Mac ===
Version: 4.4.1.176 (Visual Studio Community)
=== Xamarin.Android ===
Version: 8.3.0.19 (Visual Studio Community) Android SDK: /Users/REDACTED/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.3 (API level 18) 4.4 (API level 19) 5.0 (API level 21) 5.1 (API level 22) 6.0 (API level 23) 7.0 (API level 24) 7.1 (API level 25) 8.0 (API level 26) 8.1 (API level 27)
SDK Tools Version: 26.1.1 SDK Platform Tools Version: 27.0.1 SDK Build Tools Version: 26.0.3
Java SDK: /usr java version “1.8.0_31” Java™ SE Runtime Environment (build 1.8.0_31-b13) Java HotSpot™ 64-Bit Server VM (build 25.31-b07, mixed mode)
Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL
=== Xamarin.iOS ===
Version: 11.10.1.177 (Visual Studio Community) Hash: 7e782c1e Branch: d15-7 Build date: 2018-04-25 15:27:13-0400
=== Xamarin Inspector ===
Version: 1.4.0 Hash: b3f92f9 Branch: master Build date: Fri, 19 Jan 2018 22:00:34 GMT Client compatibility: 1
=== Build Information ===
Release ID: 705001254 Git revision: 498923ea36d2c7fe440c4e4b8cfb75bd50bbd748 Build date: 2018-05-05 10:35:24-04 Xamarin addins: 219f1c4943b4693b837b4173dd10ea982a47c852 Build lane: monodevelop-lion-d15-7
=== Operating System ===
Mac OS X 10.13.4 Darwin 17.5.0 Darwin Kernel Version 17.5.0 Fri Apr 13 19:32:32 PDT 2018 root:xnu-4570.51.2~1/RELEASE_X86_64 x86_64
=== Enabled user installed addins ===
DeepClean 1.2.2
Log File
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 1
- Comments: 23 (10 by maintainers)
" Since that behavior is already resolved in the current versions of the Mono Framework MDK, I’m not sure if there will be any action to take for this issue."
You can’t just crash and not give us any feedback as to why. It’s totally OK to say you need to switch, but remember that lots of your users don’t even know that’s possible - I had to go hunting for where to make that change (and yes, I was set for the older Mono 4.8.0, but I have no idea why, and have no problems switching to the later version).