Re: Advice on debugging possible exception or crash

2023-07-06 Thread Cecil Ward via Digitalmars-d-learn
On Thursday, 6 July 2023 at 19:53:39 UTC, Chris Katko wrote: On Thursday, 6 July 2023 at 06:00:04 UTC, Cecil Ward wrote: My program is instrumented with a load of writeflns. At one point it looks as though it suddenly quits prematurely because the expected writeflns are not seen in the output.

Re: Advice on debugging possible exception or crash

2023-07-06 Thread Chris Katko via Digitalmars-d-learn
On Thursday, 6 July 2023 at 06:00:04 UTC, Cecil Ward wrote: My program is instrumented with a load of writeflns. At one point it looks as though it suddenly quits prematurely because the expected writeflns are not seen in the output. It could be that I am just reading the flow of control wrong

Re: Advice on debugging possible exception or crash

2023-07-06 Thread Dukc via Digitalmars-d-learn
On Thursday, 6 July 2023 at 06:00:04 UTC, Cecil Ward wrote: In my limited experience, exceptions produce an error message though, and I’m not seeing anything. Any advice on how to debug this, silent termination ? If unsure on cases like this, test. Intentionally throw an exception and don't

Re: Advice on debugging possible exception or crash

2023-07-06 Thread Cecil Ward via Digitalmars-d-learn
On Thursday, 6 July 2023 at 07:09:11 UTC, Richard (Rikki) Andrew Cattermole wrote: On 06/07/2023 7:07 PM, Cecil Ward wrote: On Thursday, 6 July 2023 at 06:17:34 UTC, Richard (Rikki) Andrew Cattermole wrote: 2 Recommendations: 1. Attach a debugger 2. Make sure to flush stdout whenever you

Re: Advice on debugging possible exception or crash

2023-07-06 Thread Cecil Ward via Digitalmars-d-learn
On Thursday, 6 July 2023 at 06:17:34 UTC, Richard (Rikki) Andrew Cattermole wrote: 2 Recommendations: 1. Attach a debugger 2. Make sure to flush stdout whenever you write I assumed that buffering was to blame. How do I flush stdout? I moved to an x86-64 box. I was using my ARM M2 Mac for

Re: Advice on debugging possible exception or crash

2023-07-06 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 06/07/2023 7:07 PM, Cecil Ward wrote: On Thursday, 6 July 2023 at 06:17:34 UTC, Richard (Rikki) Andrew Cattermole wrote: 2 Recommendations: 1. Attach a debugger 2. Make sure to flush stdout whenever you write I assumed that buffering was to blame. How do I flush stdout? stdout.flush;

Re: Advice on debugging possible exception or crash

2023-07-06 Thread Andrew via Digitalmars-d-learn
On Thursday, 6 July 2023 at 06:00:04 UTC, Cecil Ward wrote: My program is instrumented with a load of writeflns. At one point it looks as though it suddenly quits prematurely because the expected writeflns are not seen in the output. It could be that I am just reading the flow of control wrong

Re: Advice on debugging possible exception or crash

2023-07-06 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
2 Recommendations: 1. Attach a debugger 2. Make sure to flush stdout whenever you write

Advice on debugging possible exception or crash

2023-07-06 Thread Cecil Ward via Digitalmars-d-learn
My program is instrumented with a load of writeflns. At one point it looks as though it suddenly quits prematurely because the expected writeflns are not seen in the output. It could be that I am just reading the flow of control wrong as it goes ret, ret etc. I’m wondering if it is throwing an