Change to another lv_demo during runtime?

Hello,

Is it possible during runtime to change to another “lv_demo…”?
I tried below example, but that does not work:

while(1){
	  HAL_Delay(5);

	  if( (millis()-lastMillis1) > 5000){

		  lastMillis1 = millis(); //millis() returns the milliscount from start
		  state++;
		  runDemo = 0;

		  if(state > 4){
			  state = 1;
		  }
	  }

	  if(runDemo == 1){
		  lv_task_handler();
	  }

	  if( (state == 1) && (runDemo == 0) ){
		  lv_demo_music();
		  runDemo = 1;

	  }else if((state == 2) && (runDemo == 0)){
		  lv_demo_widgets();
		  runDemo = 1;

	  }else if((state == 3) && (runDemo == 0)){
		  lv_demo_stress();
		  runDemo = 1;

	  }else if((state == 4) && (runDemo == 0)){
		  lv_demo_benchmark();
		  runDemo = 1;
	  }
}

What specifically didn’t work? I haven’t used the PC sim in a while, but iirc the demo functions all initialize children objects based on the active screen. Step 1 would be to try to create separate screens for each (could involve modifying upstream code but if it’s crucial to avoid that you may be able to find a workaround) and using lv_scr_load to switch between them. That’s assuming switching between demos is possible in the first place, which I’m not sure about.

When I execute the code mentioned above, the lv_demo_music program launches successfully. However, it freezes at the next state, and the LED toggle function I have in the loop too, does not toggle anymore…

Edit:
Move lv_demo_x() to screens, does not help - it freezes if change from screen to screen_1:

void setup_scr_screen_1(lv_ui *ui){
	lv_demo_music();
...

}