Mono on ARM linux - c#

i've crosscompile Mono for embedded linux on ARM9 processor.
But when i try to compile my first c# program "Hello world" i receive this
output from Mono:
Native stacktrace:
Debug info from gdb:
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Aborted
I've googled but my problem is too generic.
Can someone explain the problem ?
Can i crosscompile the example file on pc (with Mono-arm compiler) end run
the binary on embedded-arm ?
i'll try to recompile without Mono-debugger.
Thanks

Related

System.DllNotFoundException: msmpi.dll not found on OS X

I wanted to run an example using C# and MPI.NET (https://github.com/mpidotnet/MPI.NET).
I found some sources on StackOverflow that I should install open-mpi via homebrew. I did this.
I also have Mono installed, and after building the project with msbuild, I try to run Hello.exe with the following command:
mpiexec -np 2 mono Hello.exe
I get the exception System.DllNotFoundException: msmpi.dll assembly, which is straightforward. The problem is I don't know where to find this DLL, or whether some other mistake might be causing it.

C# compiled .exe System.IO.FileNotFOundException

(Environment = Windows 10 1803, program type is .exe)
I have written a program to be used across different computers at work, however, When i try to run the compile program from anyone elses machine other than my own (and my fellow IT coworkers), I end up with this error:
(From event viewer)
Event 1026, .NET Runtime Application: program123.exe Framework Version
v4.0.30.319 Description: The process was terminated due to an
unhandled exception. Exception Info: System.IO.FileNotFoundException
at
System.Reflection.RuntimeAssembly._nLoad(System.Reflection.AssemblyName,
System.String, System.Security.Policy.Evidence,
System.Reflection.RuntimeAssembly, ........
I have extensive logging in the application and pretty much log immediately upon program entry. However, my log never gets hit - (to me, this means that this application is being blocked, or dying before running any code).
This is different because my application does not even start. In the example that you recommended, the application begins and then fails on an event. My .exe will not work at all.
Any help would be appreciated. Thanks in advance.

GTK application don't run in windows

I develop a little test to study C# and GTK. In linux, this works perfectly, but when I try to run this in windows never works. The project is a simple calc.
In these windows I install:
dotNetx45_Full
gtk2runtime-2.24.10-2012-10-10
gtk-sharp-2.12.45
At this moment when I run in windows the feedback in windows events is:
Application: Calculadora.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Information: System.DllNotFoundException
Stack:
in GLib.Object.gtksharp_register_type (IntPtr, IntPtr)
in GLib.Object.RegisterGType (System.Type)
in GLib.Object.LookupGType (System.Type)
in GLib.Object.LookupGType ()
in GLib.Object.CreateNativeObject (IntPtr [], GLib.Value [], Int32)
in Gtk.Window..ctor (Gtk.WindowType)
in Calculator.MainClass.Main (System.String [])
Thanks for all help!
That is odd. Gtk# says it targets gnome 2.20. It may be that you have some conflict between the versions in Gtk# and those in the Gtk2 runtime which look newer (2.24). I believe you should not need this runtime as the Gtk# installer should come with a runtime. It looks like the version of glib being loaded at runtime knows nothing about IntPtr. Could you have downloaded the mono version of gtk# rather than the .Net version? Try https://dl.xamarin.com/GTKforWindows/Windows/gtk-sharp-2.12.45.msi

Winforms CL20R3 with CefSharp Project

I have a similar problem to this question C# windows appication Event: CLR20r3 on application start
The error is like this:
Application: MantenedorPlanesMain.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
Battery:
in CefSharp.Example.CefExample.Init ()
in CefSharp.WinForms.Example.Program.Main ()
But only on some machines, for example, on my computer I can use the program without any problem and in a computer of my office too.
I tried to find the source of the problem here in stackoverflow and realized that the error was caused by a cs file not found, but is within the project.
When I go to see CefSharp.WinForms.Example.Program.cs and comment the line of CefSharp.Example.CefExample.Init() throws me the same error in another file.
I tried everything, even the CopyLocal = true and x86, but still not working. I think there may be a problem with the system language, which is the only common factor of the machines that worked, Spanish language system.
any ideas?
In this context FileNotFoundException usually means you need to install VC++ or that you compiled in Debug mode (You need to build in Release mode when running on a machine without VS installed)
https://github.com/cefsharp/CefSharp/blob/master/NuGet/Readme.txt#L18
Also See the Note within https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions#6-how-do-i-include-the-visual-studio-c-2012-redistributables-on-the-target-app

C# exception thrown from a C++ managed dll - EEFileLoadException * __ptr64

I get this error from within a normal C# console program that's consuming a DLL produced as the build output of a C++ CLI project. There I have a simple DumbThing public ref class with a static method. I'd like to simply call that function or at least instantiate one tiny DumbThing object and see that C# can call code that it gets from a C++ CLI born DLL, but it's not working as it throws an error that puzzles me even more:
First-chance exception at 0x000007fefd2acacd (KernelBase.dll) in DumbTest.exe: Microsoft C++ exception: EEFileLoadException * __ptr64 at memory location 0x007fc228..
UPDATE: below the original exception, there's another first chance exception:
First-chance exception at 0x77cace3b (ntdll.dll) in DumbTest.exe: 0xC0000005: Access violation reading location 0xffffffffffffffff.
A colleague pointed out to me that it might be a compile time issue (some options), but I don't have any clues what could cause it. Could anyone please provide some starting point hints?
It's probably a bitness issue. If you compiled your C++/CLI project for a specific platform, be sure that your C# project has set its platform accordingly. Default for C# projects is "Any CPU" which causes the JIT compiler to generate x64 code on a 64-bit architecture. If your C++/CLI project was built for x86 then it can't be loaded into a x64 process on a 64-bit machine.

Categories