# App crash for no reason. Maybe data source with Google sheet?

**URL:** <https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457>\
**Category:** Questions about Thunkable X\
**Created:** [May 16, 2021, 11:08am UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457 "2021-05-16T11:08:40Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![trawellit](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/trawellit/32/66464_2.png) [@trawellit](https://community.thunkable.com/u/trawellit)\
**Post date:** [May 16, 2021, 11:08am UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/1 "2021-05-16T11:08:40Z")

</div>

Testing an app that I am making, and that used to work fine, now it closes the thunkable app when I open screen3.

Can anyone please tell me why?

Thank you

[https://x.thunkable.com/cop](https://x.thunkable.com/cop)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 16, 2021, 12:59pm UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/2 "2021-05-16T12:59:19Z")

</div>

Your app requires login info and would not be easy to check without access to the different databases you use (Firebase, Airtable) but I noticed that you use a lot of `stored variable` without testing if these variable actually assigned (have values) or not yet assigned (variables = **null** ).

If you try to use a `stored variable` before giving it a value the app will crash so always use the **if condition** to make sure the `stored variable` you are using don **NOT** equal **NULL**.

---

<div class="post-metadata">

**Author:** ![trawellit](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/trawellit/32/66464_2.png) [@trawellit](https://community.thunkable.com/u/trawellit)\
**Post date:** [May 16, 2021, 3:45pm UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/3 "2021-05-16T15:45:18Z")

</div>

Hi Muneer and thanks for the reply.

So when a screen strats should I check if the stored variable is not null?

Could I solve by replacing the stored variable with the app variable?

Why does the app crash if I haven’t changed much?

Crash even older tests with fewer variables?

Thanks.

---

<div class="post-metadata">

**Author:** ![trawellit](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/trawellit/32/66464_2.png) [@trawellit](https://community.thunkable.com/u/trawellit)\
**Post date:** [May 16, 2021, 4:16pm UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/4 "2021-05-16T16:16:34Z")

</div>

Solved.

I followed your advice but above all I eliminated the web viewer I used to create qr codes.

It was the one, apparently, that crashed the app.

I have another question:  
if I use the data source and load the coordinates on a sheet it works, when I ask the google sheet for the coordinates to put them on the map it crashes.

Can you help me?  
Thank you

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [May 16, 2021, 4:40pm UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/5 "2021-05-16T16:40:40Z")

</div>

It probably has to do with numbers vs. text. If you are getting text values (even if they are “121.36792” they are still formatted as text), then you need to convert them to numeric values by adding zero to the text strings.

---

<div class="post-metadata">

**Author:** ![trawellit](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/trawellit/32/66464_2.png) [@trawellit](https://community.thunkable.com/u/trawellit)\
**Post date:** [May 16, 2021, 5:30pm UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/6 "2021-05-16T17:30:24Z")

</div>

Does not work ☹

I saw another thread here that gave the same tip, but it doesn’t work with + 0

 ![Immagine](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/0/b0b2aef5b786d3771e48e33c148ec6dc6f08cda8.png)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 16, 2021, 6:06pm UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/7 "2021-05-16T18:06:09Z")

</div>

I don’t see any map/get location component in the screenshot.

Is it crashing in get value block?

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [May 16, 2021, 6:10pm UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/8 "2021-05-16T18:10:19Z")

</div>

It’s on the right side near the top of the screenshot.

@trawellit What happens if you change the app variable lat and app variable long to text blocks with sample lat/long values in them (plus zero)? Does the map correctly display then?

I’m trying to figure out if the problem is with your data or with your blocks. Your blocks look correct to me. How are you getting the green “row id” block? What event block is above the blocks in your screenshot?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 16, 2021, 7:46pm UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/9 "2021-05-16T19:46:28Z")

</div>

Thank you @tatiang  
I wasn’t seeing it on my phone. I can see it now from the PC. Sign of old age.

---

<div class="post-metadata">

**Author:** ![trawellit](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/trawellit/32/66464_2.png) [@trawellit](https://community.thunkable.com/u/trawellit)\
**Post date:** [May 16, 2021, 8:05pm UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/10 "2021-05-16T20:05:11Z")

</div>

yes. It upload data correctly and retrive data correctly unless coordinates

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 16, 2021, 8:08pm UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/11 "2021-05-16T20:08:01Z")

</div>

Test the block by giving the coordinates (Latitude, Longitude) directly (You enter the values in the code) first and make sure it works. Then we can see if there is a problem with the variables.

---

<div class="post-metadata">

**Author:** ![trawellit](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/trawellit/32/66464_2.png) [@trawellit](https://community.thunkable.com/u/trawellit)\
**Post date:** [May 16, 2021, 8:12pm UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/12 "2021-05-16T20:12:54Z")

</div>

> [@tatiang](#):
>
> What happens if you change the app variable lat and app variable long to text blocks with sample lat/long values in them (plus zero)? Does the map correctly display then?
> 
> I’m trying to figure out if the problem is with your data or with your blocks. Your blocks look correct to me. How are you getting the green “row id” block? What event block is above the blocks in your screenshot?

What happens if you change the app variable lat and app variable long to text blocks with sample lat / long values ​​in them (plus zero)? Does the map correctly display then?

No, it crashes.

How are you getting the green “row id” block? What event block is above the blocks in your screenshot?

Data viewer list item click

---

<div class="post-metadata">

**Author:** ![trawellit](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/trawellit/32/66464_2.png) [@trawellit](https://community.thunkable.com/u/trawellit)\
**Post date:** [May 16, 2021, 8:14pm UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/13 "2021-05-16T20:14:42Z")

</div>

I put some labels with the coordinates and they are correctly taken from the google sheet. The problem happens when I put these coordinates to create a point on the map

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 16, 2021, 8:28pm UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/14 "2021-05-16T20:28:22Z")

</div>

I understand. This is why I want to eliminate the possibility of something wrong in the block.

So if you can type the numbers directly in the block in design time just to see that you will have a mark on the map. This way, we know nothing wrong with the block.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [May 16, 2021, 11:36pm UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/15 "2021-05-16T23:36:52Z")

</div>

@muneer

> [@trawellit](#):
>
> What happens if you change the app variable lat and app variable long to text blocks with sample lat / long values ​​in them (plus zero)? Does the map correctly display then?
> 
> No, it crashes.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 17, 2021, 11:35am UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/16 "2021-05-17T11:35:20Z")

</div>

Yes, I saw it. But I’d rather test the entering the numbers directly in the block itself rather than via the variable. Just my type of weird thinking.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [May 17, 2021, 2:08pm UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/17 "2021-05-17T14:08:55Z")

</div>

Yes, I wrote essentially the same thing. Change the values to a text block. I was just pointing out that they responded “No, it crashes.” I wasn’t sure if you saw that.

---

<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, 1:22pm UTC](https://community.thunkable.com/t/app-crash-for-no-reason-maybe-data-source-with-google-sheet/1286457/18 "2024-11-08T13:22:27Z")

</div>


