cancel
Showing results for 
Search instead for 
Did you mean: 

Touchgfx Simulator Crashes After Screen Rotation and Change Screen

farukisiker
Associate III

// To regenerate crash, follow these steps
// In simulator mode
// 1. Rotate screen
        	if (touchgfx::HAL::getInstance()->getDisplayOrientation() == touchgfx::ORIENTATION_PORTRAIT)
        	{
        		touchgfx::HAL::getInstance()->setDisplayOrientation(touchgfx::ORIENTATION_LANDSCAPE);
        	}
        	else
        	{
        		touchgfx::HAL::getInstance()->setDisplayOrientation(touchgfx::ORIENTATION_PORTRAIT);
        	}
// 2. Go to other screen
application().gotoScreen2ScreenCoverTransitionEast();
// Crash

There is probably a bug after rotating screen in simulator mode.

 

Additionally, in debug mode (on hardware) when I apply screen rotation, it is not validated. If I change screen to another one, rotation is applied but with glitches in pixels.

18 REPLIES 18
farukisiker
Associate III

Could you please help me?

farukisiker
Associate III

I solved crash problem. However, there is still glitch in screen after rotation. I recorded and inserted a video.

farukisiker
Associate III

Why noone is assigned to this problem?

Hi @farukisiker 

please share the project with this behaviour.

farukisiker
Associate III

Here is the project. To rotate screen, you can use up arrows in keyboard.

You can follow these steps to get glitched pixels,

1-short press to up arrow (rotate screen)

2-short press to down arrow (go to screen 2)

3-long press to up arrow (go to screen 1) here are supposed to see glitches.

@ferro I forgot to mention you. 

Splendid, got the simulation running with the behaviour you describe. I should be able to look into it this week.

Thanks @ferro , I will be waiting your reply.

It seems to work Ok when I mapped 2 keys 'l' and 'p' to change orientation.

I added these 2 interactions in GfxDesigner

          {
            "InteractionName": "interactionGoPortrait",
            "Trigger": {
              "Type": "TriggerPhysicalButtonClicked",
              "ButtonKey": 112
            },
            "Action": {
              "Type": "ActionCustom",
              "FunctionName": "goPortrait"
            }
          },
          {
            "InteractionName": "interactionGoLandscape",
            "Trigger": {
              "Type": "TriggerPhysicalButtonClicked",
              "ButtonKey": 108
            },
            "Action": {
              "Type": "ActionCustom",
              "FunctionName": "goLandscape"
            }
          }

and then in screen

void Screen1View::goLandscape() // press key 'l'
{
	if (touchgfx::HAL::getInstance()->getDisplayOrientation() != touchgfx::ORIENTATION_LANDSCAPE)
	{
	    touchgfx::HAL::getInstance()->setDisplayOrientation(touchgfx::ORIENTATION_LANDSCAPE);
	}
}

void Screen1View::goPortrait() // press key 'p'
{
	if (touchgfx::HAL::getInstance()->getDisplayOrientation() != touchgfx::ORIENTATION_PORTRAIT)
	{
	    touchgfx::HAL::getInstance()->setDisplayOrientation(touchgfx::ORIENTATION_PORTRAIT);
	}
}