# Opening last page crashes my app

**URL:** <https://community.thunkable.com/t/opening-last-page-crashes-my-app/362763>\
**Category:** Questions about Thunkable X\
**Created:** [December 11, 2019, 9:08pm UTC](https://community.thunkable.com/t/opening-last-page-crashes-my-app/362763 "2019-12-11T21:08:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jes2449fcbti](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@jes2449fcbti](https://community.thunkable.com/u/jes2449fcbti)\
**Post date:** [December 11, 2019, 9:08pm UTC](https://community.thunkable.com/t/opening-last-page-crashes-my-app/362763/1 "2019-12-11T21:08:33Z")

</div>

Hi, I’m currently creating an app for a school project. I have several pages with questions about the user’s shopping habits, and the final page theoretically shows the user what their environmental impact (how much carbon they produced, how much water they used, how many bags in the landfill, and how many bags are littered) for each time they shop. However, when I click the button to open my last page, my app crashes and goes back to the login screen (which is set to automatically log me in and goes to the first page of my app. Any particular reason why, and/or suggestions on how to fix this? Thank you

---

<div class="post-metadata">

**Author:** ![Dean\_Artis](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@Dean\_Artis](https://community.thunkable.com/u/Dean_Artis)\
**Post date:** [December 11, 2019, 9:28pm UTC](https://community.thunkable.com/t/opening-last-page-crashes-my-app/362763/2 "2019-12-11T21:28:29Z")

</div>

Nobody has a crystal ball. You’re going to have to show your blocks otherwise people are just going to have to guess.

---

<div class="post-metadata">

**Author:** ![jes2449fcbti](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@jes2449fcbti](https://community.thunkable.com/u/jes2449fcbti)\
**Post date:** [December 11, 2019, 9:31pm UTC](https://community.thunkable.com/t/opening-last-page-crashes-my-app/362763/3 "2019-12-11T21:31:09Z")

</div>

![Screen Shot 2019-12-11 at 4.22.06 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/9/99cf02ba5be1e6136e961441151c09d79e268bf5.png)

---

<div class="post-metadata">

**Author:** ![CBVG](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/cbvg/32/32401_2.png) [@CBVG](https://community.thunkable.com/u/CBVG)\
**Post date:** [December 11, 2019, 9:56pm UTC](https://community.thunkable.com/t/opening-last-page-crashes-my-app/362763/4 "2019-12-11T21:56:14Z")

</div>

Sorry, you will have to show more that this.  
You state that when you “click the button to open the last page” is when the app crashes.  
Where is the logic that is started by the clicking of this button?

---

<div class="post-metadata">

**Author:** ![jes2449fcbti](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@jes2449fcbti](https://community.thunkable.com/u/jes2449fcbti)\
**Post date:** [December 11, 2019, 10:01pm UTC](https://community.thunkable.com/t/opening-last-page-crashes-my-app/362763/5 "2019-12-11T22:01:55Z")

</div>

![Screen Shot 2019-12-11 at 4.51.25 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/d/edc5e6613b584b2d4e7ea192caa472cf32c7c162.png)

 ![Screen Shot 2019-12-11 at 4.51.41 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/c/fc9408bc365e749b33e2fa8d064c2276bccd977e.png)  
 ![Screen Shot 2019-12-11 at 4.52.02 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/2/e28230cd5d3fd79552b2744af9e90040dd8bf026.png)

---

<div class="post-metadata">

**Author:** ![jes2449fcbti](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@jes2449fcbti](https://community.thunkable.com/u/jes2449fcbti)\
**Post date:** [December 11, 2019, 10:03pm UTC](https://community.thunkable.com/t/opening-last-page-crashes-my-app/362763/6 "2019-12-11T22:03:03Z")

</div>

It also happens when I press skip  
 ![Screen Shot 2019-12-11 at 4.54.40 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/0/70abfa40a8cf6911fb9c473f33ad6ac7bcb328c7.png)

---

<div class="post-metadata">

**Author:** ![CBVG](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/cbvg/32/32401_2.png) [@CBVG](https://community.thunkable.com/u/CBVG)\
**Post date:** [December 11, 2019, 10:18pm UTC](https://community.thunkable.com/t/opening-last-page-crashes-my-app/362763/7 "2019-12-11T22:18:08Z")

</div>

A lot of things can be wrong.  
In your calling screen, what happens if “Text\_Input1” is “13” (given that you handle when it is 12 and when it is 14, but not when it is 1, 3, 5, etc.).  
Also, what happens if “Text\_Input1” was left completely blank?

In the case you press “Skip6”, then you may have an issue with the values of “app travelled”, “app carbonBag” etc. not being defined or not being defined as _numbers_.  
But there is a _definite_ issue is “app litter” is less than 1, since you replace its value with the text string “Less than 1”. At the end of your Final.Starts block, you set up weekLitter to a computation that uses the value of “app litter”, which you may think is 0, but is NOT A NUMBER, since you just set it to “Less than 1”. That would raise an exception that should _normally_ be indicated as a pop up, but depending on your platform, perhaps your OS implementation is not so kind as to share that information, and simply decide to crash.

You are doing the same kind of alteration to “app inLandfill”, also set to a text if less than 1 and later used in a mathematical operation (the setting of decimal places).

---

<div class="post-metadata">

**Author:** ![jes2449fcbti](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@jes2449fcbti](https://community.thunkable.com/u/jes2449fcbti)\
**Post date:** [December 11, 2019, 10:43pm UTC](https://community.thunkable.com/t/opening-last-page-crashes-my-app/362763/8 "2019-12-11T22:43:08Z")

</div>

I did have a thing where I had something happen if the variable wasn’t covered, but I missed it in my screenshot. But, I got rid of my if statements and it worked! Thank you so much!

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:46am UTC](https://community.thunkable.com/t/opening-last-page-crashes-my-app/362763/9 "2024-11-08T11:46:23Z")

</div>


