cancel
Showing results for 
Search instead for 
Did you mean: 

During screen change Toughfx going for assert function.

Hello, In my project I have 2 screen, Lets call it SCR-1 and SCR-2. First SCR-1 will be displayed for 1 sec and post SCR-2 will be displayed all time. Everything works fine till thn.

In my project sometimes, I need to again put SCR-1 (with SCR-1 for 1 sec and thn SCR-2) during run time. When I try to do same, I am facing assert function. So screen is able to successfully change from SCR-2 to SCR-1 but post 1 sec while trying to go for SCR-2, touchgfx is going for assert.

Below are the stack information. Here SCR-2 is main screen

0693W000006HykHQAS.png 

void FrontendApplicationBase::gotoMainScreenScreenNoTransitionImpl()
{
    touchgfx::makeTransition<MainScreenView, MainScreenPresenter, touchgfx::NoTransition, Model >(&currentScreen, &currentPresenter, frontendHeap, &currentTransition, &model);
}

Its going for assert while at add(customizedArea), basically I added customizedArea as customized widget.

QRCodeWidget customizedArea;

void MainScreenView::setupScreen() {
 
	customizedArea.setXY(QR_CODE_AREA_X_LOCATION, QR_CODE_AREA_Y_LOCATION); //From widget
	customizedArea.setQRCode(&code);    //From QRCodeWidget
	customizedArea.setScale(SCALE_FOR_QR_CODE);              //From QRCodeWidget
	add(customizedArea);           //Add to root container of your screen (view)
	customizedArea.setVisible(false);
	customizedArea.invalidate();
	MainScreenViewBase::setupScreen();
}

1 ACCEPTED SOLUTION

Accepted Solutions

I solved issue by removing customized widget during tearDownScreen.

View solution in original post

3 REPLIES 3

I solved issue by removing customized widget during tearDownScreen.

MM..1
Chief II

Maybe better is change order in setupScreen, good practice is call as first

MainScreenViewBase::setupScreen();

Sure I will make that change. Thanks