Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by MalikDrako · Dec 14, 2017 at 06:16 PM · crashnative pluginlinux editor

Editor crash "allocation 0x0xc000000000000000 already registered"

I am trying to integrate libfreenect2 and freenect2.net wrapper but I am getting a strange crash that only happens in the Linux editor for my main project. The Windows editor, and Windows and Linux standalone all work fine. I am using editor version 2017.2.0f3. The crash happens almost instantly after I call device = new Device(0); to initialize the Kinect device. There is an error in the console, then the editor itself closes.

I tried copying just the code that interacts with the Kinect to a new project, and it worked there. How can I find the cause of the crash? Or am I stuck copying pieces one at a time to a new project until it starts crashing?

Relevant bits of scripts:

 //KinectManager2.cs
 void Start () {
     depthSources = GetComponents<DepthSourceBase>();
     Array.Sort(depthSources, delegate (DepthSourceBase a, DepthSourceBase b) { return a.Priority.CompareTo(b.Priority); });
     foreach (DepthSourceBase source in depthSources)
     {
         if (source.enabled && source.InitDepthSource())
         {
             activeDepthSource = source;
             break;
         }
     }
 }

 //KinectTwoDepthSource.cs
 public override bool InitDepthSource()
 {
     try
     {
         if (Device.Count > 0)
         {                 
             device = new Device(0);
             foundKinect = true;
             Width = device.DepthFrameSize.Width;
             Height = device.DepthFrameSize.Height;

             raw = new float[Width * Height];
             averageDepth = new float[Width * Height];
             averageDepthCount = new int[Width * Height];
             for (int i = 0; i < depthBuffer.Length; i++)
             {
                 depthBuffer[i] = new float[Width * Height];
                 for (int j = 0; j < depthBuffer[i].Length; j++)
                 {
                     depthBuffer[i][j] = float.NaN;
                 }
             }

             device.FrameReceived += Handle_KinectTwo_DataReceived;
             return true; 
         }
     }
     catch (DllNotFoundException) { }
     return false;
 }

