Click here to Skip to main content
15,437,002 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,
While accessing a computer I get an access violation error.
The error is not consistent and only reproducible while trying to access a huge data.
I have 2900 components and for each component I am calling a function. In this function I am accessing a ccompter, while doing this application gets crashed at random position like on 200, 210, 2500 etc. The position in not fixed when it crashes.

This issue is specific to the system with following configuration:
Window Server 2003 R2
Xeon CPU , 2.66 ghz
2 GB of RAM

here is my code

XGGraphicAttribute* pAttr = pExtraGraphicInfo->GetAttribute();

if(pAttr)
{
DBAttributes* db_attributes = NULL;

db_attributes = static_cast<DBAttributes*> (pAttr->GetDBAttributes());

CComPtr<IEPGraphicData> pIEPGraphicData;

if(db_attributes)

pIEPGraphicData = db_attributes->GetGraphicData(); // here my app got crashed 

}


IEPGraphicData* DBAttributes::GetGraphicData () const
{
    return m_pIEPGraphicData;
}




Please help me !!!

Regards
BitsMax
Posted
Updated 15-Sep-11 18:48pm
v5
Comments
Richard MacCutchan 15-Sep-11 10:35am    
Without seeing some code and specifically the line(s) that causes the error it is impossible to make any suggestions.
Stefan_Lang 15-Sep-11 12:16pm     CRLF
Sorry, this is not the Mentalist Forum here. We're programmers, and as such require some data to work on. And no, your system configuration doesn't help - that would be like reading your bank account data from your palm. The source code of the function that you mentioned would be a great help though.
CPallini 16-Sep-11 3:25am    
Is your application multithreaded?
bitsmax 16-Sep-11 8:27am     CRLF
NO, its not multithreded.
Ali Fakoor 18-Sep-11 5:41am     CRLF
What about threading/parallelism offered by the hardware: Does the crash occur when setting the processor affinity to run the program only on one core of the CPU? Could you give it a try.

What happens in the function called by
C++
db_attributes->GetGraphicData();

You should use your debugger or add some debug code of your own to see what is going on. There is no way anyone can guess why this causes an access violation without a lot more information.
 
Share this answer
 
Pls trace the GetGraphicData(), and check wats making it to crash!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900