What happens in the function called by
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.