C++: Weird segmentation fault related to const pointers to objects

Clash Royale CLAN TAG #URR8PPP C++: Weird segmentation fault related to const pointers to objects class A { public: A(); ~A(); int** var; void resetVar(); //sets variable to an init value }; class B { public: B(); ~B(); //either one of the below is declared, but not both in my code A* const a_obj1; // const ptr to an instance of A, (option 1) A* a_obj2; // ptr to an instance of A, (option 2) }; A::A() { var = new int*[2]; for( int i = 0; i < 2; i++ ) { var[i] = new int[2]; } resetVar(); } A::~A() { for ( int i = 0; i < 2; i++ ) { delete var[i]; } delete var; } A::resetVar() { for ( int i = 0; i < 2; i++ ) { for ( int j = 0; j < 2; j++ ) { var[i][j] = 0; //point of segmentation fault, explained below } } } B::B(): a_obj1( new A() ) // option 1 { a_obj2 = new A(); //option 2 a_obj2->resetVar(); //ok with option 2 a_obj1->resetVar(); //segmentation fault in this function call ...