1. phix error
- Posted by irv in July
- 783 views
Downloaded latest version today, got this error in the tests:
<unknown file>(39):-1 (era=#082F08B0, from_addr=#F7BD779A, ret_addr=#082F1200)
type check failure, subscript is 141
... called from /usr/local/bin/builtins/pApply.e:-1 (era=#082F11FF, from_addr=#F7BE287C, r
et_addr=#F7BE28D2) in function apply_()
s = {-4.5,-3.5,-2.5,-1.5,-0.5,0.5,1.5,2.5,3.5,4.5}
fn = 321
pf = 2
userdata = {}
maxp = 2
minp = 1
res = {0,0,0,0,0,0,0,0,0,0}
l = <novalue>
n = <novalue>
args = <novalue>
multi = <novalue>
i = 1
ui = <novalue>
m = <novalue>
j = <novalue>
ui = <novalue>
lui = <novalue>
ls = 10
... called from /usr/local/bin/builtins/pApply.e:123 in function apply()
s = <novalue>
fn = 321
userdata = {}
... called from /usr/local/bin/test/t37misc.exw:545
Global & Local Variables
/usr/local/bin/builtins/VM/pprntfN.e:
init2 = 1
inf = inf
:
Line 545 is:
if apply(x1,bankers_rounding)!={-4,-4,-2,-2,0,0,2,2,4,4} then ?9/0 end if
irv@irv-desktop:/usr/local/bin$ ./p --version 1.0.5 irv@irv-desktop:/usr/local/bin$ uname -a Linux irv-desktop 5.15.0-41-generic #44-Ubuntu SMP Wed Jun 22 14:20:53 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
2. Re: phix error
- Posted by petelomax in July
- 647 views
Sorry, that has rather defeated me. I've just downloaded 1.0.5 onto a fresh Ubuntu VM and it all works perfectly.
And I've no clue why the error is messed up, other than from/ret_addr looking like garbage, from somewhere along
the somewhat tricky call_func() path, at a guess. All I can suggest is try reinstalling.
3. Re: phix error
- Posted by irv in July
- 625 views
Ran tests on 2 different linux versions, both downloaded and compiled fresh today. Same hardware. This one fails:
irv@irv-desktop:/usr/local/bin$ uname -a Linux irv-desktop 5.15.0-41-generic #44-Ubuntu SMP Wed Jun 22 14:20:53 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Testing[34]: /usr/local/bin/test/t34andor.exw
Testing[35]: /usr/local/bin/test/t35cncat.exw
Testing[36]: /usr/local/bin/test/t36match.exw
Testing[37]: /usr/local/bin/test/t37misc.exw
<unknown file>(39):-1 (era=#082F08B0, from_addr=#F7B4F79A, ret_addr=#082F1200)
type check failure, subscript is 141
... called from /usr/local/bin/builtins/pApply.e:-1 (era=#082F11FF, from_addr=#F7B5A87C, ret_addr=#F7B5A8D2) in function apply_()
s = {-4.5,-3.5,-2.5,-1.5,-0.5,0.5,1.5,2.5,3.5,4.5}
fn = 321
pf = 2
userdata = {}
maxp = 2
minp = 1
res = {0,0,0,0,0,0,0,0,0,0}
l = <novalue>
n = <novalue>
Global & Local Variables
--> see /usr/local/bin/test/ex.err
Press Enter...1.0.5
And this one succeeds, all tests completed satisfactorily:
irv@irv-desktop:~$ uname -a Linux irv-desktop 6.8.0-41-generic #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 2 20:41:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
4. Re: phix error
- Posted by petelomax in July
- 621 views
Several years ago they changed the stack alignment in the kernel. The fix was pretty easy once I knew what was going wrong,
but it took me ten months to figure that out, even with it going wrong right in front of me. I wonder if this is kernel-related.
Ref: As per https://openeuphoria.org/forum/137606.wc that bug was fixed back when 1.0.2 shipped, so it's not that.
PS: one thing you could try is putting these at the start/end of builtins\pmaths.e\bankers_rounding():
?{"bankers_rounding","pence",pence,"precision",precision} ?{"pennies",pennies}
Then at least we'd know if it was failing within that routine.
5. Re: phix error
- Posted by irv in July
- 601 views
I don't think it is the bankers routine. I downloaded again, and this time the errors are repeatable, fails in same spot each time. Here's the ex.err:
<unknown file>(39):-1 (era=#082F08B0, from_addr=#F7BA779A, ret_addr=#082F1200)
type check failure, subscript is 2203
... called from /usr/local/bin/builtins/pApply.e:-1 (era=#082F11FF, from_addr=#F7BB287C, ret_addr=#F7BB28D2) in function apply_()
s = {-4.5,-3.5,-2.5,-1.5,-0.5,0.5,1.5,2.5,3.5,4.5}
fn = 321
pf = 2
userdata = {}
maxp = 2
minp = 1
res = {0,0,0,0,0,0,0,0,0,0}
l = <novalue>
n = <novalue>
args = <novalue>
multi = <novalue>
i = 1
ui = <novalue>
m = <novalue>
j = <novalue>
ui = <novalue>
lui = <novalue>
ls = 10
... called from /usr/local/bin/builtins/pApply.e:123 in function apply()
s = <novalue>
fn = 321
userdata = {}
... called from /usr/local/bin/test/t37misc.exw:545
Global & Local Variables
/usr/local/bin/builtins/VM/pprntfN.e:
init2 = 1
inf = inf
nan = nan
prefer_backtick = 0
hexchar = `0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`
dxoetc = `dxobstncvVRefgEXG`
bases = {10,16,8,2}
unicode_align = 0
asChdef = 0
/usr/local/bin/test/t37misc.exw:
a = 151733512
b = 152378584
ip = 15
/usr/local/bin/builtins/machine.e:
check_calls = <novalue>
edges_only = <novalue>
/usr/local/bin/test/t37misc.exw:
i = 5
result = 1342242816.0
s = {`Pete`,{1,0,-1},3.141592654,-3.141592654}
idx = 5
idx = 5
charset = {2,13}
d = `/usr/local/bin/test`
e = `/usr/local`
A = 1
x = 7
y = 2
work = 1073741824.0
z = 2.5
o = {0,36863,65530}
flatsym = {{},1}
si = {}
pkey = <novalue>
xSystemTime = 151733512
res = {2011,2011}
r_click_OpenRecentFile = 2674
r = 2
doit = 0
x1 = {-4.5,-3.5,-2.5,-1.5,-0.5,0.5,1.5,2.5,3.5,4.5}
args = <novalue>
rOX = <novalue>
res2 = <novalue>
strange = <novalue>
ending = <novalue>
inc = -1
/usr/local/bin/builtins/dict.e:
trees = <novalue>
treenames = <novalue>
roots = <novalue>
sizes = <novalue>
defaults = <novalue>
freelists = <novalue>
free_trees = 0
init_dict = 0
And here's what appears when I run p -test. Note the subscript 2203 is the same each time:
Testing[33]: /usr/local/bin/test/t33seqop.exw
Testing[34]: /usr/local/bin/test/t34andor.exw
Testing[35]: /usr/local/bin/test/t35cncat.exw
Testing[36]: /usr/local/bin/test/t36match.exw
Testing[37]: /usr/local/bin/test/t37misc.exw
<unknown file>(39):-1 (era=#082F08B0, from_addr=#F7BA779A, ret_addr=#082F1200)
type check failure, subscript is 2203
... called from /usr/local/bin/builtins/pApply.e:-1 (era=#082F11FF, from_addr=#F7BB287C, ret_addr=#F7BB28D2) in function apply_()
s = {-4.5,-3.5,-2.5,-1.5,-0.5,0.5,1.5,2.5,3.5,4.5}
fn = 321
pf = 2
userdata = {}
maxp = 2
minp = 1
res = {0,0,0,0,0,0,0,0,0,0}
l = <novalue>
n = <novalue>
Global & Local Variables
--> see /usr/local/bin/test/ex.err
Press Enter...
6. Re: phix error
- Posted by petelomax in July
- 560 views
Does p -c /usr/local/bin/test/t37* go wrong?
If it does, can you run p -d /usr/local/bin/test/t37* and look in the list.asm it creates in that directory,
then search for "symtab[17=filenames]" to see if that helps us figure out the "<unknown file>(39)" part?
7. Re: phix error
- Posted by irv in July
- 573 views
Here's what I got on the installation that fails:
symtab[16=filepaths][1]:`/usr/local/bin/builtins/`
[2]:`/usr/local/bin/builtins/VM/`
[3]:`/usr/local/bin/`
[4]:`/usr/local/bin/test/`
symtab[17=filenames][1]:{4, `t37misc.exw`}
[2]:{2, `pDiagN.e`}
[3]:{2, `pprntfN.e`}
[4]:{2, `pPower.e`}
[5]:{2, `pHeap.e`}
[6]:{2, `pDeleteN.e`}
[7]:{2, `pcallfunc.e`}
[8]:{2, `pStack.e`}
[9]:{2, `pFEH.e`}
[10]:{2, `puts1.e`}
[11]:{2, `pUnassigned.e`}
[12]:{2, `pFPU.e`}
[13]:{1, `pcurrdir.e`}
[14]:{1, `pgetpath.e`}
[15]:{1, `peekstr.e`}
[16]:{1, `pcase.e`}
[17]:{1, `ppp.e`}
[18]:{1, `puts1h.e`}
[19]:{2, `pSubseN.e`}
[20]:{2, `pFixup.e`}
[21]:{2, `pSubssN.e`}
[22]:{2, `pRepeN.e`}
[23]:{2, `pRepsN.e`}
[24]:{2, `pMkSqN.e`}
[25]:{2, `pApnd.e`}
[26]:{2, `pJcc.e`}
[27]:{2, `pType.e`}
[28]:{2, `pUnary.e`}
[29]:{2, `pMath.e`}
[30]:{2, `pXor.e`}
[31]:{2, `pLen.e`}
[32]:{2, `pRmdr.e`}
[33]:{2, `pMem.e`}
[34]:{2, `pfileioN.e`}
[35]:{2, `pJnotx.e`}
[36]:{1, `find.e`}
[37]:{1, `match.e`}
[38]:{1, `to_int.e`}
[39]:{1, `pAlloc.e`}
[40]:{2, `pFloatN.e`}
[41]:{1, `pflatten.e`}
[42]:{1, `pApply.e`}
[43]:{1, `get_routine_info.e`}
[44]:{2, `prtnidN.e`}
[45]:{2, `pcmdlnN.e`}
[46]:{2, `pTrig.e`}
[47]:{1, `pfile.e`}
[48]:{1, `file_utils.e`}
[49]:{2, `pRand.e`}
[50]:{2, `pcfunc.e`}
[51]:{2, `cbhand.e`}
[52]:{1, `pmaths.e`}
[53]:{1, `pfindall.e`}
[54]:{1, `repeat.e`}
[55]:{1, `hasdel.e`}
[56]:{1, `misc.e`}
[57]:{1, `sort.e`}
[58]:{1, `machine.e`}
[59]:{1, `psplit.e`}
[60]:{1, `pfindany.e`}
[61]:{1, `substitute.e`}
[62]:{1, `ptagset.e`}
[63]:{1, `shift_bits.e`}
[64]:{1, `pdir.e`}
[65]:{1, `wildcard.e`}
[66]:{1, `penv.e`}
[67]:{1, `psqop.e`}
[68]:{1, `log10.e`}
[69]:{1, `ptrim.e`}
[70]:{1, `psum.e`}
[71]:{1, `utfconv.e`}
[72]:{1, `pCrashN.e`}
[73]:{1, `pchdir.e`}
[74]:{1, `serialize.e`}
[75]:{1, `punique.e`}
[76]:{1, `dict.e`}
symtab[18]:0 (T_nslink)
symtab[19]:1 (T_cmdlnflg)
symtab[20=optable][1]:#080D4AB4 (:%puts1)
...
8. Re: phix error
- Posted by irv in July
- 561 views
ex.err from running t37exw looks like this:
<unknown file>(39):-1 (era=#082F08B0, from_addr=#F7C5379A, ret_addr=#082F1200)
type check failure, subscript is 0
... called from /usr/local/bin/builtins/pApply.e:-1 (era=#082F11FF, from_addr=#F7C5E87C, ret_addr=#F7C5E8D2) in function apply_()
s = {-4.5,-3.5,-2.5,-1.5,-0.5,0.5,1.5,2.5,3.5,4.5}
fn = 321
pf = 2
userdata = {}
maxp = 2
minp = 1
res = {0,0,0,0,0,0,0,0,0,0}
l = <novalue>
n = <novalue>
args = <novalue>
multi = <novalue>
i = 1
ui = <novalue>
m = <novalue>
j = <novalue>
ui = <novalue>
lui = <novalue>
ls = 10
... called from /usr/local/bin/builtins/pApply.e:123 in function apply()
s = <novalue>
fn = 321
userdata = {}
... called from /usr/local/bin/test/t37misc.exw:545
line 123 in pApply.e is:
s = apply_(s,fn,APPLY_FUNC,userdata)
and line 545 in t37misc is
if apply(x1,bankers_rounding)!={-4,-4,-2,-2,0,0,2,2,4,4} then ?9/0 end if

