Jump to content
Software FX Community

Access violation - code c0000005 exception closes my application


Recommended Posts

My VC++ application sometimes closes with an "Access violation - code c0000005" exception, right in the moment when selecting a TabPage in a windows form TabControl. This access violation occurs at below line m__mychrtPtr->raw_Import( Cfx62::FileFormat_Binary, variant1 );

Sample Tab View code

void CGraphDlg::ViewChartFXGraph(Cfx62::_ChartPtr pMyChart)


IStreamPtr pMyStream = NULL;

VARIANT variant1;

if ( SUCCEEDED( CreateStreamOnHGlobal( NULL, TRUE, &pMyStream ) ) )


  V_VT( &variant1 ) = VT_STREAM;

  V_UNKNOWN( &variant1 ) = pMyStream;

  pMyChart->PutFileMask( (Cfx62::FileMask)( Cfx62::FileMask_All ) );

  pMyChart->raw_Export( Cfx62::FileFormat_Binary, variant1 );



  large.LowPart = 0;

  large.HighPart = 0;

  pMyStream->Seek( large, STREAM_SEEK_SET, &ularge );

  m__mychrtPtr->raw_Import( Cfx62::FileFormat_Binary, variant1 );




The faulting module seems to be a COM object (ChartFX Client Server 6.2)  

Using WinDbg, I caught it on the unmanaged side, inside ChartFX.ClientServer.Core.dll (that's a COM charting component we are using)

(1068.10bc): Access violation - code c0000005 (first chance)

First chance exceptions are reported before any exception handling.

This exception may be expected and handled.

eax=0d41e770 ebx=00000001 ecx=0022dcc8 edx=0000000e esi=00000007 edi=00000012

eip=3172b8d7 esp=0022dca0 ebp=0022dcc0 iopl=0 nv up ei ng nz ac po cy

cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000 efl=00010293

*** WARNING: Unable to verify checksum for D:\x\y\z\bin\ChartFX.ClientServer.Core.dll

*** ERROR: Symbol file could not be found.  Defaulted to export symbols for D:\x\y\z\bin\ChartFX.ClientServer.Core.dll -


3172b8d7 ff30   push   dword ptr [eax]   ds:0023:0d41e770=????????


I have several Chart instances in several TabPages, and this usually happens while I am switching the tabs. If someone could point me to the next step I should do to find the actual cause or solution, I would be very grateful. 




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...