Adriaan van Os wrote:
I get:
Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_INVALID_ADDRESS (0x0001) at 0x0008203c
Thread 0 Crashed: 0 a.out 0x00009f64 _p_FileHandle + 0x18 (<implicit code>:1079) 1 a.out 0x00003148 _p_WriteErrorMessage + 0x128 (error.pas:750) 2 a.out 0x000033c0 _p__rts_Error_S24_Writestackdump + 0x268 (error.pas:772) 3 a.out 0x00003cc0 _p_EndRuntimeError + 0x38 (error.pas:862) 4 a.out 0x00003dcc _p__rts_Error_S32_Strerror + 0 (error.pas:875) 5 a.out 0x00002350 _p_IORangeCheckError + 0 (error.pas:585) 6 a.out 0x00002068 _p__M0_main_program + 0x23c (pack2.pas:18) 7 a.out 0x000021c4 main + 0x34 (<implicit code>:22) 8 a.out 0x00001a64 _start + 0x188 (crt.c:267) 9 dyld 0x8fe1a558 _dyld_start + 0x64
I think that real backtrace is: FileHandle WriteErrorMessage WriteStackDump Finalize1 EndRuntimeError RuntimeError RangeCheckError
Discrepances IMHO can be explained by tail calls and fuzz in line numbers. Now the question is why do we get range check error and what is happening in `FileHandle' (maybe `StdErr' is uninitialized).