# \[solved\] Editor crashing - seemingly when I enter a certain amount of text?

**URL:** <https://in-thread.sonic-pi.net/t/solved-editor-crashing-seemingly-when-i-enter-a-certain-amount-of-text/8184>\
**Category:** Support, Help & Resources\
**Created:** [September 26, 2023, 2:00pm UTC](https://in-thread.sonic-pi.net/t/solved-editor-crashing-seemingly-when-i-enter-a-certain-amount-of-text/8184 "2023-09-26T14:00:10Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![drmindflip](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/drmindflip/32/2627_2.png) [@drmindflip](https://in-thread.sonic-pi.net/u/drmindflip)\
**Post date:** [September 26, 2023, 3:51pm UTC](https://in-thread.sonic-pi.net/t/solved-editor-crashing-seemingly-when-i-enter-a-certain-amount-of-text/8184/3 "2023-09-26T15:51:00Z")

</div>

PS - I have also discovered that `run_file` runs the code in question in its own thread, which means that the rest of your code will proceed as it does so. This can lead to timing errors if, for example, the external file contains variable definitions that your main code needs to reference.

It seems that `eval_file` works the same, but evaluates the contents of the external file _in the current thread_ - so it won’t proceed until it is finished. Perfect!

> [@Run\_file command in a loop](https://in-thread.sonic-pi.net/t/run-file-command-in-a-loop/4827/18):
>
> One thing to try is: live\_loop :repeating\_file\_call do eval\_file "C:/Music/song.rb" end Note that run\_file will run the contents of the file as if you had pressed the Run button - this essentially creates a new thread to run the code so the thing that called run\_file does not wait for it to finish (which is why you were having to explicitly call sleep to wait). However eval\_file runs the contents of the file within the current thread as if it was a function call - so the existing thread will…

---

_[View the full topic](https://in-thread.sonic-pi.net/t/solved-editor-crashing-seemingly-when-i-enter-a-certain-amount-of-text/8184)._
