DWF

DWF

Reply
New Member
RSGarrett
Posts: 2
Registered: ‎12-13-2011
Message 1 of 3 (165 Views)

Creating DWFModel object overwrites the calling object.

165 Views, 2 Replies
12-13-2011 08:45 AM

void CDWFGen::smileytongue:ublish(CString DWFFileName)
{
try
{
DWFModel oModel( "", "", "", "", "" );

 

As soon as oModel is instatiated, the this pointer becomes null.

 

I can move things around a bit and get past that, but it only changes the block of memory overwritten and therefore the line of code that the crash occurs on.

 

I tried upgrading from DWFToolkit 7.6 to 7.7, but it only changes the location of the crash ( in this case when we call addProperty.

 

I've never encountered a bug like this and my experience with accessing COM objects is limited so I am quite literally clueless now. Would anyone be able to offer me advice on resolving this problem or a different way of looking at it that might lead to a resolution?

 

Thank you,

Randy Garrett

Employee
SilviaCao
Posts: 136
Registered: ‎06-07-2009
Message 2 of 3 (150 Views)

Re: Creating DWFModel object overwrites the calling object.

12-19-2011 07:25 PM in reply to: RSGarrett

Thank you for your questions.

 

Do you mean as soon as the oModel is instatiated, the memory of the oModel is overwritten   or became null? Does the application use multi-thread? Could you please check the codes if there is any mistake of releasing memory.



Silvia Cao
SW Engineer
PSEB-GE- ACRD PSEB
Autodesk, Inc.
New Member
RSGarrett
Posts: 2
Registered: ‎12-13-2011
Message 3 of 3 (146 Views)

Re: Creating DWFModel object overwrites the calling object.

12-20-2011 04:07 AM in reply to: SilviaCao

Thank you for the reply. I have since figured out the trouble. I apologize for not posting sooner.

 

When we upgraded to version 7.6 and promoted the changes to our version control, some of the files did not get updated. So the changes were only complete on the programmer's, who performed the update, PC. The server had a mix of 7.5 and 7.6 headers even though the libraries and DLLs were built exclusively with 7.6. The short of it, the header described a smaller size for a class than the object created by the DLL so insufficient memory was allocated to the new instance of DWFModel and portions of it overwrite existing data in memory causing the crash.

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.