I encountered a problem with the 64-bit .NET Framework: my C# program is very simple:
Code: Select all
static void Main(string[] args)
{
System.Console.WriteLine("Hello world!");
Debug.WriteLine("Debug Hello world!");
}
Hello world!
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at System.Diagnostics.DiagnosticsConfiguration.Initialize()
at System.Diagnostics.DiagnosticsConfiguration.get_IndentSize()
at System.Diagnostics.TraceInternal.InitializeSettings()
at System.Diagnostics.TraceInternal.WriteLine(String message)
at ConsoleApplication3.Program.Main(String[] args)
wine: Unhandled page fault on read access to 0x00000000 at address 0x1aa460fd (thread 0009), starting debugger...
The problem is with the line "Debug.WriteLine(...)". However, the same application compiled with 32-bit works well.
I found out that I got the similar error at other positions when I ran our in-house 64-bit .NET program, even if I don't use Debug.WriteLine(...), so I created the hello-world program to reproduce it.
My final goal is: run our 64-bit .NET application on a 64-bit WINE with .NET Framework 4.6.1.
Please someone instruct me how to overcome this problem?
Thanks.
Best regards,
/Kenny