1. [phix] ugly error message

 
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

new topic     » topic index » view message » categorize

2. Re: [phix] ugly error message

Brilliant. Should add that to this

https://www.hongkiat.com/blog/40-funny-error-messages-youve-never-seen-before/

Chris

new topic     » goto parent     » topic index » view message » categorize

3. Re: [phix] ugly error message

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.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu