# How would I explore and identify random crashes

**URL:** https://discourse.processing.org/t/how-would-i-explore-and-identify-random-crashes/24531
**Category:** Processing
**Created:** [October 12, 2020, 2:58am UTC](https://discourse.processing.org/t/how-would-i-explore-and-identify-random-crashes/24531 "2020-10-12T02:58:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)
#### Post date: [October 12, 2020, 2:58am UTC](https://discourse.processing.org/t/how-would-i-explore-and-identify-random-crashes/24531/1 "2020-10-12T02:58:56Z")

</div>

I have a program which is rather large, and sometime with no warning it will just freeze. Now it doesnt crash with a spinning cursor which is the usual, no it just freezes, I can close it without any problem but cannot click anywhere.

Is there something I can do to track the source of the error?

---

<div class="post-metadata">

### Author: ![tony](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tony/32/949_2.png) [@tony](https://discourse.processing.org/u/tony)
#### Post date: [October 12, 2020, 6:35am UTC](https://discourse.processing.org/t/how-would-i-explore-and-identify-random-crashes/24531/2 "2020-10-12T06:35:08Z")

</div>

Any SE would kill for the answer to that question. They say you spend more time maintaining a codebase than you do writing it, and a large part of that is undoubtedly fixing “random” crashes.

So, where would I start?  
Try to reproduce the crash consistently. Be careful and observant. Take notes even.

(hopefully) Once you’re able to consistently reproduce the crash, it’s time to run the debugger. (There’s plenty of great resources on using debuggers, regardless of IDE, go check em out). What you’re trying to do is find the section of code where it fails.

This part is, in my experience, more of an art. If I can say anything it’s this: it’s gonna take time. Not really any shortcuts.

> [@paulgoux](#):
>
> Is there something I can do to track the source of the error?

Is the crash throwing anything into the console?

---

<div class="post-metadata">

### Author: ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)
#### Post date: [October 12, 2020, 7:05am UTC](https://discourse.processing.org/t/how-would-i-explore-and-identify-random-crashes/24531/3 "2020-10-12T07:05:50Z")

</div>

nothing, at all … just blank.

Thanks I shall look into debuggers and see if I can isolate the problem.

---

<div class="post-metadata">

### Author: ![SomeOne](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/someone/32/8639_2.png) [@SomeOne](https://discourse.processing.org/u/SomeOne)
#### Post date: [October 12, 2020, 8:23am UTC](https://discourse.processing.org/t/how-would-i-explore-and-identify-random-crashes/24531/4 "2020-10-12T08:23:27Z")

</div>

Freeze can be an infinite loop. If nothing happens it could be initiated from draw() or any function draw() calls. As @tony said reproducing the error is the first thing to do, otherwise it needs dumb luck to find the problem.
