Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Accessing functions in the rdotnet dll causes Editor Crash in ntdll.dll

Discussion in 'Experimental Scripting Previews' started by jugdemon, Nov 17, 2016.

  1. jugdemon

    jugdemon

    Joined:
    Dec 17, 2014
    Posts:
    8
    I am trying to communicate with the R-installation on my computer and the dll rdotnet needs c#4.6 so I was happy when I read that unity now features that. So I tried loading the dll and it can be recognised and causes no errors. However, when I try to initialise the connection with:

    Code (csharp):
    1. REngine rEngine = REngine.GetInstance();
    the editor crashes without any warning. The visual studio debugger mode allowed me to glimpse at the crash location:

    Unhandled exception at 0x00007FFE49487423 (ntdll.dll) in Unity.exe: 0xC0000374: A heap has been corrupted (parameters: 0x00007FFE494DF6B0).

    I am not sure whether the beta editor produced a log file I can attach (a quick check didn't show me any).
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,930
    Can you submit a bug report with this project? We should be able to track down the cause of the crash then. Note that the preview build of the editor does not ship with the bug reporter, so please submit the bug report from another version of Unity, and let me know the bug number. Thanks!
     
    jugdemon likes this.
  3. jugdemon

    jugdemon

    Joined:
    Dec 17, 2014
    Posts:
    8
    The bug is filed under Case 852223. I included a minimum failure project consisting of the dlls and the test-class.
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,930
    Thanks! I've routed the bug to the proper place - we will have a look at it and let you know via the bug report what we determine.
     
  5. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,930
    We have correct this issue now, the fix should be available in the next preview build.
     
  6. jugdemon

    jugdemon

    Joined:
    Dec 17, 2014
    Posts:
    8
    Hey Josh,

    I am happy to hear that you fixed this. From the 5.6 Beta I cannot see whether it also has the 4.6 incorporated. Where can I test the working library?

    Also, we were wondering how long you think it will take you for either getting 4.6 added to the standard release or to get build-features in the beta?

    Best wishes,
    jugdemon
     
  7. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,930
    We don't have .NET 4 support yet in the Unity 5.6 beta. In fact, we're not planning to release it in 5.6 at all. It will be in an upcoming Unity release, but we're not yet should which release.

    For the moment, you cannot test this fix. However, we're working on a new preview build of .NET 4 support now - when that is released on this forum section you should be able to confirm that this issue is corrected.
     
  8. MarcKat

    MarcKat

    Joined:
    Oct 29, 2020
    Posts:
    1
    Did you get RdotNet running with unity?