App crashing when switching screens

On kodular 1.4B

My app crashes when switching between screens after building the app…
Although it works find on companion while testing

can you show your blocks?


Taifun

2 Likes

Do you manage your screens properly?

By this, I mean if Screen1 opens Screen2, which opens Screen1 in order to return to Screen1 instead of closing Screen2, you will end up with multiple instances of Screens, each bringing their own environment with them, adding to the burden on the device.

In order to keep the load in check, it is advised to have only Screen1 + one other screen open at any time. Switching screen gracefully should be accomplished by having the current screen “close with value”, with the value set such that the mains screen (Screen1, usually) would use the “other screen closed” event and the “result” value to determine that another screen needs to be opened.
It is more complicated, but it is robust.

The issue is solved now >>
I think the error was due to internet connection that caused a bug in the created screen … I have recreated the screen and the app works fine now

thanks all of you for your support

1 Like