1. [phix] ugly error message
- Posted by _tom (admin) Feb 17, 2021
- 902 views
sequence raw = { { "1", "one" }, { "2", "two" }, { "3", "three" }, $} atom fn = open( "foo.txt", "w" ) for i=1 to length(raw) do puts(fn, raw[i] ) --<<<< my bad end for /* diag looping, error code is 28, era is #007B0BCB pDiagN.e line 3322: symtab[772] bad S_NTyp[3] {-1,3,0,8194,0,0,12,0,-230,0,1,12,0,0,0} "sleep(5)..." pDiagN.e line 3064: oops, rtn[=1515] out of range[1..1110] pDiagN.e line 3064: oops, rtn[=1531] out of range[1..1110] /home/fred/tv/tomcode/crash/crash.exw:-1 (era=#007FBBB7, from_addr=#0, ret_addr=#0) index 0 out of bounds, reading sequence length 22 */
I know what the error is, but how is someone else to know?
be well
_tom
2. Re: [phix] ugly error message
- Posted by ChrisB (moderator) Feb 17, 2021
- 911 views
Brilliant. Should add that to this
https://www.hongkiat.com/blog/40-funny-error-messages-youve-never-seen-before/
Chris
3. Re: [phix] ugly error message
- Posted by petelomax Feb 17, 2021
- 899 views
Thanks, fixed as follows. In builtins/VM/pFileioN.e lines 5148 (32-bit) and 5221 (64 bit)
::puts1sqe65sfics add esp,16 -- (locates era properly) ::putsqe65sfics -- DEV "" to do ::puts1sqe65sfics add rsp,32 -- (locates era properly[?]) ::putsqe65sfics -- DEV "" to do
changed to:
::puts1sqe65sfics add esp,8 -- (locates era properly) ::putsqe65sfics add esp,8 -- (locates era properly) ::puts1sqe65sfics add rsp,16 -- (locates era properly) ::putsqe65sfics add rsp,16 -- (locates era properly)
In my defence you stumbled into a fragment of code triggered by eg puts(1,{'a','b','c'}) which isn't exercised very often.