Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Burst errors
#1
I have been upgrading from Unity 2019 to 2022.3.8f1

I started getting errors from Obi Rope so installed ECS, Burst and a number of dependencies.   

I am now getting this error:
Assets\Plugins\Obi\Scripts\Common\Backends\Burst\DataStructures\NativeMultilevelGrid.cs(74,46): error CS1061: 'UnsafeList<K>' does not contain a definition for 'length' and no accessible extension method 'length' accepting a first argument of type 'UnsafeList<K>' could be found (are you missing a using directive or an assembly reference?)

I have Collections 2.1.4 installed
Reply
#2
(01-09-2023, 12:23 PM)redrag Wrote: I have been upgrading from Unity 2019 to 2022.3.8f1

I started getting errors from Obi Rope so installed ECS, Burst and a number of dependencies.   

I am now getting this error:
Assets\Plugins\Obi\Scripts\Common\Backends\Burst\DataStructures\NativeMultilevelGrid.cs(74,46): error CS1061: 'UnsafeList<K>' does not contain a definition for 'length' and no accessible extension method 'length' accepting a first argument of type 'UnsafeList<K>' could be found (are you missing a using directive or an assembly reference?)

I have Collections 2.1.4 installed

It is a syntax error in the script. Open NativeMultilevelGrid.cs in 74,46 and change "length" for "Length"
Reply
#3
(01-09-2023, 06:42 PM)SimonP Wrote: It is a syntax error in the script. Open NativeMultilevelGrid.cs in 74,46 and change "length" for "Length"
That solved that error.

I now have another issue with burst.  I am getting an error in ObiNativeList:
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            // dispose of atomic safety handle:
            AtomicSafetyHandle.CheckDeallocateAndThrow(m_SafetyHandle);
            AtomicSafetyHandle.Release(m_SafetyHandle);
#endif


System.ObjectDisposedException: The UNKNOWN_OBJECT_TYPE has been deallocated, it is not allowed to access it
  at (wrapper managed-to-native) Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckDeallocateAndThrow_Injected(Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle&)
  at Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckDeallocateAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) [0x00000] in <10871f9e312b442cb78b9b97db88fdcb>:0
  at Obi.ObiNativeList`1[T].Dispose (System.Boolean disposing) [0x0003d] in F:\Unity Projects\Unity 2022\eSailSimulatorUnity_3.0\Assets\Plugins\Obi\Scripts\Common\DataStructures\NativeList\ObiNativeList.cs:110
  at Obi.ObiNativeList`1[T].Finalize () [0x00002] in F:\Unity Projects\Unity 2022\eSailSimulatorUnity_3.0\Assets\Plugins\Obi\Scripts\Common\DataStructures\NativeList\ObiNativeList.cs:90

After this I have tried adding the Jobs package as described here:

http://obi.virtualmethodstudio.com/manua...kends.html

However according to Unity Jobs is now included in Collections:
Changelog | Jobs | 0.70.0-preview.7 (unity3d.com)

In your backends documentation the options offered under Jobs menu are completely different.
Reply
#4
(18-09-2023, 12:47 PM)redrag Wrote: That solved that error.

I now have another issue with burst.  I am getting an error in ObiNativeList:
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            // dispose of atomic safety handle:
            AtomicSafetyHandle.CheckDeallocateAndThrow(m_SafetyHandle);
            AtomicSafetyHandle.Release(m_SafetyHandle);
#endif


System.ObjectDisposedException: The UNKNOWN_OBJECT_TYPE has been deallocated, it is not allowed to access it
  at (wrapper managed-to-native) Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckDeallocateAndThrow_Injected(Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle&)
  at Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckDeallocateAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) [0x00000] in <10871f9e312b442cb78b9b97db88fdcb>:0
  at Obi.ObiNativeList`1[T].Dispose (System.Boolean disposing) [0x0003d] in F:\Unity Projects\Unity 2022\eSailSimulatorUnity_3.0\Assets\Plugins\Obi\Scripts\Common\DataStructures\NativeList\ObiNativeList.cs:110
  at Obi.ObiNativeList`1[T].Finalize () [0x00002] in F:\Unity Projects\Unity 2022\eSailSimulatorUnity_3.0\Assets\Plugins\Obi\Scripts\Common\DataStructures\NativeList\ObiNativeList.cs:90

Hi,

I'm unable to reproduce this issue. Could you share the exact Unity/Collections/Burst package versions you're using?

Quote:In your backends documentation the options offered under Jobs menu are completely different.

In what way are they different? these options are part of Unity (specifically, the Collections and Burst packages), Obi doesn't affect/control the contents of that menu in any way. Could you share a screenshot of your menu?
Reply
#5
(18-09-2023, 01:57 PM)josemendez Wrote: Hi,

I'm unable to reproduce this issue. Could you share the exact Unity/Collections/Burst package versions you're using?


In what way are they different? these options are part of Unity (specifically, the Collections and Burst packages), Obi doesn't affect/control the contents of that menu in any way. Could you share a screenshot of your menu?

Unity 2022.3.8f1
Collections 2.1.4
Burst 1.8.8

   
Reply
#6
(18-09-2023, 03:45 PM)redrag Wrote: Unity 2022.3.8f1
Collections 2.1.4
Burst 1.8.8

What's missing is the Jobs options, specifically: the ability to toggle the "Jobs Debugger" on/off, memory "Leak detection" on/off and "Use Job Threads" to turn multithreading on/off. These options normally appear when installing the Jobs package.

If according to Unity Jobs has been now fused together with Collections in newer versions, these options should appear when installing Collections. I'd ask in Unity's Burst forum to see whether they're supposed to appear now that both packages have been merged together.

kind regards,
Reply
#7
(19-09-2023, 08:45 AM)josemendez Wrote: What's missing is the Jobs options, specifically: the ability to toggle the "Jobs Debugger" on/off, memory "Leak detection" on/off  and "Use Job Threads" to turn multithreading on/off. These options normally appear when installing the Jobs package.

If according to Unity Jobs has been now fused together with Collections in newer versions, these options should appear when installing Collections. I'd ask in Unity's Burst forum to see whether they're supposed to appear now that both packages have been merged together.

kind regards,

I have posted that - let's hope we get some answers soon.  In the meantime do you have the versions of the latest successful implementation of burst, collections etc.?
Reply
#8
I have a reply that these settings are now under Preferences/Jobs.  However it says there that "For safety, these values are reset on editor restart'.   That is not great.   But also are we not losing benefit of jobs by turning off multi-threading?
Reply
#9
(26-09-2023, 02:49 PM)redrag Wrote: But also are we not losing benefit of jobs by turning off multi-threading?

Turning off multi-threading will result in the code being executed on the main thread only. You're looking at roughly 8 times slower code with multi-threading turned off on an 8-core machine, losing all benefits from using jobs.

However, multithreading is enabled by default as far as I know? it makes no sense whatsoever for it to be disabled on editor restart, and certainly not to disable it manually except for debugging purposes.

Safety checks and the jobs debugger are however enabled by default, and you'll get a moderate performance boost by disabling them. This allows Burst to stop doing runtime checks and injecting profiling/debugging code which cripple performance.
Reply