* Share code with GetInfoPListInclude to find the same Info.plist nodes, so
that FixInfoPListNode also finds existing nodes whose names isn't
"Info.plist".
* Add support for specifying the new Info.plist name.
Rename TestPlatform fields to be more in line with the rest of the code, and
drop the Unified prefix, since everything is Unified now.
* Unified -> Modern
* UnifiedXM45 -> Full
* UnifiedSystem -> System
* Bump VSMac to 8.1.0.2742 to fix msbuild issues (#6279)
* Bump VSMac to 8.1.0.2742 to fix msbuild issues
This is required to get the support for the msbuild `ToolsVersion`
change from `15.0` to `Current`.
* [tests][msbuild] Fix Binding resources test with updated msbuild
Test failure with updated msbuild and vsmac 8.1:
```
Xamarin.iOS.Tasks.NativeReferencesNoEmbedding("iPhone").ShouldNotUnnecessarilyRebuildBindingProject(True)
Binding project build did not create package?
Expected: True
But was: False
at Xamarin.iOS.Tasks.NativeReferencesNoEmbedding.ShouldNotUnnecessarilyRebuildBindingProject (System.Boolean framework) [0x000a0] in <74b8f7d8a53e40109916d305bb4d7403>:0
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo cul
ture) [0x0006a] in <0519fa732e8845b6a809ce9180f541db>:0
```
The test builds the project multiple times. Before the 3rd build, the project
file's timestamp is updated and expects that the binding package will be
rebuilt. But it is not, because the target `_CreateBindingResourcePackage`
doesn't depend on that project file. So, add that to the target inputs.
* [nuget] Use xibuild to run nuget
Fix errors seen during `nuget restore` for tests:
```
Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xammac_tests/xammac_tests.csproj(213,3): error MSB4024: The imported project file "/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.CSharp.targets" could not be loaded. Could not find file "/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.CSharp.targets"
```
* [xibuild] Fix incorrect mscorlib.dll being used (#6068)
* [xibuild] Fix incorrect mscorlib.dll being used
The `GuiUnit_NET_4_5` project, when built with `xibuild` uses the wrong `mscorlib.dll`.
From https://github.com/xamarin/xamarin-macios/issues/5760#issuecomment-472457202 :
```
- mscorlib.dll is being used from mono/4.5 and the other system assemblies are from mono/4.5-api
- GuiNet* project is built with xibuild
What is happening here is:
xibuild sets[1] `SetToolsetProperty ("TargetFrameworkRootPath", FrameworksDirectory + Path.DirectorySeparatorChar);`
which points to `/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks`.
This causes $(FrameworkPathOverride) to be set[2] to `/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks/.NETFramework/v4.5`,
but that doesn't have a mscorlib.dll, so it gets reset[3] to /Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5/.
If we don't set TargetFrameworkRoothPath, then we get `FrameworkPathOverride = /Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5-api`,
causing `_ExplicitReference=/Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5-api/mscorlib.dll`(correct one) to be used.
```
Fixes https://github.com/xamarin/xamarin-macios/issues/5760
1. https://github.com/xamarin/xamarin-macios/blob/master/tools/xibuild/Main.cs#L209
2. https://github.com/mono/msbuild/blob/xplat-master/src/Tasks/Microsoft.Common.CurrentVersion.targets#L79
3. https://github.com/mono/msbuild/blob/xplat-master/src/Tasks/Microsoft.Common.CurrentVersion.targets#L84
* Revert "Workaround https://github.com/xamarin/xamarin-macios/issues/5760 in generator csproj"
This reverts commit 9bd927bb7f.
The previous commit for xibuild removes the need for this.
* [xibuild] Handle "incorrectly" cased msbuild property names (#6202)
msbuild property names are case insensitive. While generating the custom
app.config, in `SetToolsetProperty(..)` we try to update the property if
it already exists. But the name lookup was case sensitive, thus causing
the lookup to fail, resulting in two entries for the same property name
differing only in case. Eg. `MSBuildSDKsPath` vs `MSBuildSdksPath`.
Fixed to ignore case.
Fixes https://github.com/mono/mono/issues/14765 .
* [tests] Minor refactor to get better Xcode version parsing.
* Rename Configuration.XcodeVersion to XcodeVersionString.
* Add Configuration.XcodeVersion a parsed Version instane of XcodeString.
* [tests] Ignore all 'MT0099: Not linking with WatchKit because Xcode 11 beta 1' warnings in tests.
* [tests] Adjust min OS version tests for Xcode 11b1.
* [tests] Adjust tests for changes in 'nm' output.
* [tests] Adjust tests for name changes in Clang.
* [tests] Adjust tests for changes in ld warning format.
* [msbuild] 'metal' and 'metallib' aren't in PATH anymore, so use xcrun to execute them.
* [msbuild] Fix DevicePlatformBinDir for the Metal and MetalLib targets on iOS.
Also set the SDKROOT variable, otherwise metal and metallib don't work
properly, and revert the previous attempt at a fix (use xcrun).
* [tests] Simplify version parsing code to not version parse anymore.
* [tests] Add FIXME for once Apple fixes the WatchKit disappearance.
Usually it's when working on beta Xcodes we make mistakes that only show up
when running on older simulators (and devices):
* Missing/wrong availability attributes.
* Tests for new API that don't check the OS if that API is available.
So automatically enable the tests on older simulators for PR builds when using
a beta Xcode.
* [tests] Remove 32-bit Xamarin.Mac tests (both Classic and Unified).
We're removing support for 32-bit Xamarin.Mac apps (#6300), which means we
don't need to run the tests anymore.
This part of the implementation for #6300, I'm starting with the tests because
some of our XM/Classic tests are failing and making the bots unnecessarily red
(since we'll remove XM/Classic support anyway). Also CI will be faster if we
don't run these tests.
* [mmptest] Fix build.
* [tests] Fix build for mono-native-mac.csproj.
Photos.framework headers are broken in Xcode 11 beta 1 [1]. Optimizations
fails since the static registrar skip over the type [2]
```
[FAIL] PHLivePhotoEditingContextTest.Linker : ObjCRuntime.RuntimeException : Can't register the class Photos.PHContentEditingInput when the dynamic registrar has been linked away.
at ObjCRuntime.Class.GetClassHandle (System.Type , System.Boolean , System.Boolean& ) [0x000de] in <d93fa0efd60442128943a9eb0e82eb8d>:0
at ObjCRuntime.Class.GetClassHandle (System.Type ) [0x00000] in <d93fa0efd60442128943a9eb0e82eb8d>:0
at ObjCRuntime.Class.GetHandle (System.Type ) [0x00000] in <d93fa0efd60442128943a9eb0e82eb8d>:0
at Foundation.NSObject.AllocIfNeeded () [0x00019] in <d93fa0efd60442128943a9eb0e82eb8d>:0
at Foundation.NSObject..ctor (Foundation.NSObjectFlag ) [0x00006] in <d93fa0efd60442128943a9eb0e82eb8d>:0
at Photos.PHContentEditingInput..ctor () [0x00000] in <d93fa0efd60442128943a9eb0e82eb8d>:0
at MonoTouchFixtures.Photos.PHLivePhotoEditingContextTest.Linker () [0x00001] in <6e792af97a28410a80fa790ecfb26b9c>:0
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object , System.Reflection.BindingFlags , System.Reflection.Binder , System.Object[] , System.Globalization.CultureInfo ) [0x0006a] in <3440dfbcd957471aabeed02fbc939d2a>:0
PHLivePhotoEditingContextTest : 2 ms
```
references
[1] https://github.com/xamarin/xamarin-macios/issues/6212
[2] 60a5392d35
* [xharness] Show links to previous test runs in html report in server mode. (#6031)
* [xharness] Change url for server mode.
* [xharness] Show links to previous test runs in html report in server mode.
This makes it much easier to see what failed in a previous test run.
* [XHarness] Show when we have a watch HE0038 error. (#6060)
To simplify the life of the monitorer, if we get a crash with a HE0038
we will propagate the result to the html and will provide a link to the
issue so that it is easy to report it.
* [xharness] Look for HE0038 anywhere in a log file. (#6175)
Most log files now have timestamps, which means that looking for 'HE00380' at
the start of each line won't work anymore.
Fixes an issue where the HE0038 issue isn't detected properly.
Hopefully fixes this assertion:
> 07:42:06.7701360 validateStrideTextureParameters:1512: failed assertion `Linear texture: bytesPerRow (64) must be aligned to 256 bytes'
which doesn't happen on my machine.
Hopefully fixes this assertion:
> 07:42:06.7701360 validateStrideTextureParameters:1512: failed assertion `Linear texture: bytesPerRow (64) must be aligned to 256 bytes'
which doesn't happen on my machine.
* [xharness] Don't use a dash in the bundle identifer for watchOS projects.
It causes problems with the mscorlib test project, which can't be launched properly.
I'm not sure what's the underlying cause, but here are some of the symptoms:
* The watch app actually shows up fine on the device, but:
* mlaunch isn't notified about the new process, so it thinks the app didn't
launch.
* The new process doesn't receive any environment variables we try to give it,
which for instance means that it won't auto-start the tests upon launch.
* If we ask mlaunch to attach with lldb, mlaunch will ask watchOS to launch
the process in a suspended state while lldb attaches. Yet the watch app
shows up on the device as if not asked to be suspended upon launch.
It seems that the dash (I assume, because I haven't investigated this very
deeply, I just happened to find a solution that worked) makes watchOS launch
the app as if tapped, instead of launched from an IDE.
The strangest part is that this only happens with the mscorlib test project,
not any of the other test projects we run on the watch, and they all have
dashes in their bundle identifiers... yet replacing the dash with another
character (underscore, letter, removing it altogether) all made things work as
expected.
* [monotouch-test] Adjust expected value for watchOS bundle id.
The watchOS bundle ID changed in fc5067ee67, and
the test failure wasn't caught properly.
Basic application (size) for doing an `HttpClient.GetAsync`, release/llvm, 64bits only
- NSUrlSessionHandler (master): 6.4 MB
- NSUrlSessionHandler (PR#5936): 7.7 MB
- NSUrlSessionHandler (this PR): 6.4 MB
The size increase occurs because of the reference to .net `X509*` types.
This brings a lot of additional code, including managed cryptographic
code, inside the application - even when the feature is **not** used.
The solution is to expose an API that only use native (OS) types, which
are mostly already part of the application. This has a very low impact
on existing applications.
It's still possible to hook back to .NET validation if needed (it should
not in most cases) but, in this case, the extra price will only be
_paid_ if used (and can be lower if the code is needed by something else
from the application).
In comparison using other `HttpClient` handler produce app sizes of
- HttpClientHandler (managed): 10.4 MB
- CFNetworkHandler: 6.8 MB
Based on/supersede https://github.com/xamarin/xamarin-macios/pull/5733
Fix https://github.com/xamarin/xamarin-macios/issues/4170
* Choose the first hostname for the HttpTextWriter if there are multiple hosts.
* Open the HttpTextWriter before writing to it.
* Don't overwrite the http writer with another writer immediately after creating it.
* Close the HttpTextWriter when done writing.
* Wait for the HttpTextWriter to complete the final http request before exiting.
This allows the optimization to be disabled in cases where one, or
many, a custom attribute(s) are required by the application at runtime.
While not ideal disabling this single step is much better than disabling
linking for the whole application.
A better approach is described in https://github.com/xamarin/xamarin-macios/issues/6048
but this configuration optimization makes sense independently of it.
Fix https://github.com/xamarin/xamarin-macios/issues/3655
The change allows to state the tests that have to be ran. ATM with these
changes, the vsts pipeline must add the following to the env vars:
* tvOS device pipelines: Must add run-tvos-tests to the labels.
* iOS device pipelines: Must add run-ios-tests to the labels.
This will ensure that only the tests for the devices are ran and if the
tests pass we get a green build with no unexpected skips.
* [msbuild] Add reference to `System.Drawing.Common.dll` to XI projects.
Fixes https://github.com/mono/mono/issues/13483 :
```
@akoeplinger: Since we moved types from Mono.Android.dll and
Xamarin.iOS/WatchOS/TVOS.dll to System.Drawing.Common.dll user projects
would fail to compile. We need to add some msbuild logic to add a
reference to the assembly automatically.
```
* [msbuild] Implement the same fix for XM projects as well.
* [msbuild] Update Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_* tests.
We're including a new assembly, which means the
Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_* must be updated
accordingly.
Also modify these tests so that test assert that fails lists the actual
assembly that's missing, i.e. instead of this:
1) Test Failure : Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_Executable
#1
Expected: 6
But was: 7
we now print:
1) Test Failure : Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_Executable
References
Expected: equivalent to < "mscorlib.dll", "MyLibrary.dll", "System.Core.dll", "System.dll", "System.Xml.dll", "Xamarin.iOS.dll" >
But was: < "mscorlib.dll", "MyLibrary.dll", "System.Core.dll", "System.dll", "System.Drawing.Common.dll", "System.Xml.dll", "Xamarin.iOS.dll" >
* [tests] Adjust Xamarin.MMP.Tests.AssemblyReferencesTests.ShouldNotAllowReference_ToSystemDrawing.
The test was verifying that referencing System.Drawing.dll and trying to use
System.Drawing.RectangleF would fail to compile (because System.Drawing.dll
shouldn't be resolved in this case).
The addition of System.Drawing.Common.dll breaks this assumption, because now
we ship System.Drawing.RectangleF, so the code that was supposed to fail to
compile works just fine instead.
So modify the test to verify that there's no System.Drawing.dll in the final
bundle.
* Remove workarounds for mono/mono#13483.
* [msbuild] Create a way out if automatically referencing System.Drawing.Common.dll causes problems.
* [msbuild] Adjust variable name and boolean logic according to review.
We automatically create simulators when needed, but it won't work if the
simulator runtime isn't installed. So handle the case where a test might not
have a simulator to execute in correctly.
Fixes this test:
Xamarin.MTouch.AppAndExtensionWithBindingFramework: Expected execution to succeed, but exit code was 1, and there were 2 error(s): build app
error MT5210: Native linking failed, undefined symbol: _CLLocationCoordinate2DMake. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
error MT5202: Native linking failed. Please review the build log.
* [runtime] Add an inner exception parameter to Runtime.CreateProductException.
This allows us to simplify code by using inner (and outer) exceptions as
a means to provide information instead of passing extra information
around in order to create decent exceptions.
One example is how we pass the selector and method name to the method
that converts from a native id to a managed NSObject instance: passing
this information is not necessary anymore if we can use two exceptions,
one for the failure to convert from an id to a NSObject instance,
wrapped in a second that tells which method/selector call ran into this
conversion problem.
* [runtime] Throw better exceptions when the dynamic registrar can't marshal something.
* [runtime] Throw a better exception when something goes wrong when trying to marshal a return value.
* [runtime] Use inner exceptions to convey failure information instead of trying to create a single exception with all we know.
* Fix merge problem.
* [tests] Add sample tester.
Add a unit project that looks for iOS/macOS/tvOS sample projects in several
repositories, and builds them all.
* [tests][sampletester] Remove known issue which has now been fixed.
* [tests] Only run sample tests on CI in Azure Devops.
* Remove the possibility of automatically running the sample tests with
xharness (so the sample tests won't run on PR bots or internal bots when the
'run-all-tests' label is added). It's still possible to run the sample tests
manually from the xharness web UI.
* Automatically trigger the sample test run in Azure Devops if the
'run-sample-tests' label is applied to a PR (and that PR is executed on
internal Jenkins).
* Fix typo.
* Fix path.
* Verbose output to track down scheduling failure.
* Bump maccore to get improved debug spew.
Diff: f527c9c526..f89d74b165
* [tests][sampletester] Fix build for TodoWCF.
* [pdfkit] Remove private API
* [vision] Remove VNRequest preferredMetalContext API and add API compatibility stub
Looks like it was removed between iOS 11 beta 4 and 5
http://codeworkshop.net/objc-diff/sdkdiffs/ios/11.0b5/Vision.html
* [gameplaykit] Do not expose selector for 'RemoveData'
* [cloudkit] Remove selector from deprecated 'UsesBackgroundSession' API
* [metalperformanceshaders] Remove private API
* [gamekit] Remove private API
* [avfoundation] Replace AVAssetResourceLoadingRequest 'finished' by 'isFinished'
Apple now reject the original (iOS 6) `finished` selector - even if its
replacement `isFinished` is not available until iOS 7.
* [corebluetooth] 'Primary' and 'UUID' are not mutable
This was not documented (or mis-documented in earlier macOS docs) and
the API are now replaced with empty stubs to maintain binary
compatibility with existing code.
* [coreanimation] Remove CAEmitterBehavior 'initWithType:' and 'behaviorWithType:' API
Corresponding headers were removed in Xcode 9 without any explanation
rdar #33590997 was filled - no news
'initWithType:' and 'behaviorWithType:' API now cause rejection
Tracked in https://trello.com/c/J8BDDUV9/86-33590997-coreanimation-quartzcore-api-removals
* [uikit] Remove (macOS only) API from NSLayoutManager (on other platforms)
We build for both armv7 and arm64, and the failure we're looking for can
happen with either architecture. The order in which the architectures are
built is random, and mtouch will fail once the first error occurs, which means
that we can't assert that the failure comes from the arm64 build, since the
armv7 build might have been executed first (and triggered the error).
So just don't assert that the expected error message contains the
architecture, which makes the assert valid for both armv7 and armv64.
A simple test revels the truth:
dyld: Symbol not found: _OBJC_CLASS_$_MPSImageNormalizedHistogram
Referenced from: /var/containers/Bundle/Application/4DA44899-5F1D-4BF9-9C2E-B26982AE89F1/uistestappobjc.app/uistestappobjc
Expected in: /System/Library/Frameworks/MetalPerformanceShaders.framework/MetalPerformanceShaders
in /var/containers/Bundle/Application/4DA44899-5F1D-4BF9-9C2E-B26982AE89F1/uistestappobjc.app/uistestappobjc
This fixes this test failure on iOS 11:
[FAIL] MPSImageNormalizedHistogramTests.Constructors : ObjCRuntime.RuntimeException : Wrapper type 'MetalPerformanceShaders.MPSImageNormalizedHistogram' is missing its native ObjectiveC class 'MPSImageNormalizedHistogram'.
* Initial commit of ArchiveTaskBase for macOS
* Fix namespace
* Add concrete Archive task
* Add Archive target to Xamarin.Mac.Common.targets
* Remove TODOs for non-applicable items
* Add more properties to archive Info.plist
* Add more parameters to Archive task
* Set the ArchiveDir output parameter
* Move ITunesSourceFiles parameter
* Add test
* Fix msbuild mistakes preventing archive from working
* Reorder ApplicationProperties to be at top like iOS
* Add note
* Improve error handling
* Fix archive to be loadable in Xcode
* 4 spaces to tabs
* More space -> tab
Fixes this when running on tvOS using dylibs:
> [FAIL] Introspection.CheckSymbols : dlsym() not found mono_native_initialize()
Now:
* If on iOS, we'll always have the `mono_native_initialize` symbol, because the symbol is used in P/Invoke in a user assembly (the test assembly itself), and mtouch will make the AOT-compiled code use dlsym for P/Invokes in user assemblies (and when using dlsym we can't (native) strip away the symbol).
* If on watchOS or tvOS, we'll have the symbol when we're loading `mono_native_initialize` from a dylib. If loading `mono_native_initialize` from a static library, we can (native) strip away the symbol because mtouch will make the AOT-compiled P/Invoke use a static reference to the native symbol, and thus the `mono_native_initialize` symbol will not be present in the executable.
The mono bump added some new tests that fail on device + release
configurations. This is a known issue by mono and they'll fix it in the
next version but will not be backported to 2018-10.
* NSDataDetector
* Add constructor found in header. No idea where the commented-out
constructor came from, it's not in the header, so I removed it.
* Add overloads that take NSTextCheckingType in addition to
NSTextCheckingTypes. Apple's API take NSTextCheckingTypes, but all the
documentation and samples say that you're supposed to pass one or more
or'ed NSTextCheckingType values, so support that as well without casting
between enums.
* NSRegularExpression
* GetMatches had the wrong return type, so add a GetMatches2 that does it
right. Also add a test to make sure it's really right.
* Bind 'regularExpressionWithPattern:options:error:' with a static method.
There's a corresponding constructor, but constructors returning out
NSError parameters isn't the nicest API (when the NSError is important),
so add the static method as well.
* Add a missing [NullAllowed] on FindFirstMatch's return value.
* NSRegularExpressionOptions
* Add missing enum value.
Fixes https://github.com/xamarin/xamarin-macios/issues/5881.
- A long while ago, this hack was added to mmp:
// Shutup the warning until we decide on bug: 36478
if (shortendName.ToLowerInvariant () == "intl" && IsUnifiedFullXamMacFramework)
- This breaks use cases were we explicitly ask for that file, so let's
fix that for now until we can fix the root cause for real
It's needed at runtime since it changes exception handling behavior.
The "link sdk" Linker_RuntimeWrappedException() test relies on it,
but this never showed up there since "link sdk" doesn't link the main assembly.
NSNotificationCenter is thread-safe, so that observers can be added and
removed in multiple threads simultaneously.
Unfortunately our own helper code wasn't, so make sure to fix that by locking
around all accesses to the observer list.
And add a test case as well.
Existing binding binaries won't have the `[Preserve]` attribute on
the `Handler` field and, with the new optimization, would not work
properly.
This tweak make sure that older, already linker-safe, bindings will
remain this way (safe) in this (and future) versions of both iOS and
macOS SDK.
https://github.com/xamarin/xamarin-macios/pull/4884 introduced the logic of only building certain `RunTestTask`.
This was meant to disable iOS Extensions as part of a fix to https://github.com/xamarin/maccore/issues/1008.
However this didn't quite work and iOS extensions were still running (and failing).
The reason being that `BuildOnly` was set to a `RunDeviceTask` that's added to a list which is then given to `CreateTestVariations` which creates new instances of `RunDeviceTask`.
We now propagate `BuildOnly` to the new variation instance.
According to Rolf it's fine to always add since the native linker will
figure out if it's really needed and so customers don't need to do
anything when using -all_load.
* Bump for Xcode 10.2 final
* Bump macios-binaries so mlaunch works on 10.14.4
* [appkit] Update for Xcode 10.2 final
* [mps] Update for Xcode 10.2 final
* Bump maccore for swift5 runtime support on older macOS versions
* [AppKit] Ignore deprecated API
* [tests] Don't test QTMovie, it's broken (crashes).
QTKit is deprecated (and has been for 5 years), so just don't test QTMovie.
Fixes these crashes:
apitest:
***** DelegateAndDataSourceAllowsNull
Stacktrace:
at <unknown> <0xffffffff>
at (wrapper managed-to-native) ObjCRuntime.Messaging.IntPtr_objc_msgSend (intptr,intptr) [0x0000a] in <e8e733c9728c43cba731719f096ad306>:0
at QTKit.QTMovie..ctor () [0x00018] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/QTKit/QTMovie.g.cs:330
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <3ad39e28642b49d2a535a565e6bf6837>:0
at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) [0x00016] in <3ad39e28642b49d2a535a565e6bf6837>:0
at System.Reflection.MonoCMethod.InternalInvoke (object,object[],bool) [0x00005] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/MonoMethod.cs:667
at System.Reflection.MonoCMethod.DoInvoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x0007a] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/MonoMethod.cs:657
at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/MonoMethod.cs:689
at System.Reflection.ConstructorInfo.Invoke (object[]) [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/ConstructorInfo.cs:62
at Xamarin.Mac.Tests.DelegateAndDataSourceTest.DelegateAndDataSourceAllowsNull () [0x00110] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/apitest/src/DelegateAndDataSourceTest.cs:65
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <3ad39e28642b49d2a535a565e6bf6837>:0
at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) [0x00016] in <3ad39e28642b49d2a535a565e6bf6837>:0
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x0003b] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/referencesource/mscorlib/system/reflection/methodbase.cs:229
at NUnit.Framework.Internal.Reflect/<>c__DisplayClass9_0.<InvokeMethod>b__0 () [0x00000] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/Internal/Reflect.cs:226
at GuiUnit.InvokerHelper.Invoke () [0x0000e] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/GuiUnit/InvokerHelper.cs:18
at Foundation.NSActionDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/Foundation/NSAction.cs:62
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <3ad39e28642b49d2a535a565e6bf6837>:0
at <unknown> <0xffffffff>
at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend (intptr,intptr) [0x0000a] in <e8e733c9728c43cba731719f096ad306>:0
at AppKit.NSApplication.Run () [0x00012] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/AppKit/NSApplication.g.cs:2253
at Xamarin.Mac.Tests.MainClass/NSRunLoopIntegration.RunMainLoop () [0x00001] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs:79
at GuiUnit.TestRunner.ExecuteWithListener (string[],NUnitLite.Runner.TcpWriter) [0x0036f] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/GuiUnit/TestRunner.cs:234
at GuiUnit.TestRunner.Execute (string[]) [0x00093] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/GuiUnit/TestRunner.cs:137
at GuiUnit.TestRunner.Main (string[]) [0x00001] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/GuiUnit/TestRunner.cs:71
at Xamarin.Mac.Tests.MainClass.RunTests (string[]) [0x000a9] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs:56
at Xamarin.Mac.Tests.MainClass.Main (string[]) [0x00007] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs:35
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) [0x00051] in <4c10f2ab239246ba9514b976defa64c7>:0
Native stacktrace:
0 apitest 0x000000010c40b388 mono_handle_native_crash + 264
1 apitest 0x000000010c388dd6 altstack_handle_and_restore + 70
2 CoreFoundation 0x00007fff3b6f260b CFStringGetCString + 43
3 QTKit 0x00007fff457b6542 __51-[QTKitServerController startUsingServerForObject:]_block_invoke + 1238
4 libdispatch.dylib 0x00007fff67b4e63d _dispatch_client_callout + 8
5 libdispatch.dylib 0x00007fff67b5a129 _dispatch_lane_barrier_sync_invoke_and_complete + 60
6 QTKit 0x00007fff457b5f7a -[QTKitServerController startUsingServerForObject:] + 179
7 QTKit 0x00007fff457ac602 -[QTMovie_QuickTime initWithError:forParent:] + 98
8 QTKit 0x00007fff456f55b9 -[QTMovie initWithError:] + 59
9 apitest 0x000000010c31fbe9 xamarin_dyn_objc_msgSend + 217
10 ??? 0x0000000112791d05 0x0 + 4604894469
11 apitest 0x000000010c41f659 mono_jit_runtime_invoke + 1433
12 apitest 0x000000010c51a4df mono_runtime_invoke_checked + 127
13 apitest 0x000000010c522e70 mono_runtime_try_invoke_array + 1856
14 apitest 0x000000010c4be091 ves_icall_InternalInvoke + 657
15 ??? 0x0000000111abe261 0x0 + 4591444577
16 ??? 0x0000000114249463 0x0 + 4632908899
=================================================================
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.
=================================================================
1 failing types:
QTKit.QTMovie: Object reference not set to an instance of an object
introspection:
***** ApiCtorInitTest.DefaultCtorAllowed
Stacktrace:
at <unknown> <0xffffffff>
at (wrapper managed-to-native) ObjCRuntime.Messaging.IntPtr_objc_msgSend (intptr,intptr) [0x0000a] in <e8e733c9728c43cba731719f096ad306>:0
at QTKit.QTMovie..ctor () [0x00018] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/QTKit/QTMovie.g.cs:330
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <3ad39e28642b49d2a535a565e6bf6837>:0
at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) [0x00016] in <3ad39e28642b49d2a535a565e6bf6837>:0
at System.Reflection.MonoCMethod.InternalInvoke (object,object[],bool) [0x00005] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/MonoMethod.cs:667
at System.Reflection.MonoCMethod.DoInvoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x0007a] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/MonoMethod.cs:657
at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/MonoMethod.cs:689
at System.Reflection.ConstructorInfo.Invoke (object[]) [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/ConstructorInfo.cs:62
at Introspection.ApiCtorInitTest.DefaultCtorAllowed () [0x000f0] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/introspection/ApiCtorInitTest.cs:267
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <3ad39e28642b49d2a535a565e6bf6837>:0
at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) [0x00016] in <3ad39e28642b49d2a535a565e6bf6837>:0
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x0003b] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/referencesource/mscorlib/system/reflection/methodbase.cs:229
at NUnit.Framework.Internal.Reflect/<>c__DisplayClass9_0.<InvokeMethod>b__0 () [0x00000] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/Internal/Reflect.cs:226
at GuiUnit.InvokerHelper.Invoke () [0x0000e] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/GuiUnit/InvokerHelper.cs:18
at Foundation.NSActionDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/Foundation/NSAction.cs:62
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <3ad39e28642b49d2a535a565e6bf6837>:0
at <unknown> <0xffffffff>
at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend (intptr,intptr) [0x0000a] in <e8e733c9728c43cba731719f096ad306>:0
at AppKit.NSApplication.Run () [0x00012] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/AppKit/NSApplication.g.cs:2253
at Xamarin.Mac.Tests.MainClass/NSRunLoopIntegration.RunMainLoop () [0x00001] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs:79
at GuiUnit.TestRunner.ExecuteWithListener (string[],NUnitLite.Runner.TcpWriter) [0x0036f] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/GuiUnit/TestRunner.cs:234
at GuiUnit.TestRunner.Execute (string[]) [0x00093] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/GuiUnit/TestRunner.cs:137
at GuiUnit.TestRunner.Main (string[]) [0x00001] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/GuiUnit/TestRunner.cs:71
at Xamarin.Mac.Tests.MainClass.RunTests (string[]) [0x000a9] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs:56
at Xamarin.Mac.Tests.MainClass.Main (string[]) [0x00007] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs:35
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) [0x00051] in <83b8b910cba94191a35185713f274e89>:0
Native stacktrace:
0 introspection 0x0000000104e33388 mono_handle_native_crash + 264
1 introspection 0x0000000104db0dd6 altstack_handle_and_restore + 70
2 CoreFoundation 0x00007fff3b6f260b CFStringGetCString + 43
3 QTKit 0x00007fff457b6542 __51-[QTKitServerController startUsingServerForObject:]_block_invoke + 1238
4 libdispatch.dylib 0x00007fff67b4e63d _dispatch_client_callout + 8
5 libdispatch.dylib 0x00007fff67b5a129 _dispatch_lane_barrier_sync_invoke_and_complete + 60
6 QTKit 0x00007fff457b5f7a -[QTKitServerController startUsingServerForObject:] + 179
7 QTKit 0x00007fff457ac602 -[QTMovie_QuickTime initWithError:forParent:] + 98
8 QTKit 0x00007fff456f55b9 -[QTMovie initWithError:] + 59
9 introspection 0x0000000104d47be9 xamarin_dyn_objc_msgSend + 217
10 ??? 0x00000001073f6de5 0x0 + 4416564709
11 introspection 0x0000000104e47659 mono_jit_runtime_invoke + 1433
12 introspection 0x0000000104f424df mono_runtime_invoke_checked + 127
13 introspection 0x0000000104f4ae70 mono_runtime_try_invoke_array + 1856
14 introspection 0x0000000104ee6091 ves_icall_InternalInvoke + 657
15 ??? 0x00000001072bd011 0x0 + 4415279121
16 ??? 0x000000010c993d63 0x0 + 4506336611
=================================================================
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.
=================================================================
[FAIL] Default constructor not allowed for QTKit.QTMovie : Object reference not set to an instance of an object
* [XHarness] Ignore some tests that fail on device.
Added the ignore, which can be later removed on the new mono 2019-02
since the issues do not happen there.
Fixes: https://github.com/xamarin/maccore/issues/1495
* [XHarness] Ignore corlib tets failing on devices.
Added the required ignores to get the devices green and workaround mono
issue https://github.com/mono/mono/issues/13641
The internal runtime type was renamed: MonoModule -> RuntimeModule, MonoAssembly -> RuntimeAssembly
Also linker got smarter and removed unecessary types for WebKit_NSProxy.
This commit improves the state of the BCL testing in the following ways:
1. Improve the device tets running. Less apps, faster results.
2. WatchOS apps are left as they were to ensure that we do not have deplouyment/run issues.
We now support the ignore files per assembly name to simplify the
tracking of the ignored tests. All
This also centralize other interpreter checks and options in the same
location (making it easier to read / update).
* Warn and switch the REPL if the interpreter is enabled on simulator
Why ? It's confusing to build the same code using different options for
simulator and devices. This is what happens if you try to use features
like `dynamic` or `System.Reflection.Emit`.
So instead of an error, we warn that the interpreter is not supported
and switch to the existing REPL mode.
The JIT remains the only option for the simulator but it allows testing
features without a device.
* Fail early if the interpreter is used on 32bits [1]
The current interpreter only works on 64 bits (so ARM64). However the
error won't be reported, back to the developer, until deployment time.
This temporary [1] fix spot the condition very early and report an error
```
error MT0099 : Internal error : The interpreter is currently only available for 64 bits.
```
instead of the current one at deploy time
```
IncorrectArchitecture: Failed to find matching arch for 32-bit Mach-O input file /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.tNKDlx/extracted/X.app/X
error MT1006: Could not install the application 'X.app' on the device 'Mercure': AMDeviceSecureInstallApplicationBundle returned: 0xe8000087 (kAMDIncorrectArchitectureError).
Application could not be uploaded to the device.
```
[1] https://github.com/mono/mono/issues/9871
* [tests] Fix/renumbered MT0138
The test was using simulator + interpreter which is not _really_
possible, we use REPL in that case - so we're now checking if
assemblies were specified with `--interpreter` to cover both cases.
Also 0138 was already used by `mmp` and the warning was **not**
registered or documented in the errors documents. To avoid
confusion it has been renumbered to 0142 and documented.
mscorlib.dll now has InternalsVisibleTo to System.Net.Http.dll which causes
> Friend access was granted to `System.Net.Http, PublicKeyToken=b03f5f7f11d50a3a', but the output assembly is named `System.Net.Http, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
Switch to System.Xml.dll instead for these tests.
* [Foundation] Add an NSArray.FromNSObjects overload that can take an array of INativeObjects.
* [runtime] Use mono_array_setref instead of mono_array_set.
Otherwise the GC won't know about the assignment, and the assigned value can
be freed if it's no longer referenced anywhere else.
document it and adjust the optimization tests.
This allows the optimization to be:
* disabled (if ever needed) on fully AOT'ed applications
* re-enabled for the interpreter (at your own risk)