Crash of the App - Probably due Screen swapping?

Hi everybody,
I’m experiencing a fatal crash on my app and can’t understand why it happens.
I have tried to reduce images’ and musics’ size to minimal, tried to put blocks on Screen1.Initilize as little as possible (on both Screen). I took out push-up Notifications, took out few implementations but it still encounters problems.

What happens is that once I open the app the first time it works perfect.
As soon as i close the app and open it again, and I switch from Screen1 to Screen3 it crashes.
The reason could be loads but i assume that is the blocks-setting of Screens:

blocks (15)
blocks (14)

I’m aware that is not adviced using many screens and i’m a loyal user of multiple-screen using visible/not visible components, but i had to open a new screen here. The only Screens that are here are “Screen1” and “Screen3”.

Also:
Is it normal that once that i download the app and I open it for the first time i find all the app’s images stored in my personal gallery?

Thank you very much indeed!
That would be great if someone could help me.

Yes that’s also why my mothers mobile, which I use as companion, is full of images of apps.

btw, I have a strange feeling, so why don’t call close screen after the open another?

To be fair yesterday i was completely lost as app kept on crashing at all times, and it was “open screen - close screen”.
I swapped them today and it seemd to work good.
As long as i started the app the second time.
Then i felt lost again.

Then mark as solution.
:money_mouth_face: :grin:

wdym? He just has to switch the “close screen” block with the “open another screen” block. the procedure stays like how it is.

1 Like

I mean that it’s not working both ways.

It still crashes either if i put “close screen” and than “open new screen”, or either “open new screen” and “close screen” afterwards.

Problem is unsolved, my app keeps on crashing.

Do you get a message when the app crashes??? How big are your images???

No messages at all.
Just my device that says “App stopped working”.

I have in total 6 images, 1 in Screen1 and 5 in Screen2, max is 15 kb each.
Also have few icons and 1 lottie.

follow tip 2


Taifun

1 Like

Please tell me if the same happens when removing the close screen procedure. Of course, this will be just a temporary change. Maybe perhaps the screen you are trying to open doesnt exist?

1 Like

I think, if this is your first screen in that app, and you say “close screen” either before or after the “open another screen”, then it doesn’t allow to close that screen, which means not to switch screens, because there is no screen that would probably be reopened after this one.

So, for switching screens correctly, I would say “open another screen” in this first screen and “close screen” on the other, to come back.

Plz tell me if I’m wrong.

I did reserches during the past two days on the topic, i have read everything but still my app crashes.
I tried with TinyDB, i tried with “start screen with value”, both don’t help.
I am very loyal to the usage of multi-arrangements, but i couldn’t do it this time.
Kodular gets too slow on my laptop when I reach about 1500 blocks so I had to build a new screen.

App actually works perfectly during the first start.
Crash only appears when i close the app the then re-open it. Screens swapping works good on the first try, so they both exist and are linked.

A bit Off-topic:

Oh. ok. On mine, I have not tried yet how much blocks I can have, but all to 4000 is ok.

And did you read this? :point_down:

Thank you for your kind answer!
Yes i read it very carefully, I was just busy playing a bit with blocks as the solution can’t be that far away.
The actual crash happens when from Screen1 I go to Screen3. So i guess it’s not the problem of what happens if I close Screen3, I haven’t still exeperienced that moment of glory. when i pass through the phase of “Screen 3” opened correctly.

Still having troubles… now i deleted few more bloks from Screen3.Initilize to see which one is having more problems.

We are not getting anywhere as you are not showing what you are loading on Screen3

FYI, I’m using it both ways without any crashes
bild

1 Like

In Screen3 I followed two paths:
First one using TinyDb, second one using “Open screen with value”
Both are reporting the same problem.


blocks (17)

Thank you for your time.

1 Like

I see no weirdness in your code, can you post your apk so others can try it out…

1 Like

Direct download here:
https://gofile.io/?c=nKNAbU
The problem it’s usually on the second time the app is run, as in the first i didn’t encounter any problem.
Screen3 will open once you click on “Make Cocktails” one the Game Menu.
I disabled some unnecessary blocks just to see if was working.

This is everything i have when App crashes:

Translated is “App crashed”.

Thank you very much indeed.

you might want to use logcat to find out more


Taifun

Thank you Taifun,
Altought this guide is well beyond my knowledge, i ended up on a good point.
It seems like that the guide is not updated as more info and things work differently.
I’ve done everything the guide told me to do, but there’s a point where i lose myself as the guide seems to be a bit old and not updated.

Or possibily it’s just me that I am not perfect with DOS.

The guide says to type “adb logcat” but it doesn’t do what expected. Also typing “devices” and other commands end up with an error. I’ll try to work harder on it.

I’m not expecting help about this, but if someone has more advices for my problem, i’m still finding a way to fix the app and dont make it crashes.