I have a class initializer definition
UIController(IScreen* left, IScreen* right, Encoder& encoder);
An initializer
UIController UI_CONTROLLER(
new ScreenStandby(LCD_1),
new ScreenStandby(LCD_2),
ENCODER
);
and a method
void UIController::init() {
this->left->onEnter(); // This line hard faults without ever calling into onEnter.
}
When I call UI_CONTROLLER.init() and it tries to dereference the heap pointer and call a function on it a hard fault results… any ideas on why this is happening?