# Why does my program crash sometimes?

**URL:** <https://discourse.processing.org/t/why-does-my-program-crash-sometimes/35497>\
**Category:** Coding Questions\
**Created:** [March 1, 2022, 9:55am UTC](https://discourse.processing.org/t/why-does-my-program-crash-sometimes/35497 "2022-03-01T09:55:32Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [March 1, 2022, 1:04pm UTC](https://discourse.processing.org/t/why-does-my-program-crash-sometimes/35497/4 "2022-03-01T13:04:55Z")

</div>

Hello,

Related topic:

> [@Why am I having the NullPointerException error?](https://discourse.processing.org/t/why-am-i-having-the-nullpointerexception-error/31876/3):
>
> Hello, Try this: String FileName = ""; [image] I created a test.iL7 to test. Reference: [https://forum.processing.org/two/discussion/8071/why-do-i-get-a-nullpointerexception](https://forum.processing.org/two/discussion/8071/why-do-i-get-a-nullpointerexception)slight_smile

Where did you get the error? These may be highlighted when found as in example below.

I am seeing this error with your code:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/b229f208bd6bf99927098d251ddf228358c159f8.png)

Example:

```auto
// String s; // s is not initialized and is a null
String s = ""; // s is initialized and not a null

void setup()
  {
  text(s, 0, 0);
  }

```

Please format your code as a courtesy to our community:  
[https://discourse.processing.org/faq#format-your-code](https://discourse.processing.org/faq#format-your-code)

`:)`

---

_[View the full topic](https://discourse.processing.org/t/why-does-my-program-crash-sometimes/35497)._
