Search Issue Tracker
By Design
Votes
0
Found in
2022.3.60f1
6000.0.44f1
6000.1.0b11
6000.2.0a7
Issue ID
UUM-100750
Regression
No
[Linux] Crash on System.Runtime.InteropServices.Marshal:copy_from_unmanaged_fixed when accessing shared memory
Reproduction steps:
1. Open the attached “IN-97299” project
2. Enter the Play Mode
OR
2. Build and run the project (File > Build And Run)
3. Observe the Player
Expected result: Editor or Player runs without issues
Actual result: Editor and Player crashes
Reproducible with: 2022.3.60f1, 6000.0.44f1, 6000.1.0b11, 6000.2.0a7
Reproducible on: Ubuntu 24.04
Not reproducible on: No other environment tested
First lines of the stack trace:
#2 0x007f100120ca80 in __memmove_avx_unaligned_erms
#3 0x007f0ee11ee69e in (Unknown)
#4 0x007f0ee11d5806 in (Unknown)
#5 0x000000405fbc61 in (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:copy_from_unmanaged_fixed (intptr,int,System.Array,int,void*)
#6 0x00000040637817 in System.Runtime.InteropServices.Marshal:Copy (intptr,byte[],int,int)
#7 0x00000041a57df3 in FrameReceiver:Update ()
#8 0x00000040f22e85 in (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Editor Perforce login fails when Perforce shows a license expiry warning
- Assertion failed error in HDRP builds when enabling STP via script
- FBX Resamples Curves incorrectly when importing FBX files
- ProBuilder GameObject Faces disappear when increasing the Sides Count value
- FileUtil.CopyFileOrDirectory throws IOException when destination parent folder does not exist
Resolution Note:
The sample provided is calling Marshal.Copy with -1 as the source pointer.
Reading through the log files provided with the bug repo it appears that the call to shmat is failing to map the memory and sharedMemory is set to -1. In the Update call the if check does not account for the -1 case, only 0, and allows the call to proceed to copy. This is raising the crash.