1. Installing Phix

I tried installing Phix. Got the Visual C error, went and got VC from MS. Re-ran phix.0.7.7.setup.exe, got this:

 
C:\Phix\demo\pGUI\pdemo\setup.ew:752 in procedure setButtonStates() 
  (warning: lineno of -1 for era of #0060FC01) 
fatal exception #80000003 at #0060FC01 
    subkey = <novalue> 
    verb = <novalue> 
    subname = <novalue> 
    key_id = <novalue> 
    subkeys = <novalue> 
    subkeyidx = <novalue> 
    actual = <novalue> 
    res = <novalue> 
    k = <novalue> 
    d = {{"edita.exw","a",290709,2017,12,1,16,56,32}} 
    Icon = "\"C:\\Phix\\ptick.ico\",0" 
    ErrorIcon = "\"C:\\Phix\\pcross.ico\",0" 
 
Global & Local Variables 
 
--> see C:\Phix\ex.err 
Press Enter... 
Now what do i do?

new topic     » topic index » view message » categorize

2. Re: Installing Phix

Can you tell me what happens when you run "p -test" and "p pdemo"

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

3. Re: Installing Phix

petelomax said...

Can you tell me what happens when you run "p -test" and "p pdemo"

p -test = All tests completed successfully, 6.17 seconds

p pdemo =

C:\Phix>p pdemo 
 
C:\Phix\demo\pGUI\pdemo\setup.ew:752 in procedure setButtonStates() 
  (warning: lineno of -1 for era of #0060FC01) 
fatal exception #80000003 at #0060FC01 
    subkey = <novalue> 
    verb = <novalue> 
    subname = <novalue> 
    key_id = <novalue> 
    subkeys = <novalue> 
    subkeyidx = <novalue> 
    actual = <novalue> 
    res = <novalue> 
    k = <novalue> 
    d = {{"edita.exw","a",290709,2017,12,1,16,56,32}} 
    Icon = "\"C:\\Phix\\ptick.ico\",0" 
    ErrorIcon = "\"C:\\Phix\\pcross.ico\",0" 
 
Global & Local Variables 
 
--> see C:\Phix\ex.err 
Press Enter... 
The ex.err is huge, so i put it at http://designer [removethisspace] thinking [dot] com [ slash ] ex.err

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

4. Re: Installing Phix

katsmeow said...
petelomax said...

Can you tell me what happens when you run "p -test" and "p pdemo"

p -test = All tests completed successfully, 6.17 seconds

p pdemo =

C:\Phix\demo\pGUI\pdemo\setup.ew:752 in procedure setButtonStates() 
  (warning: lineno of -1 for era of #0060FC01) 
fatal exception #80000003 at #0060FC01 

So the base install seems fine, but it seems to be crashing when trying to read the windows registry.

Unfortunately that ex.err is not much help to me because of that unrecognised address (#0060FC01), and I cannot reproduce the problem here (I tried on both Windows 10 and Windows XP).

Can you run p -d pdemo and then run the pdemo.exe it produces. It will most likely give the same error but at a different address. Can you then open the list.asm it also produced (if you thought that ex.err was big...) and try and find the address given - if necessary drop the last digit, so were it the same address as above, you'd be searching for #0060FC0. Finally can you post +/-15 lines of that list.asm here.

I am expecting the offending instruction to be an int3 in builtins or builtins/VM, but I need to know precisely which one.

Meantime, you should now be able to test small snippets of code as originally wanted.

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

5. Re: Installing Phix

Ok, to get the address ...

C:\Phix>pdemo.exe 
 
C:\Phix\demo\pGUI\pdemo\setup.ew:752 in procedure setButtonStates() 
  (warning: lineno of -1 for era of #004B7D6E) 
fatal exception #80000003 at #004B7D6E 
    subkey = <novalue> 
    verb = <novalue> 
    subname = <novalue> 
    key_id = <novalue> 
    subkeys = <novalue> 
    subkeyidx = <novalue> 
    actual = <novalue> 
    res = <novalue> 
    k = <novalue> 
    d = {{"edita.exw","a",290709,2017,12,1,16,56,32}} 
    Icon = "\"C:\\Phix\\ptick.ico\",0" 
    ErrorIcon = "\"C:\\Phix\\pcross.ico\",0" 
 
Global & Local Variables 
 
--> see C:\Phix\ex.err 
Press Enter... 
C:\Phix> 

and then searching list.asm for 004B7D6E ... found in only one place in the file, and a copy/paste from start of procedure to 15 lines past that line ...

 
;  3388 procedure :%pAllocStr(:%) 
;  3389 end procedure -- (for Edita/CtrlQ) 
;  3390 --*/ 
;  3391     :%pAllocStr 
;  3392 --------------- 
;  3393     [32] 
;  3394         -- Allocate a string of length ecx. 
;  3395         -- Sets the length, type/refcount, and returns a ref in eax. 
;  3396         -- All other registers (except eax) are preserved. 
;  3397         test ecx,ecx 
                test ecx,ecx              ;#004B7D6A: 205311                     uv 00 02  1 955       
;  3398 --      js e101atasonl                    ; attempt to allocate string of negative length 
;  3399 --      js :invalidmemoryrequest 
;  3400         jns @f 
                jns #004B7D6F             ;#004B7D6C: 171 01                     v  00 00  1 955       
;  3401             int3 
                    int3                  ;#004B7D6E: 314                        np 00 00 13 956       
;  3402       @@: 
;  3403         pushad 
                pushad                    ;#004B7D6F: 140                        np 00 FF  5 969       
;  3404         add ecx,17                      -- header plus terminating null 
                add ecx,17                ;#004B7D70: 203301 11                  uv 02 02  1 974       
;  3405         xor ebx,ebx                     -- (save some grief) 
                xor ebx,ebx               ;#004B7D73: 061333                     vu 08 08  1 974       
;  3406         mov edx,[esp+32]                -- era 
                mov edx,[esp+32]          ;#004B7D75: 213124044 20               uv 04 10  1 975       
;  3407         call :%pGetPool                 -- allocate ecx bytes, rounded up 
                call #004B78E0 (:%pGetPool)  ;#004B7D79: 350 62FBFFFF               v  00 00  1 975       
;  3408         test eax,eax 
                test eax,eax              ;#004B7D7E: 205300                     uv 00 01  1 976       
;  3409 --      jz :memoryallocationfailure 
;  3410         jnz @f 
                jnz #004B7D91             ;#004B7D80: 165 0F                     v  00 00  1 976       
;  3411             mov edx,[esp+32]                -- era 
                    mov edx,[esp+32]      ;#004B7D82: 213124044 20               uv 04 10  1 977       
;  3412             mov al,33   -- e33maf 
                    mov al,33             ;#004B7D86: 260 21                     vu 01 00  1 977       
;  3413             sub edx,1 
                    sub edx,1             ;#004B7D88: 203352 01                  uv 04 04  1 978       
;  3414             jmp :!iDiag 
                    jmp #004B8604 (:!iDiag)  ;#004B7D8B: 351 74080000               v  00 00  1 978       
;  3415             int3 
                    int3                  ;#004B7D90: 314                        np 00 00 13 979       
;  3416       @@: 
;  3417         mov ecx,[esp+24]                -- retrieve original length (ecx from the pushad) 
                mov ecx,[esp+24]          ;#004B7D91: 213114044 18               uv 02 10  1 992       
;  3418         mov [eax],edx                   -- set maxlen 
                mov [eax],edx             ;#004B7D95: 211020                     vu 00 05  1 992       
;  3419         lea edx,[eax+17]                --      ref: raw plus header & type bit, 
                lea edx,[eax+17]          ;#004B7D97: 215120 11                  uv 04 01  1 993       
;  3420         mov [eax+4],ecx                 -- set length 
 
And the top of the ex.err file is:
C:\Phix\demo\pGUI\pdemo\setup.ew:752 in procedure setButtonStates() 
fatal exception #80000003 at #004B7D6E 
    subkey = <novalue> 
    verb = <novalue> 
    subname = <novalue> 
    key_id = <novalue> 
    subkeys = <novalue> 
    subkeyidx = <novalue> 
    actual = <novalue> 
    res = <novalue> 
    k = <novalue> 
    d = {{"edita.exw","a",290709,2017,12,1,16,56'8',32' '}} 
    Icon = "\"C:\\Phix\\ptick.ico\",0" 
    ErrorIcon = "\"C:\\Phix\\pcross.ico\",0" 
    RunEx = "\"C:\\Phix\\p.exe\" \"%1\"" 
    RunExw = "\"C:\\Phix\\pw.exe\" \"%1\"" 
    HKLMPath = "%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\System32\\Wbem;C:\\batch;" 
    HKCUPath = <novalue> 
    parts = <novalue> 
    phixes = <novalue> 
    uparts = <novalue> 
    uphixes = <novalue> 
    c = <novalue> 
    lPaths = {"","",""} 
    pt = <novalue> 
    ptO = <novalue> 
    wasFocus = <novalue> 
    i = <novalue> 
    i = <novalue> 
    j = <novalue> 
    dix = <novalue> 
    j = <novalue> 
... called from C:\Phix\demo\pGUI\pdemo\setup.ew:1557 in procedure Setup() 
    flag = 1 
... called from C:\Phix\demo\pGUI\pdemo\setup.ew:2144 in function create_settings_tab() 
    lwino = 2666320 
    lpath = 2667968 
    lpad1 = 2672832 
    lpert = 2680504 
    lper2 = 2685512 
    ldefi = 11931224 
    lerri = 11937776 
    ledix = 11944368 
    lrun1 = 11950896 
    lrunw = 11955952 
    lpad2 = 11960984 
    bHelp = 11966720 
    i = 9 
... called from C:\Phix\demo\pGUI\pdemo.exw:189 in procedure main() 
    runBtn = 2651000 
    flbl = 2652864 
    helpBtn = 2655960 
    closeBtn = 2657808 
    rlfhc = 2659656 
    tab1 = 2664648 
    tab2 = <novalue> 
    box = <novalue> 
    cl = {"C:\\Phix\\pdemo.exe","C:\\Phix\\pdemo.exe"} 
    cpaths = {"C:","Phix"} 
    cpaths = <novalue> 
    dll_path = "C:\\Phix\\demo\\pGUI\\" 
    vbox = <novalue> 
    cl3 = <novalue> 
... called from C:\Phix\demo\pGUI\pdemo.exw:236 
... called from C:\Phix\pdemo.exw:1 

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

6. Re: Installing Phix

Thanks, that's really helpful.

I have reproduced something similar with the following code:

atom lpData = allocate(10) 
object data = peek({lpData,-1}) 

I need to work on improving the error handling of that, which will probably mean a new error code and a new version of phix.

In the meantime, although I cannot be absolutely certain, this should help:

In demo\pGUI\pdemo\setup.exw, function KeyValue2 line 385, add the sanity check:

 
            data_len = peek4u(lpcbData) 
if data_len<=0 then ?9/0 end if 
            lpData = allocate(data_len) 

and in the same function line 403, replace one line with five:

                end while 
--              data = peek({lpData,data_len}) 
                if data_len<=0 then 
                    data  = "" 
                else 
                    data = peek({lpData,data_len}) 
                end if 

p pdemo should then at least get a bit further along.

Should that first sanity check trigger, try replacing it with

if data_len<0 then data_len = 0 end if 

It may also help to replace the preceding line 399:

--              while 1 do 
                while data_len>0 do 

Regards, Pete

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

7. Re: Installing Phix

petelomax said...

In demo\pGUI\pdemo\setup.exw, function KeyValue2 line 385, add the sanity check:

There is no \setup.exw there, unknown if that is important or not. There is a \setup.ew, so on a lark i applied your following words to that file instead....

petelomax said...
 
            data_len = peek4u(lpcbData) 
if data_len<=0 then ?9/0 end if 
            lpData = allocate(data_len) 

and in the same function line 403, replace one line with five:

                end while 
--              data = peek({lpData,data_len}) 
                if data_len<=0 then 
                    data  = "" 
                else 
                    data = peek({lpData,data_len}) 
                end if 

p pdemo should then at least get a bit further along.

It does! I get a windows gui, containing a directory list box, a run button with a filter text entry box, and a box with the file contents shown.

petelomax said...

Should that first sanity check trigger, try replacing it with

if data_len<0 then data_len = 0 end if 

... it did not trigger, so i did not add that line (should i? i mean, since the first sanity check is meant to crash the program, and the second one lets it keep flowing?) ...

petelomax said...

It may also help to replace the preceding line 399:

--              while 1 do 
                while data_len>0 do 

... but i added that line in a moment of caution. I have not ever gotten this far in a Phix install!

I found a tiny error: In taskwire.exw ,

constant NTASKS = 9 -- number of E's spinning simultaneously. 

it actually spins the letter 'P' !

Phix has "goto"!? What a pleasant surprise! I thought you were adamantly against that, Pete! It's like many other code words in a programming language, a coder may not need it for years, but then one day it is really useful in a spot.

Thanks for your assistance in installing Phix, Pete. I wonder how many people tied to install it, like i did, saw it crashed, but never sought help in Euphorum. Can you say what the cause of the crash was?

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

8. Re: Installing Phix

Found some apps try to include from \win32lib7\ , which doesn't exist. There is a \win32lib6\ so i cheated and simply renamed it. What do you recommend?

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

9. Re: Installing Phix

katsmeow said...
petelomax said...

In demo\pGUI\pdemo\setup.exw

I meant setup.ew

katsmeow said...

... it did not trigger, so i did not add that line (should i? i mean, since the first sanity check is meant to crash the program, and the second one lets it keep flowing?) ...

Leave it as ?9/0

katsmeow said...

Phix has "goto"!? What a pleasant surprise! I thought you were adamantly against that, Pete! It's like many other code words in a programming language, a coder may not need it for years, but then one day it is really useful in a spot.

Not really. It has a #ilASM {jmp :somelabel} (and the matching #ilASM{ ::somelabel }, with certain restrictions) for use once a decade, but no newbie-friendly-hll-goto-statement. [and no docs]

katsmeow said...

Can you say what the cause of the crash was?

RegQueryValueExA not behaving as documented and/or Microsoft moving things around in the registry. Plus me only being able to test it on the OS versions that I actually have.

katsmeow said...

Found some apps try to include from \win32lib7\ , which doesn't exist. There is a \win32lib6\ so i cheated and simply renamed it. What do you recommend?

I'd recommend renaming it back to win32lib6 and changing all include win32lib7 to include win32lib6. I am not aware of any demos where it will make the slightest difference.
Long term, I hope to get phix.<version>.setup.exe below 10MB and then have demo\pGUI\pdemo\setup.ew offer to download extras such as that win32lib7 (along with any demos that use it).

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

Search



Quick Links

User menu

Not signed in.

Misc Menu