When i include Comview generated files autocad.inc or autocadc.inc and try to build with debug options

ML.EXE /c /Fl /Zi /coff /Cp /nologo

i get error

CVPACK : fatal error CK1011: type information corrupt, recompile module
LINK : warning LNK4027: CVPACK error

when either of those files are not included, theres no error.

The exe seems to run OK even with this error but the debug info is unusable (with SoftIce).

Don't know if the error has much to do with Comview, maybe it's just because both includes are pretty big files.

I've tried with CVPACK versions 4.26.01 and 6.00.8168, the result is the same.

I'd appreciate any ideas, how to get the debug infos fixed.
Posted on 2003-07-22 15:49:37 by Janne
I cant realy offer a suggestion, but im pretty sure its not COMView. My guess is the CVPACK doenst have an engine to handle large typed arrays.

As for debugging, i used Ollydebug with a combination of int 3's, and VKims debug window. I find pretty good. Good enought for me not to bother putting softice back on...

Posted on 2003-07-22 18:30:34 by NaN
Hi Janne,

I assume your guess about size is correct. Size of the standard include should be no problem, but the dispatch helper include will cause MASM to generate a function prototype for each line. Thats why as default only dispatchonly interfaces are included, not the dual ones. (These many prototypes increase compile time as well)
I suggest to delete some lines you dont need in your app.

Posted on 2003-07-23 01:10:05 by japheth
Commented out most lines from both .inc files, no more CVPACK error.
Posted on 2003-07-23 16:01:37 by Janne
As a work arround, you might be able to get away with linking includes. That is to break the one file into smaller files, and include them all together. The CPACK.EXE might be designed to reallocate a new memory space for each file's type arrays. If this is the case, you should have no problems here, and still get your entire include's contents in.

Just a thought.
Posted on 2003-07-23 16:50:32 by NaN
NaN, i tested your idea about linking includes, but seems that it does'nt solve this. I left in autocadc.inc about the maximum number of lines that allow error-free assembling. Then i made new file autocadc2.inc with just few DEFINE_DISPMETHOD lines. When only autocadc.inc is included, the assembly is OK, when both autocadc.inc and autocadc2.inc are included, the CVPACK error appears.

I thought that perhaps the DEFINE_DISPMETHODs could be conditionally assembled so, that only lines that are actually needed by some invoke dm() in the code would be assembled, and all the rest lines ignored. I have'nt done anything yet to try this, i thought that maybe you guys can tell right away if this is something that masm just can't do.
Posted on 2003-07-26 07:17:57 by Janne
Hi Janne,

when making the disphlp macros I realized this problem (mostly because it slows down compile process). But since 1) it only occurs with large dispatch helper files and 2) normally you just create dispatch helpers for dispatchonly interfaces this probles has got very little priority. I found a solution which speeds up the compile process (its about defining equates like DONT_DEFINE_DUMMY_PROCS, the details are described in disphlp.inc), it may possibly help your problem as well.

The technical problem is that inside the DEFINE_DISPMETHOD macro a dummy proc has to be defined. This cannot be done in macro dm(), because when this macro is called you are inside a proc and then you cannot define another proc with masm.

If you find a solution let me know.

Posted on 2003-07-26 09:24:32 by japheth