chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
If I call a constructor that has 21 arguments [not great design i know] - on any class, not one that has been mocked - get a System.InvalidProgramException.

TypeMock v3.0. Running an exe via TMockRunner.exe. .Net 1.1sp1.
asked by servotest bob (3.8k points)

5 Answers

0 votes
Hi,
Sounds like a bug :twisted: .
We will create a fix and post it.
answered by scott (32k points)
0 votes
Hi!
I get the same exception with the additional information:
Common Language Runtime detected a invalid program

How can I find out if that is caused by TypeMock 3.0 or by something in my or in microsofts programming? By the way, I do not have constructors with such a lot of parameters but a VersionInfo method is called deep inside windows that has 4 lines of my outputwindow filled with arguments in the call stack...

The tests that some days ago completed without any error now fail and I think that could have to do with the update from 2.3 to 3.0 some days ago...


Any bugfixes available meanwhile?
answered by mknaup (8.5k points)
0 votes
Hi
servotest bob:
I will send you a patch offline. Please tell me if it helped

mknaup:
This is probrably a different issue,
Please send the failing test and the TypeMock.out file [just the bit before ProgramException]
answered by scott (32k points)
0 votes
Hi,

a fix from Scott helped me. The tested assembly threw an exception when a control was created. Usually an error message box comes up (with Details and Continue button). But the constructor of this crashed within typemock.

So if you experience the same problem, ask Scott for a bug fix.

Scott: Thanx a lot for your quick help :lol:
answered by mknaup (8.5k points)
0 votes
A fix has been made, it will be part of our next patch release (3.0.1) 8)
answered by scott (32k points)
...