System.InvalidProgramException

Hi, I’m getting this:

~> Process LibTest started, took 0.182.
~> Attaching to 5632
!> Exception of type System.InvalidProgramException on thread 16E0
!> Message: Common Language Runtime detected an invalid program.

I guess it’s a compiler bug.

Sorry folks, I’m giving up on this, it’s too painful.

This happens when a 64 bit program (your executable, compiled to x64 or AnyCPU on a 64 bit processor) tries to load a 32 bit only DLL.

Or when a 32 bit program (your executable, compiled to x86) tries to load a 64 bit only DLL.

This has nothing to do with Oxygene, but is a normal error raised by the .Net runtime.

Quite possible, but it’s really hard to tell without having really any concrete information…

Okay. I’m sorry to hear that.

To put in my 10 cents: This is almost always not a compiler bug but in source code. Beside what Theo said, this can easily be produced in static initialization when the init throws by accessing nil or some other bad code.

2 Likes