App can't get past call to Create() for the CTChart object

TeeChart for ActiveX, COM and ASP
Post Reply
psahay
Newbie
Newbie
Posts: 8
Joined: Tue Nov 18, 2003 5:00 am

App can't get past call to Create() for the CTChart object

Post by psahay » Thu Nov 20, 2003 1:16 pm

Both workstations that do not have the TeeChart Pro V6 registered installation on them (two out of the three developers working on this application do not have a licensed installation) are not able to run the code they build themselves.They cannot get past the point where the CTChart object's Create() is called without a crash. If those workstations run the code that was compiled on the licensed machine they have no such problem. They have tried to build both debug and release versions.

I am linking in those wrapper classes needed to create our particular chart into a static library that then gets linked into the .exe. We are using Visual C++ 6.0.

Here is the relevant part of the stack at the point of the crash in a debug build:

MFCO42D! 5f51121f()

CTChart::Create(const char * 0x005ff894, const char * 0x005ed13c, unsigned long 268435456, const tagRECT & {top=-858993460 bottom=-858993460 left=-858993460 right=-858993460}, CWnd * 0x00f360b8 {CClockDataBaseWindow hWnd=0x0015072c}, unsigned int 905, CCreateContext * 0x00000000) line 52 + 57 bytes

CClockDataBaseWindow::OnCreate(tagCREATESTRUCTA * 0x0012da84) line 79 + 47 bytes

etc

The error message is:
First-chance exception in uim.exe (MFCO42D.DLL): 0xC0000005: Access Violation.

Those two workstations are not actually doing any development using TeeChart Pro V6. They are just trying to recreate the object code from scratch.

It is necessary that they be able to use the TeeChart control with code built on their workstation. If this problem's cause is obvious to anyone, could someone please outline some possible solutions?

Marc
Site Admin
Site Admin
Posts: 1272
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Thu Nov 20, 2003 7:06 pm

Hello,

I assume from:
"If those workstations run the code that was compiled on the licensed machine they have no such problem"

..that the teechart6.ocx file is installed and registered on both machines. Please check that though as really that is the only likely difference between an installation made by the TeeChart installer and that of a manual installation.

If the code works ok on the 2 workstations after having been compiled on the other machine it would seem that underlying dependencies are in place but that some linking element isn't at compile time (because it fails at compile time correct?). It may be that, if even just as a test you use the installer to install TeeChart on one of the workstations that the problem still occurs there. If that is the case then it probably points to the lack of some underlying VC++ support file.

Please let us know if you have any other clues that may help us identify the cause.

Best regards,
Marc Meumann
Steema Support

psahay
Newbie
Newbie
Posts: 8
Joined: Tue Nov 18, 2003 5:00 am

Post by psahay » Fri Nov 21, 2003 1:41 pm

hello,

I want to make clear that there are no compile time problems. The code compiles on ALL machines. Call the machine that has no problem running code compiled by it the "good" machine. The "bad" machines would be the ones that cannot run code compiled by them. The code compiled on the "good" machine runs fine on the "bad" machines. The "bad" machines have problems only when running code NOT built on the "good" machine. Code built on the "bad" machines cannot be run on the "good" machine. The code being built by all machines is identical.

There is an assertion thrown in MFC source code occsite.cpp line 161 when running code built on the "bad" machines.

HRESULT COleControlSite::CreateControl(CWnd* pWndCtrl, REFCLSID clsid,
LPCTSTR lpszWindowName, DWORD dwStyle, const POINT* ppt, const SIZE* psize,
UINT nID, CFile* pPersist, BOOL bStorage, BSTR bstrLicKey)
{
HRESULT hr = E_FAIL;
m_hWnd = NULL;
CSize size;

// Connect the OLE Control with its proxy CWnd object
if (pWndCtrl != NULL)
{
ASSERT(pWndCtrl->m_pCtrlSite == NULL);
...
}
...

}

The problem arises at the assertion:

ASSERT(pWndCtrl->m_pCtrlSite == NULL);

I don't see how this problem can be an environment problem. The code from the "good" machine runs fine on the "bad" machines.

Thank you for your help.

Post Reply