# My Sketch just randomly stops/disappears without a trace

**URL:** <https://discourse.processing.org/t/my-sketch-just-randomly-stops-disappears-without-a-trace/13239>\
**Category:** Processing\
**Created:** [August 7, 2019, 7:18pm UTC](https://discourse.processing.org/t/my-sketch-just-randomly-stops-disappears-without-a-trace/13239 "2019-08-07T19:18:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![wakewatcher](https://avatars.discourse-cdn.com/v4/letter/w/5f9b8f/32.png) [@wakewatcher](https://discourse.processing.org/u/wakewatcher)\
**Post date:** [August 7, 2019, 7:18pm UTC](https://discourse.processing.org/t/my-sketch-just-randomly-stops-disappears-without-a-trace/13239/1 "2019-08-07T19:18:27Z")

</div>

I’ve got a processing sketch that has been merrily humming along for a few months. (This is not some fancy graphics sketch just something I’m using/learning to monitor my HVAC system.) Recently about once a day it just dies. (Not exactly a technical term perhaps.) As I was developing this I always got a null exception error or some other indication of why it crashed but nothing. The serial output I just print out the change of state of the things I’m monitoring. In the past with a null exception crash or index out of bounds or whatever I’d get a red message in the serial stream telling me what caused the crash. What I’m experiencing now is nothing unusual except my “draw” window is gone. Also I notice in the windows task manager than there is one less Java instance running. Finally the processing code box (or whatever its called) is still there and the “play/start” icon/button is still highlighted. So with that rambling my question is: Is there a way to set a trap that reports what/why my program terminates?

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [August 10, 2019, 3:07pm UTC](https://discourse.processing.org/t/my-sketch-just-randomly-stops-disappears-without-a-trace/13239/2 "2019-08-10T15:07:56Z")

</div>

I wouldn’t use println in that scenario at all

Instead collect data and use saveStrings every 10 minutes or so

Also, did you try to make a exe file or are you running the sketch from the ide? I would use an exe file. Like in Export to make the exe.

Anyway, did try to restart you computer and then run the exe file?

I once had a lot of java processes open

---

<div class="post-metadata">

**Author:** ![wakewatcher](https://avatars.discourse-cdn.com/v4/letter/w/5f9b8f/32.png) [@wakewatcher](https://discourse.processing.org/u/wakewatcher)\
**Post date:** [August 17, 2019, 3:47pm UTC](https://discourse.processing.org/t/my-sketch-just-randomly-stops-disappears-without-a-trace/13239/3 "2019-08-17T15:47:35Z")

</div>

(Sorry notification went to spam folder) Yes I run with exe file and do right output to a file. But that doesn’t get me any crash details. (And no crash details from IDE running either.) Just seems odd that IDE is happy to provide crash details (or even warnings as in Map results “infinity”) but not in this case. It’s as if something else is killing it but the only thing I run on this machine is this one process. Well that’s not true for now I also added something called RestartOnCrash.exe which monitors my Process sketch and restarts it when it disappears. I was hoping there would be some general way to trap an exit while running in IDE mode so I can figure out what’s causing it. Thanks.

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [August 17, 2019, 3:58pm UTC](https://discourse.processing.org/t/my-sketch-just-randomly-stops-disappears-without-a-trace/13239/4 "2019-08-17T15:58:01Z")

</div>

When it used to work and now it doesn’t anymore

- the key question is always: what did you change inbetween?

Windows update, new driver, new version, new program…?

---

<div class="post-metadata">

**Author:** ![wakewatcher](https://avatars.discourse-cdn.com/v4/letter/w/5f9b8f/32.png) [@wakewatcher](https://discourse.processing.org/u/wakewatcher)\
**Post date:** [August 17, 2019, 11:21pm UTC](https://discourse.processing.org/t/my-sketch-just-randomly-stops-disappears-without-a-trace/13239/5 "2019-08-17T23:21:23Z")

</div>

There have been several Windows updates over the course of this project. No changes to my program, to my memory, from when it was rock solid to where it daily crashes without warning. I’m assuming, since no one has said otherwise, that there isn’t some setting in the IDE to flip on to do a trace if the program aborts.

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [August 18, 2019, 1:54pm UTC](https://discourse.processing.org/t/my-sketch-just-randomly-stops-disappears-without-a-trace/13239/6 "2019-08-18T13:54:52Z")

</div>

I don’t know

I think there is an debugger

---

<div class="post-metadata">

**Author:** ![wakewatcher](https://avatars.discourse-cdn.com/v4/letter/w/5f9b8f/32.png) [@wakewatcher](https://discourse.processing.org/u/wakewatcher)\
**Post date:** [August 18, 2019, 3:43pm UTC](https://discourse.processing.org/t/my-sketch-just-randomly-stops-disappears-without-a-trace/13239/7 "2019-08-18T15:43:56Z")

</div>

Oh thanks. I’ve never used that and totally forgot about it. I’ll play with that.