Here is the Editor.log from right before initializing the device. I'm not sure why it is complaining about the .so files, since they are all in Assets/Plugins/Libfreenect2/Linux and it must find them if it gets past if (Device.Count > 0)

 Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/Libfreenect2/Linux/libfreenect2c.so
 Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/Libfreenect2/Linux/libfreenect2c.so
 Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/Libfreenect2/Linux/libfreenect2c.so
 Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/Libfreenect2/Linux/libfreenect2c.so
 /home/builduser/buildslave/unity/build/Editor/Platform/Linux/UndoPlatformDependent.cpp:SetUndoMenuNamePlatformDependent
 [Info] [Freenect2Impl] enumerating devices...
 [Info] [Freenect2Impl] 14 usb devices connected
 [Info] [Freenect2Impl] found valid Kinect v2 @4:13 with serial 006147365347
 [Info] [Freenect2Impl] found 1 devices
 Found device
 UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
 UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
 UnityEngine.Logger:Log(LogType, Object)
 UnityEngine.Debug:Log(Object)
 KinectTwoDepthSource:InitDepthSource() (at Assets/Script/Kinect/KinectTwoDepthSource.cs:85)
 KinectManager2:Start() (at Assets/Script/Kinect/KinectManager2.cs:30)
  
 (Filename: Assets/Script/Kinect/KinectTwoDepthSource.cs Line: 85)

 Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/Libfreenect2/Linux/libfreenect2c.so
 Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/Libfreenect2/Linux/libfreenect2c.so
 Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/Libfreenect2/Linux/libfreenect2c.so
 Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/Libfreenect2/Linux/libfreenect2c.so
 [Info] [Freenect2DeviceImpl] opening...
 [Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 20*16384 ir: 60*8*33792
 [Info] [Freenect2DeviceImpl] opened
 Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/x86_64/libfreenect.so
 Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/x86_64/libfreenect.so
 Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/x86_64/libfreenect.so
 Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/x86_64/libfreenect.so
 Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/x86_64/libfreenect.so
 Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/x86_64/libfreenect.so
 The specified identifier (BoxDimensions) does not exists. please use Exists () to check for existent before calling Load.
 returning the default(T) instance.
 UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
 UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
 UnityEngine.Logger:LogFormat(LogType, String, Object[])
 UnityEngine.Debug:LogWarningFormat(String, Object[])
 BayatGames.SaveGameFree.SaveGame:Load(String, String, Boolean, String, ISaveGameSerializer, ISaveGameEncoder, Encoding, SaveGamePath) (at Assets/BayatGames/SaveGameFree/Scripts/SaveGame.cs:624)
 BayatGames.SaveGameFree.SaveGame:Load(String, String) (at Assets/BayatGames/SaveGameFree/Scripts/SaveGame.cs:439)
 CalibrationManager:Start() (at Assets/Script/Calibration/CalibrationManager.cs:146)
  
 (Filename: Assets/BayatGames/SaveGameFree/Scripts/SaveGame.cs Line: 624)

 InvalidCastException: Specified cast is not valid.
   at CalibrationManager.InitTextureDisplay () [0x000d6] in /home/adminz/AR-Sandbox-master/Assets/Script/Calibration/CalibrationManager.cs:256 
   at CalibrationManager.Start () [0x00653] in /home/adminz/AR-Sandbox-master/Assets/Script/Calibration/CalibrationManager.cs:233 
  
 (Filename: Assets/Script/Calibration/CalibrationManager.cs Line: 256)

 allocation 0x0xc000000000000000 already registered @ /home/builduser/buildslave/unity/build/Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:l234 size 24000; now calling from /home/builduser/buildslave/unity/build/Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:l234 size 3000?
  
 (Filename: /home/builduser/buildslave/unity/build/Runtime/Allocator/MemoryManager.cpp Line: 1464)

 Receiving unhandled NULL exception
 #0  0x007fb6d22aeac0 in funlockfile
 #1  0x007ffeb1f58920 in _nv042glcore
 #2  0x007ffeb1f58960 in _nv042glcore
 #3  0x007ffeb1f58a70 in _nv023glcore
 #4  0x007ffeb1f58ab0 in GfxDeviceGLES::DrawBufferRanges(GfxBuffer*, VertexStreamSource const*, int, DrawBuffersRange const*, int, VertexDeclaration*, ShaderChannelMask, unsigned long, bool)
 #5  0x007ffeb1f58b80 in GfxDeviceGLES::DrawBuffers(GfxBuffer*, VertexStreamSource const*, int, DrawBuffersRange const*, int, VertexDeclaration*, ShaderChannelMask)
 #6  0x007ffeb1f58c00 in UI::Canvas::DrawRawMesh(UI::Batch&, GfxBuffer*, GfxBuffer*)
 #7  0x007ffeb1f58c90 in UI::Canvas::RenderOverlays()
 #8  0x007ffeb1f58ce0 in UI::CanvasManager::RenderOverlays(int)
 #9  0x007ffeb1f58d30 in RepaintController::RenderGameViewCameras(RenderTexture*, int, RectT<float> const&, Vector2f const&, bool)
 #10 0x007ffeb1f58e30 in EditorGUIUtility_CUSTOM_INTERNAL_CALL_RenderGameViewCamerasInternal(MonoObject*, int, RectT<float> const&, Vector2fIcall const&, unsigned char)
 #11 0x007ffeb1f58e90 in (Unknown)
 #12 0x007ffeb1f58ea0 in (Unknown)
 #13 0x007ffeb1f58eb0 in mono_get_jit_info_from_method
 #14 0x007ffeb1f597c0 in mono_g_hash_table_print_stats
 #15 0x007ffeb1f597f0 in mono_runtime_run_main
 #16 0x007ffeb1f598a0 in mono_unity_register_path_remapper
 #17 0x007ffeb1f59970 in (Unknown)
 #18 0x007ffeb1f59980 in (Unknown)
 #19 0x007ffeb1f59990 in (Unknown)
 Launching bug reporter

 [Unity Package Manager (Upm)] - Application terminated due to HTTP connection being closed on the other end.




Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

77 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Game Always Crashes On Some Android Devices 0 Answers

Unity 2019.3.5f1 Android Build (IL2CPP) crash Log 0 Answers

functional multithreaded c++ code crashes if executed in Unity as native plugin 1 Answer

Andriod native plugin: AndroidAdMob.Client.CreateAdBanner not working 0 Answers

Native plugin device not created with D3D11_CREATE_DEVICE_BGRA_SUPPORT on deploy only 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges