# If I insert this block, execution stops at the point

**URL:** <https://community.thunkable.com/t/if-i-insert-this-block-execution-stops-at-the-point/417638>\
**Category:** Questions about Thunkable X\
**Created:** [January 20, 2020, 11:43am UTC](https://community.thunkable.com/t/if-i-insert-this-block-execution-stops-at-the-point/417638 "2020-01-20T11:43:02Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![mom7667yafy](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mom7667yafy](https://community.thunkable.com/u/mom7667yafy)\
**Post date:** [January 20, 2020, 11:43am UTC](https://community.thunkable.com/t/if-i-insert-this-block-execution-stops-at-the-point/417638/1 "2020-01-20T11:43:02Z")

</div>

I put a memory\_Storge block and it stopped running at that block. Since local storage is used a lot this way, I don’t understand why it hangs.

 ![스크린샷 2020-01-20 오후 8.25.25](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/f/5f728d73ae1fb271e5fd2653385d010441ade185.png)

---

<div class="post-metadata">

**Author:** ![mom7667yafy](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mom7667yafy](https://community.thunkable.com/u/mom7667yafy)\
**Post date:** [January 20, 2020, 12:01pm UTC](https://community.thunkable.com/t/if-i-insert-this-block-execution-stops-at-the-point/417638/2 "2020-01-20T12:01:17Z")

</div>

[![](https://img.youtube.com/vi/1DqENwMtX1E/maxresdefault.jpg "RPReplay Final1579520241") ](https://www.youtube.com/watch?v=1DqENwMtX1E)

Live Test will run like the video above.

[![](https://img.youtube.com/vi/MoO4DqrjHKw/maxresdefault.jpg "RPReplay Final1579520329") ](https://www.youtube.com/watch?v=MoO4DqrjHKw)

Download ios / android and it will run like the video above.  
I choose the right answer and the screen freezes and doesn’t move on to the next problem.

 ![20200120_155626](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/0/e0ab992003d8490d6e99b892338ee16d3f55711a.jpeg)

So to see the cause, I looked at the block that implemented this part.  
The figure above shows the execution block when the correct answer is chosen.  
When the live test is running without any problem, it breaks down one by one to explain why it should not be downloaded.

So what I found is the first picture attached.  
The problem was with local storage.  
But I haven’t solved the problem yet.  
I tried changing the name to English to try to solve it, but the hang continued.

Is this a bug?  
Please comment.

---

<div class="post-metadata">

**Author:** ![mom7667yafy](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mom7667yafy](https://community.thunkable.com/u/mom7667yafy)\
**Post date:** [January 20, 2020, 12:22pm UTC](https://community.thunkable.com/t/if-i-insert-this-block-execution-stops-at-the-point/417638/3 "2020-01-20T12:22:16Z")

</div>

![스크린샷 2020-01-20 오후 9.09.34](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/4/34967821f25ba570f66d526291453c34bf3eda6d.png)

For now, inserting a list insert block will stop execution.  
I don’t know what the cause is.

---

<div class="post-metadata">

**Author:** ![mom7667yafy](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mom7667yafy](https://community.thunkable.com/u/mom7667yafy)\
**Post date:** [January 20, 2020, 3:14pm UTC](https://community.thunkable.com/t/if-i-insert-this-block-execution-stops-at-the-point/417638/4 "2020-01-20T15:14:12Z")

</div>

![스크린샷 2020-01-20 오후 11.59.45](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/e/7e49fc46382a30ec14411450c5e8042845333ab2.png)  
So far I think  
There seems to be an error in the list insert at block.  
Runs up to the insert block and stops at insert.  
If you insert the insert block into then do like the attached snapshot, execution will continue without stopping.

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [January 20, 2020, 4:33pm UTC](https://community.thunkable.com/t/if-i-insert-this-block-execution-stops-at-the-point/417638/5 "2020-01-20T16:33:54Z")

</div>

@mom7667yafy, can you try placing a label in your app and the using this to output the contents of your list, before and after writing to it?

Thanks

---

<div class="post-metadata">

**Author:** ![mom7667yafy](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mom7667yafy](https://community.thunkable.com/u/mom7667yafy)\
**Post date:** [January 20, 2020, 4:51pm UTC](https://community.thunkable.com/t/if-i-insert-this-block-execution-stops-at-the-point/417638/6 "2020-01-20T16:51:54Z")

</div>

I don’t know what you mean.  
Does what you say solve my problem?

After printing the value obtained from local storage to the label  
Do you mean run a list insert?

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [January 20, 2020, 5:26pm UTC](https://community.thunkable.com/t/if-i-insert-this-block-execution-stops-at-the-point/417638/7 "2020-01-20T17:26:52Z")

</div>

> [@mom7667yafy](#):
>
> Does what you say solve my problem?

I’m just hoping to diagnose the problem first - so for example, I’m wondering if you’re initialising the list, or what values you have before and after you write values to your list?

---

<div class="post-metadata">

**Author:** ![mom7667yafy](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mom7667yafy](https://community.thunkable.com/u/mom7667yafy)\
**Post date:** [January 20, 2020, 6:33pm UTC](https://community.thunkable.com/t/if-i-insert-this-block-execution-stops-at-the-point/417638/8 "2020-01-20T18:33:16Z")

</div>

![스크린샷 2020-01-21 오전 3.06.20](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/d/2d309347e4db1a9c676c0866a92b78248cc696e1.png) ![IMG_7B4A6D103B44-1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/7/d7dd5ad61533692275dfa1b311ce995951b6b68d.jpeg)

[https://x.thunkable.com/copy/2277e40420af63fe2c4f066e899f9610](https://x.thunkable.com/copy/2277e40420af63fe2c4f066e899f9610)

I created a partial sample that shouldn’t be in my app.  
Pressing the done button adds the word pressed to the local storage.

By the way, the sample works strangely what I want.  
In live test, it should work normally and if you download it,  
The samples I made both work fine. So something is different.  
But the concept is the same.

What I don’t do in my app is that it stops running in the insert block, which adds the completed word to the list. It doesn’t go to the next code.  
But live test goes well. By the way, do not run the file you downloaded. I’m very confused because the live test and the downloaded file run differently.

---

<div class="post-metadata">

**Author:** ![jane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jane/32/27575_2.png) [@jane](https://community.thunkable.com/u/jane)\
**Post date:** [January 20, 2020, 9:26pm UTC](https://community.thunkable.com/t/if-i-insert-this-block-execution-stops-at-the-point/417638/9 "2020-01-20T21:26:47Z")

</div>

Hi there,

The Local Storage component is suited to storing a single value at a time. it does not work well with lists.

The best option would be to save everything you currently have as a Local Storage value as a stored variable. These fulfill the same task as the Local Storage component (saves data between sessions) except 1) the stored variable is easier to use and 2) it can be of any data type, including lists.

If you really want to stay using the local storage component, you will need to 1) convert your list to a string before saving it to Local Storage, and 2) convert that list to a string when you retrieve it. You can find the block for these functions in the Lists drawer of blocks.

Thanks,  
Jane

---

<div class="post-metadata">

**Author:** ![mom7667yafy](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mom7667yafy](https://community.thunkable.com/u/mom7667yafy)\
**Post date:** [January 20, 2020, 9:28pm UTC](https://community.thunkable.com/t/if-i-insert-this-block-execution-stops-at-the-point/417638/10 "2020-01-20T21:28:55Z")

</div>

I did my work based on what you said.  
Most of the local storage has been changed with the stored variables.  
In the live test, it is faster and reduces the number of blocks.  
However, when I run the app with ios / android download, the same phenomenon does not proceed.  
If it does in live test but not in download, isn’t it a bug?

---

<div class="post-metadata">

**Author:** ![mom7667yafy](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mom7667yafy](https://community.thunkable.com/u/mom7667yafy)\
**Post date:** [January 20, 2020, 9:41pm UTC](https://community.thunkable.com/t/if-i-insert-this-block-execution-stops-at-the-point/417638/11 "2020-01-20T21:41:29Z")

</div>

![스크린샷 2020-01-21 오전 6.23.15](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/f/7fef56705f9db5c3b7da4fabb6678d47dcebb19a.png)  
Whether working with local storage or stored variables, everything works fine with Live Test.  
But when I download and run the app, it doesn’t work.  
Like the YouTube video I attached to the community, the screen freezes when the quiz is correct.  
I think this is just a bug.

---

<div class="post-metadata">

**Author:** ![jane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jane/32/27575_2.png) [@jane](https://community.thunkable.com/u/jane)\
**Post date:** [January 20, 2020, 9:50pm UTC](https://community.thunkable.com/t/if-i-insert-this-block-execution-stops-at-the-point/417638/12 "2020-01-20T21:50:52Z")

</div>

That last block is still saving a list to Local Storage. Please either use a stored variable block or a block to convert the list to a string.

---

<div class="post-metadata">

**Author:** ![mom7667yafy](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mom7667yafy](https://community.thunkable.com/u/mom7667yafy)\
**Post date:** [January 20, 2020, 10:12pm UTC](https://community.thunkable.com/t/if-i-insert-this-block-execution-stops-at-the-point/417638/13 "2020-01-20T22:12:12Z")

</div>

The last block has nothing to do with the freezing that happens to me.  
But I’ll try again later.

---

<div class="post-metadata">

**Author:** ![mom7667yafy](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mom7667yafy](https://community.thunkable.com/u/mom7667yafy)\
**Post date:** [January 20, 2020, 10:13pm UTC](https://community.thunkable.com/t/if-i-insert-this-block-execution-stops-at-the-point/417638/14 "2020-01-20T22:13:53Z")

</div>

Just remove the two insert blocks in the attached picture and everything works fine.

---

<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:45am UTC](https://community.thunkable.com/t/if-i-insert-this-block-execution-stops-at-the-point/417638/15 "2024-11-08T11:45:56Z")

</div>


