When creating a job with NativeList as data type, the editor just crashes.
Is there a workaround or am I doing something wrong?
var temp = new NativeList<FixedList4096Bytes<float>>(1000, Allocator.TempJob);
for (var i = 0; i < 800; i++) {
temp.Add(new FixedList4096Bytes<float>());
}
var job = new BurstTest {
BeltPositionsF = temp
};
var jh = job.Schedule(temp.Length, 100);
jh.Complete();
[BurstCompile]
public struct BurstTest : IJobParallelFor {
public NativeList<FixedList4096Bytes<float>> BeltPositionsF;
public void Execute(int index) { }
}
After some testing, it seems that the creation of the NativeList<FixedList<>> crashes Unity, even before the job is scheduled.
After some more testing I found the Unity Editor reports
* Assertion at memory-access.c:122, condition `size < MAX_INLINE_COPY_SIZE' not met
I assume it’s related to
opened 06:35PM - 22 Jul 20 UTC
area-Runtime: AOT
_From @james-allison on Sun, 05 Jul 2020 21:51:22 GMT_
<!--
Please fill in… the *entire* template below.
The template is designed to avoid unnecessary delays to confirm and fix reported issues. Issues with missing information generally end up with a `need-info` label and take significantly more time to fix. Please help us help you!
For more information see https://github.com/xamarin/xamarin-macios/wiki/Submitting-Bugs-&-Suggestions
For support requests use https://www.xamarin.com/support
-->
### Steps to Reproduce
1. Build project for iPhone hardware *without* the LLVM compiler
2. Build fails with Xamarin.iOS.Common.targets(842,3): error MT3001: Could not AOT the assembly [Executable name].
2a. Diagnostic logging reveals AOT Compilation exited with code 134. Assertion at mono/mini/memory-access.c:122, condition `size < MAX_INLINE_COPY_SIZE' not met
### Expected Behavior
Build completes and the world is good.
### Actual Behavior
Only builds using the LLVM optimizing compiler succeed - (which means I can not debug my project on iOS).
This used to build fine on Visual Studio 16.5.x - I think it broke (along with so many other things) switching to 16.6.x. I've tried upgrading the version of Xamarin.iOS.pkg on the mac to 13.20.1.18, but the error remains identical to the version that ships with 16.6.3 (13.18.2.1)
Looking at the source for the assertion location in the mono repo (https://github.com/mono/mono/blob/master/mono/mini/memory-access.c) - it is preceded with the comment ```/*FIXME arbitrary hack to avoid unbound code expansion.*/``` - which doesn't fill me with confidence.
### Environment
<!--
1.
Visual Studio: Help > About Microsoft Visual Studio > Copy Info [button]
Visual Studio for Mac: Visual Studio > About Visual Studio > Show Details > Copy Information [button]
2. Paste into the code block below (between ```)
-->
```
Microsoft Visual Studio Enterprise 2019 (2)
Version 16.6.3
VisualStudio.16.Release/16.6.3+30225.117
Microsoft .NET Framework
Version 4.8.04084
Installed Version: Enterprise
Visual C++ 2019 00433-90000-00004-AA111
Microsoft Visual C++ 2019
ASP.NET and Web Tools 2019 16.6.954.58314
ASP.NET and Web Tools 2019
ASP.NET Core Razor Language Services 16.1.0.2020603+b3ac44798c16fff5b95dbcfe62dea84aa9a1bd72
Provides languages services for ASP.NET Core Razor.
ASP.NET Web Frameworks and Tools 2019 16.6.954.58314
For additional information, visit https://www.asp.net/
Azure App Service Tools v3.0.0 16.6.954.58314
Azure App Service Tools v3.0.0
Azure Functions and Web Jobs Tools 16.6.954.58314
Azure Functions and Web Jobs Tools
C# Tools 3.6.0-4.20251.5+910223b64f108fcf039012e0849befb46ace6e66
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Extensibility Message Bus 1.2.0 (d16-2@8b56e20)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.
IntelliCode Extension 1.0
IntelliCode Visual Studio Extension Detailed Info
JetBrains ReSharper Ultimate 2020.1.3 Build 201.0.20200515.122017
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2020 JetBrains, Inc.
Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 2019 - v2.9.30212.1
Microsoft Continuous Delivery Tools for Visual Studio 0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft Library Manager 2.1.50+g25aae5a24a.R
Install client-side libraries easily to any web project
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual C++ Wizards 1.0
Microsoft Visual C++ Wizards
Microsoft Visual Studio Tools for Containers 1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.
Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package
Mono Debugging for Visual Studio 16.6.17 (9692114)
Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 5.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info
Snapshot Debugging Extension 1.0
Snapshot Debugging Visual Studio Extension Detailed Info
SQL Server Data Tools 16.0.62006.03190
Microsoft SQL Server Data Tools
Test Adapter for Boost.Test 1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.
Test Adapter for Google Test 1.0
Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.
TypeScript Tools 16.0.20417.2002
TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 3.6.0-4.20251.5+910223b64f108fcf039012e0849befb46ace6e66
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual C++ for Cross Platform Mobile Development (Android) 16.0.30014.67
Visual C++ for Cross Platform Mobile Development (Android)
Visual C++ for Linux Development 1.0.9.30223
Visual C++ for Linux Development
Visual F# Tools 10.9.1.0 for F# 4.7 16.6.0-beta.20217.4+1c969cac25e2d38d71872efe6c8226029e42bb59
Microsoft Visual F# Tools 10.9.1.0 for F# 4.7
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio Container Tools Extensions (Preview) 1.0
View, manage, and diagnose containers within Visual Studio.
Visual Studio Tools for CMake 1.0
Visual Studio Tools for CMake
Visual Studio Tools for Containers 1.0
Visual Studio Tools for Containers
VisualStudio.DeviceLog 1.0
Information about my package
VisualStudio.Foo 1.0
Information about my package
VisualStudio.Mac 1.0
Mac Extension for Visual Studio
Xamarin 16.6.000.1062 (d16-6@41e1f0e)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 16.6.0.318 (remotes/origin/d16-6@66afc5421)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin Templates 16.6.40 (1f1466f)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.
Xamarin.Android SDK 10.3.1.4 (d16-6/3a10de9)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: 165f4b0
Java.Interop: xamarin/java.interop/d16-6@2cab35c
ProGuard: xamarin/proguard/master@905836d
SQLite: xamarin/sqlite/3.31.1@49232bc
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-6@bfb66f3
Xamarin.iOS and Xamarin.Mac SDK 13.18.2.1 (29c4ea7)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
```
### Build Logs
<!--
1. Place cursor below this comment block.
2. Attach build log or link to gist (https://gist.github.com/) of the log.
3. Logs can be found in the Build Output tab of the Errors pad in Visual Studio
To get full build logs, set the log verbosity to diagnostic at the following locations:
- On Visual Studio for Mac: Preferences > Projects > Build
- On Visual Studio for Windows: Tools > Options > Projects and Solutions > Build and Run
On Visual Studio for Windows you also want to add `-v -v -v -v` to the mtouch additional arguments by right-clicking the project in the solution explorer and selecting `Properties`.
-->
[murmur-ios.log](https://github.com/xamarin/xamarin-macios/files/4875671/murmur-ios.log)
### Example Project (If Possible)
<!--
1. Place cursor below this comment block.
2. Drag and drop the compressed project or files needed to reproduce.
-->
Happy to share the obj/Debug folder for the build privately to allow you to reproduce - please get in touch.
<!--
Switch to the "Preview" tab to ensure your issue renders correctly.
-->
_Copied from original issue xamarin/xamarin-macios#9009_
which mentions this src code
Since it’s called “inline copy” I assume that structs/etc inside of NativeArray can only be
#define MAX_INLINE_COPY_SIZE 10000
/*FIXME arbitrary hack to avoid unbound code expansion.*/
g_assert (size < MAX_INLINE_COPY_SIZE);
(10kb) long? But I’m just guessing.
I have opened a issue: IN-82502