Page 1 of 3
Vulcan.NET: System.InvalidProgramException
Posted: Mon Aug 19, 2019 9:40 am
by Kromi
Hi,
I have a pretty severe problem with our Vulcan code. If I build the code on my machine and start the resulting executable, I get the attached error message and then the process is terminated. I'm pretty sure it's not the code; the same code built on another machine runs on my machine. The code built on my machine does not run on other machines.
The German text in the error message translates to something like "The Common Language Runtime has found an invalid program."
I have no idea what caused this problem, whether it was a Windows update or a Visual Studio update or anything else.
Any ideas what I can do?
Regards,
Mathias
Vulcan.NET: System.InvalidProgramException
Posted: Mon Aug 19, 2019 10:17 am
by Chris
Mathias,
Are you compiling it with the vulcan or the X# compiler? Are you using the exact same project files? Maybe there are some differences in compiler options..
Also are there any important differences between the two PCs, different OS or different .Net framework version?
Vulcan.NET: System.InvalidProgramException
Posted: Mon Aug 19, 2019 10:29 am
by Kromi
I'm compiling with the Vulcan compiler. Project and code files are identical, so are the compiler options - as far as I can tell.
I think it's a problem in my windows environment, but do you have an idea where it's worth to look at? Installed .NET Frameworks seem to be the same, but I'll double check that. Any other idea?
Vulcan.NET: System.InvalidProgramException
Posted: Mon Aug 19, 2019 10:48 am
by lumberjack
Hi Matthias,
Kromi wrote:I'm compiling with the Vulcan compiler. Project and code files are identical, so are the compiler options - as far as I can tell.
A shot in the dark, but it seems to appear around the SplashScreen that you are showing. Does that maybe give a hint or an idea what might cause the problem? What happens if you omit the SplashScreen display from your code?
Vulcan.NET: System.InvalidProgramException
Posted: Mon Aug 19, 2019 10:48 am
by Chris
I think it's best to compare the working and not-working exes to see what's their difference. Try using ILSpy (
https://github.com/icsharpcode/ILSpy/re ... tag/v4.0.1) or any other .Net disasm tool, dump their contents in text files and compare them.
With ILSpy, you need to load the .exe, select from the menu File->Save Code, then unload the .exe, load the other version and export again. Compare the two files with a file comparer, do you see major or minor differences?
Vulcan.NET: System.InvalidProgramException
Posted: Mon Aug 19, 2019 11:34 am
by Kromi
It's not a splash screen, but I will eventually try commenting out some code.
Vulcan.NET: System.InvalidProgramException
Posted: Mon Aug 19, 2019 11:38 am
by wriedmann
Hi Matthias,
try install all pending Windows Updates. Sometimes pending or half installed Windows Updates can give very strange errors.
Wolfgang
Vulcan.NET: System.InvalidProgramException
Posted: Mon Aug 19, 2019 12:34 pm
by Kromi
Thank you Wolfgang, no pending updates here. To get rid of this error I not only have installed all updates Microsoft has to offer, I also have re-installed Windows and have the same error again.
Vulcan.NET: System.InvalidProgramException
Posted: Mon Aug 19, 2019 12:42 pm
by wriedmann
Hi Matthias,
do you really have reinstalled Windows completely from scratch or do you have only made a reinstallation?
You problem seems to be a .NET Framework corruption.
Wolfgang
Vulcan.NET: System.InvalidProgramException
Posted: Mon Aug 19, 2019 1:02 pm
by Kromi
Wolfgang, I have erased all partitions from the SSD and installed from scratch.
Following Chris' advise I have compared the ILSpy output from a functioning version with the not functioning one. I found a difference in the constructor that is also listed in the error message. The not functioning code looks like this. The characters in red are not present in the functioning code.
[ClipperCallingConvention(new string[]
{
})]
public unsafe GapProcessInfo(params __Usual[] _0024args)
{
//Error decoding local variables: Signature type sequence must have at least one element.
Monitor.Enter(lockTaken: ref *(bool*)VnLibGUITool.Functions._0024_0024StaticLocal_InitFlag__0024iSOFT_002ELSC_002EKernel_002EGapProcessInfo_0024_002Ector_0024_003A558_003A15_0024lIsNewProc, obj: (object)/*Error near IL_00b1: Stack underflow*/);
try
{
...
}
finally
{
StaticLocalInitFlag ...
}
base._002Ector();
nIsDevelopment = (short)(-1);
getInfo();
oMemInfo = null;
}
I have removed some of the code that made it more unreadable and not used the code tag to be able to mark characters red.