Access violation with 64 bit VSPrinter 8 on Windows 8.1

Originally Posted 11 May 2015, 5:13 pm EST

  • Originally Posted 11 May 2015, 5:13 pm EST

    Hi,

    We are considering upgrading an existing ATL-based application that uses the VSPrinter ActiveX control (8.0.20082.148) to 64 bit. I've downloaded an evaluation version of the 64 bit control (v8.0.20132.171) for testing and it seems to work correctly in a 64 bit application on Windows 7.

    However, when I run the same application on Windows 8.1 (or Windows 10) it crashes with an access violation initializing the control. The crash occurs calling IPersistStreamInit::Load. The call stack from the crash is:

    msvcrt.dll!memcpy() Unknown
    combase.dll!CMemStm::Read(void * pb, unsigned long cb, unsigned long * pcbRead) Line 406 C++
    VSPrint8.ocx!00007ffb0dfad811() Unknown
    VSPrint8.ocx!00007ffb0dfa2a6c() Unknown
    > CCFTReport.dll!ATL::CAxHostWindow::ActivateAx(IUnknown * pUnkControl, bool bInited, IStream * pStream) Line 2158 C++
    CCFTReport.dll!ATL::CAxHostWindow::CreateControlLicEx(const wchar_t * lpszTricsData, HWND__ * hWnd, IStream * pStream, IUnknown * * ppUnk, const _GUID & iidAdvise, IUnknown * punkSink, wchar_t * bstrLic) Line 960 C++
    CCFTReport.dll!ATL::CAxWindow2T<ATL::CWindow>::CreateControlLicEx(const wchar_t * lpszName, IStream * pStream, IUnknown * * ppUnkContainer, IUnknown * * ppUnkControl, const _GUID & iidSink, IUnknown * punkSink, wchar_t * bstrLicKey) Line 2572 C++
    CCFTReport.dll!ATL::CAxWindow2T<ATL::CWindow>::CreateControlLic(const wchar_t * lpszName, IStream * pStream, IUnknown * * ppUnkContainer, wchar_t * bstrLicKey) Line 2537 C++

    The same binary does not crash on a Windows 7 machine and a 32 bit version of the same application works on the Windows 8.1 machine. Do you have any ideas as to what might be causing the crash?

    Thanks,

    Mark
  • Reply

    Hello Mark,

    Please make sure that you have everything properly registered, including the VB runtime DLLs and that the test program is built and executed x86 (32 bit) and not Any CPU. If the application's exe program is AnyCPU and run on a 64 bit machine, it will not be able to load the 32 bit OCXs and you might get an error.

    If the issue is still not resolved then, please share a stripped down sample application that works correctly on a 32 bit machine and doesn't works on a 64 bit one. It will help us to debug the issue further and assist you appropriately.

    Regards,
    Reema
  • Reply

    Hi Reema,

    The application is a 64 bit native C++ application (no .NET or VB) and I am using the 64 bit OCX, as the 32 bit OCX can not be used by a 64 bit application. The application works correctly on a 64 bit Windows 7 machine but crashes on a 64 bit Windows 8.1 or Windows 10 machine (I've tried a couple of different machines with each OS to be sure). As the application is 64 bit it will not run at all on a 32 bit operating system.

    I'm fairly sure that everything is registered correctly as the same application works on a Windows 7 machine and the crashes occur even if the machine has ComponentOne Studio installed. In addition the crash occurs after the ActiveX control has been created (see the exception call stack in my last post).

    Are there any samples that use the 64 bit OCX that I could modify? It might take a while to put together a sample application that reproduces the crash.

    Thanks,

    Mark

    P.S. We do have a 32 bit version of this application but there are no issues with this and it works correctly in all environments. The crashes are only occurring with the 64 bit application and only on Windows 8.1+.
  • Reply

    It looks like the crash occurs with the sample applications provided with ComponentOne Studio.

    For example, if you build the 'BigDemo' application (%USERPROFILE%\Documents\ComponentOne Samples\VSView 8.0\Vc\BigDemo) as 64 bit with VS2013 it runs correctly on Windows 7 but crashes on startup on Windows 8.1.
  • Reply

    Hello,

    I tested the issue with the "BigDemo" sample on my Windows 8.1 64bit machine with the Project's 'Active Solution Platform' set to 'Win32' and it ran correctly.

    However, when running the same sample with 'Active Solution Platform' set to 'x64', following error was observed :
    "Unable to start program 'C:\..\x64\Debug\CDemo.exe'"

    The issue seems to be related to the cause as I mentioned earlier that the application's exe does not seems to load the 32 bit OCXs and therefore an error is generated.

    I request you to please confirm this behavior at your end.

    I am still working on this issue and will get back to you with my observations when running the same sample on a Windows 7 64 machine.

    Regards,
    Reema
  • Reply

    HI Reema,

    Thanks for investigating. Yes, my 64 bit application does crash on startup on Windows 8.1, but it is not because it cannot load the 32 bit OCXs as it is a 64 bit application and therefore should be using the 64 bit OCX. If the 64 bit version of the application you compiled is crashing on Windows 8.1 64 bit then you may have reproduced the problem I've been having.

    I've attached a 64 bit version of the BigDemo application compiled on my machine and included the 64 bit VSPrint8.OCX. If you register the OCX on Windows 7 64 bit and run the application it works correctly. If you register the OCX on Windows 8.1 64 bit and run the application it crashes on startup.

    It appears to me that the 64 bit OCX does not work at all on Windows 8.1.

    Thanks,

    Mark
    2015/05/CDemo.zip
  • Reply

    Hello Mark,

    Thanks for sharing this information.

    I could observe the behavior at my end as well with the exe working on a Windows7 64bit machine but not on a Windows8.1 64bit machine.

    I have escalated this issue to the concerned team for further review on this and will get back to you as soon as I get any information from their side regarding the same.

    Regards,
    Reema
  • Reply

    Thanks for your help Reema,

    It's good to know you have been able to reproduce the problem.

    Thanks,

    Mark
  • Reply

    Any news on on running 64-bit 'VsPrint8.ocx' in 64-bit Windows 8 or Windows 10? On our tests May 2019 we get similar crash as mdunning reported May 2014 in Windows 10 when compiled to x64.
  • Reply

    Was this issue ever resolved?
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels