techl / MonoRemoteDebugger

Other
83 stars 18 forks source link

System.DllNotFoundException: libc #55

Open qqq-tech opened 4 years ago

qqq-tech commented 4 years ago

Installed product versions

Description

when i run remote debuuger, i can't run program. because of the error below.

System.DllNotFoundException: libc

Steps to recreate

  1. Replace this
  2. text with
  3. the steps
  4. to recreate

Current behavior

Explain what it's doing and why it's wrong

Expected behavior

Explain what it should be doing after it's fixed.

techcap commented 4 years ago

Please check with the Hello World.

qqq-tech commented 4 years ago

I found out that we need to set the DISPLAY environment variable in the gui program. How can I set it up?

techcap commented 4 years ago

I tested only on Console Application. Could you share the detail information for UI application?

qqq-tech commented 4 years ago

It is a common winform program with one text label(.NET 4.6) and I run it on Raspberry Pi 3 B+.

I checked th same error from remote debugger when there was no DISPLAY environment in the ssh terminal. so I want to test it by applying the DISPLAY environment.

nub1604 commented 4 years ago

Today, I've got this problem too, but in a Display Environment.

Hardware

Installed product versions

Project Information

Exception on remote debugging:

Unhandled Exception: System.TypeInitializationException: The type initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Forms.ThemeEngine' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Forms.ThemeWin32Classic' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Drawing.KnownColors' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception. ---> System.DllNotFoundException: libc at (wrapper managed-to-native) System.Drawing.GDIPlus.uname(intptr) at System.Drawing.GDIPlus..cctor () [0x0006e] in <2bb3052119444fb7807d658e27511cb1>:0 --- End of inner exception stack trace --- at System.Drawing.KnownColors..cctor () [0x0001a] in <2bb3052119444fb7807d658e27511cb1>:0 --- End of inner exception stack trace ---

Workaround I've tried some older releases and I found that the Server Release 1.30 works fine in this case

techcap commented 4 years ago

I found reproducing step. It looks like the problem related to linux terminal or mono. I need to figure out.

BryanCrotaz commented 4 years ago

You can reproduce with

using System;

namespace TestConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World");
        }
    }
}

It can't find System.Native

mono 6.8.0.123 on Pi 3B apt-get install mono-complete

R10Rasmus commented 4 years ago

I get "System.DllNotFoundException: libc..." if I remote debug my program on raspberry pi zero. I do not get this error when I run it local on the raspberry pi zero.

I get the error, when I use System.Device.Gpio functions, which needs libc installed.

karpatidaniel commented 2 years ago

I think I had similar issue:

MonoRemoteDebugger.Server v1.5.2
2022-01-24 20:47:56.1172|TRACE|MonoRemoteDebugger.SharedLib.Server.MonoUtils|Platform=Unix, GetMonoPath=mono, GetMonoXsp4=xsp4, GetPdb2MdbPath=pdb2mdb
Mono pdb to mdb debug symbol store converter
Usage: pdb2mdb assembly
2022-01-24 20:47:56.3011|TRACE|MonoRemoteDebugger.SharedLib.Server.MonoDebugServer|Start announcing
2022-01-24 20:47:56.4050|INFO|MonoRemoteDebugger.SharedLib.Server.MonoDebugServer|Waiting for client
2022-01-24 20:48:06.1496|INFO|MonoRemoteDebugger.SharedLib.Server.MonoDebugServer|Accepted client: ****:****
2022-01-24 20:48:06.1828|TRACE|MonoRemoteDebugger.SharedLib.Server.ClientSession|New Session from ****
2022-01-24 20:48:06.5476|INFO|MonoRemoteDebugger.SharedLib.Server.ClientSession|DebugLastContent-Message received
2022-01-24 20:48:06.5499|TRACE|MonoRemoteDebugger.SharedLib.Server.ClientSession|Check if content is already available from ****: /home/pi/MonoRemoteDebugger.Server/Temp/F8B93E30DFBF651B1499EA03ADF73919F3820CA9DAF20374DA24B92FBAA9A92D

Unhandled Exception:
System.TypeInitializationException: The type initializer for 'System.Windows.Forms.XplatUI' threw an exception. ---> System.DllNotFoundException: libc assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) System.Windows.Forms.XplatUI.uname(intptr)
  at System.Windows.Forms.XplatUI..cctor () [0x0008e] in <6d635ac3dc1c4424ad385ded79f1e868>:0 
   --- End of inner exception stack trace ---
  at System.Windows.Forms.Application.EnableVisualStyles () [0x00006] in <6d635ac3dc1c4424ad385ded79f1e868>:0

Then I rolled back to version 1.3.0 and no issues further.