question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I got error code -2146233079 on abort when I tried to load runtime

See original GitHub issue

Thanks for wonderful API for calling managed code from native code. I’m trying to use C# with Java with JNI, DNNE. So, I made some wrapper code for that:

#include "library.h"

JNIEXPORT void JNICALL Java_me_ddayo_minecraftchangaeyeon_JNI_dotnetInit() {
    dotnet_init();
}

And also, I made some managed C# code like this:

using System.Runtime.InteropServices;

namespace DNNELib;

public class Exported
{
    [UnmanagedCallersOnly(EntryPoint = "dotnet_init")]
    public static void Init()
    {
        
    }
}

dotnet_init exported fine due I’m able to compile those all. I got exit code 6 when I call that JNI method. Maybe the wrong place will be part of DNNE because, when I remove dotnet_init(), it works excepted. I tried to use override.c and I got those error code: 2, -2146233079 I have no idea what this code means.

Thank you!

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
AaronRobinsonMSFTcommented, Dec 25, 2022

@dayo05 It seems you are hitting https://github.com/dotnet/runtime/issues/43036. The solution here is to also link against the pthread lib at https://github.com/dayo05/DNNE138/blob/79321691b4f4ae04ccad471084f51ca3d284af49/cpp/CMakeLists.txt#L7.

That line should be updated as follows:

- link_libraries( /home/dayo/minecraftchangaeyeon/dotnet/DNNELib/DNNELib/bin/Debug/net6.0/linux-x64/libDNNELibNE.so )
+ link_libraries( /home/dayo/minecraftchangaeyeon/dotnet/DNNELib/DNNELib/bin/Debug/net6.0/linux-x64/libDNNELibNE.so pthread )

Please let me know if this fixes your issue so I can push on the associated issue in dotnet/runtime.

0reactions
AaronRobinsonMSFTcommented, Jan 24, 2023

@apekros I don’t think so, but that could be based on what runtime is being targeted. Are you targeting 5, 6 or 7?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Code: 2146233079
Error Code: 2146233079. The request was aborted: Could not create SSL/TLS secure channel. How can I correct? This thread is locked.
Read more >
How to overcome Error#2146233079: Automation error?
It is -2146233079. Which is a managed exception code, 0x80131509, it means InvalidOperationException. You will need to debug it. – Hans Passant.
Read more >
Run-time Error -2146233079 (80131509) - Login
“Run-time Error -2146233079 (80131509): Unable to connect to the remote server” While Trying to Upload to HealthVault from ExamWRITER.
Read more >
FIX SCCM Update Not Available Issue Error 2146233079
Let's try to fix SCCM update not available issue with error 2146233079. If you cannot see the latest SCCM updates in the console, ......
Read more >
Package publishing failed Code -2146233079 Error ...
Summary. The above error occurs while publishing package due to WSUS certificate missing Private key. Symptoms. Failed to publish package Code -2146233079
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found