1. Can No Longer Run Phix Apps

I can't get Edita to even run for me, either as "pw edita.exw" or "edita.exe."

It starts. It shows up in Task Manager. But no screen ever appears. There's no error message either.

Windows 10 Pro. 10.0.19041 Build 19041

Any ideas on how to diagnose and fix this?

new topic     » topic index » view message » categorize

2. Re: Can No Longer Run Phix Apps

I assume p -test runs ok. Check you have installed the latest updates to Windows Defender as per my other message today.

Otherwise...

Reboot. Or find something in Task Manager to kill.
Edita has an icky single instance routine that sends a message to every window on the system, and if any of them are not responding it just hangs.
Hasn't hit me for over 18 months though, touch wood. (I think the reason for that is Windows itself got alot better at handling dead windows.)

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

3. Re: Can No Longer Run Phix Apps

Yeah, spent ages looking for a fix for this a while back, but a reboot sorted it.

Cheers

Chris

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

4. Re: Can No Longer Run Phix Apps

petelomax said...

I assume p -test runs ok.

Yep! All tests completed successfully, 2.62 seconds.

petelomax said...

Check you have installed the latest updates to Windows Defender as per my other message today.

Seems everything is up-to-date there. What other message?

petelomax said...

Otherwise...

Reboot.

Doesn't help. getlost

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

5. Re: Can No Longer Run Phix Apps

ChrisB said...

Yeah, spent ages looking for a fix for this a while back, but a reboot sorted it.

Unfortunately, a reboot didn't help. getlost

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

6. Re: Can No Longer Run Phix Apps

OK, to see if it is what I think it is, edit (prolly in notepad) demo\edita\src\easinst.ew and comment out line 121:

    void = c_func(xEnumWindows,{cb_ewp,NULL}) 

Be warned that if you let multiple instances run, they'll stop on each others toes and soon corrupt edita.edb irretrievably. (deleting it ain't usually terribly bad)

euphoric said...

What other message?

The one titled "False positive for phix.0.8.2.setup.exe [resolved]"

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

7. Re: Can No Longer Run Phix Apps

petelomax said...

OK, to see if it is what I think it is, edit (prolly in notepad) demo\edita\src\easinst.ew and comment out line 121:

    void = c_func(xEnumWindows,{cb_ewp,NULL}) 

Be warned that if you let multiple instances run, they'll stop on each others toes and soon corrupt edita.edb irretrievably. (deleting it ain't usually terribly bad)

That got me working. Should I run with it, or is there more to do?

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

8. Re: Can No Longer Run Phix Apps

euphoric said...

That got me working. Should I run with it, or is there more to do?

Let's see what the following spits out. Run from anywhere, adjusting the path to Arwen.ew as needed

include demo\arwen\Arwen.ew 
 
constant isDebug = false 
 
constant CD_OPEN=#20050227, -- open file 
         CD_EDITA=#20050228, -- Are you really Edita? 
         CD_PFTP=#20070421  -- Are you really pFTP? 
 
integer cd_what 
sequence cd_text 
 
constant Edita="Edita" 
 
atom Hwnd 
 
constant xGetWindowModuleFileName = link_c_func(user32, "GetWindowModuleFileName", 
            {C_PTR,     --  HWND  hWnd 
             C_PTR,     --  lpszFileName 
             C_INT},    --  UINT cchFileNameMax 
            C_INT),     -- UINT 
         xGetWindowText = link_c_func(user32, "GetWindowTextA", 
            {C_PTR,     --  HWND hWnd, 
             C_PTR,     --  LPTSTR lpString, 
             C_INT},    --  int nMaxCount 
            C_INT),     -- int 
        pszFileName = allocate(500) 
 
function EnumWindowsProc(atom hwnd, atom lParam) 
atom mem, CDS 
integer len, len2 
sequence text 
    if lParam then end if   -- suppress warnings 
if 0 then 
    len = c_func(xGetWindowModuleFileName,{hwnd,pszFileName,500}) 
    if len then 
        string szFileName = peek({pszFileName,len}) 
        printf(1,"module:%s\n",{szFileName}) 
    end if 
else 
    len = c_func(xGetWindowText,{hwnd,pszFileName,500}) 
    if len then 
        string pString = peek({pszFileName,len}) 
        if not find(pString,{"Default IME","MSCTFIME UI"}) then 
            printf(1,"Window title:%s\n",{pString}) 
        end if 
    end if 
end if 
    len = c_func(xSendMessage, {hwnd, WM_GETTEXTLENGTH, 0, 0}) 
    if len>=length(cd_text) then 
        len += 1 
        mem = allocate(len) 
        len2 = c_func(xSendMessage, {hwnd, WM_GETTEXT, len, mem}) 
        if len2+1 != len then ?9/0 end if   -- sanity check 
        text = peek({mem, len}) 
if not find(text,{"MSCTFIME UI\0","Default IME\0"}) then ?{"text",text} end if 
        free(mem) 
        if match(cd_text,text)=1 then 
            -- 
            -- Edita already running? 
            -- 
            CDS = allocate(12) 
            poke4(CDS,{cd_what,0,0}) 
            if c_func(xSendMessage,{hwnd, WM_COPYDATA, NULL, CDS})=cd_what then 
                Hwnd = hwnd 
                if cd_what=CD_EDITA then 
?"EDITA" 
return 1 
                end if 
                -- 
                -- make existing edita topmost 
                -- 
                if c_func(xIsIconic,{hwnd}) then 
                    -- Thanks to Pete Stoner/joel on software 
                    -- If the window is minimised, restore it before  
                    -- trying to make it the foreground window. 
                    c_proc(xShowWindow,{hwnd,SW_RESTORE}) 
                end if 
                c_proc(xSetForegroundWindow,{hwnd}) 
                free(CDS) 
                if cd_what=CD_EDITA then 
                    -- .. and terminate. 
--                  abort(0) 
?"FOUND EDITA... continuing" 
                end if 
--              return 0    -- cease enumeration 
                return 1 
            end if 
            free(CDS) 
        end if 
    end if   
    return 1    -- continue enumeration 
end function 
 
constant cb_ewp = call_back(routine_id("EnumWindowsProc")) 
 
global function checkSingleInstance(integer cwhat)  -- now called from eaini.e 
    cd_what=cwhat 
    if cd_what=CD_EDITA then 
        cd_text=Edita 
    elsif cd_what=CD_PFTP then 
        cd_text="pFTP" 
    else 
        ?9/0 
    end if 
    Hwnd = 0 
    void = c_func(xEnumWindows,{cb_ewp,NULL}) 
    return Hwnd -- 0 if not found else hwnd of window. 
end function 
 
?"begin" 
?checkSingleInstance(CD_EDITA) 
?"done" 
{} = wait_key() 
abort(0) 

If it's not getting to the "done", something ain't playing nice.
Unfortunately it will probably show the window before rather than the one actually in error.

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

9. Re: Can No Longer Run Phix Apps

petelomax said...

If it's not getting to the "done", something ain't playing nice.

Somethin' ain't playin' nice!

It never got to "done."

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

10. Re: Can No Longer Run Phix Apps

euphoric said...
petelomax said...

If it's not getting to the "done", something ain't playing nice.

Somethin' ain't playin' nice!

It never got to "done."

OK, I've edited post #8 above to add a "module:" output, see if that gives us any better clues.
If it hangs with "module:" the last thing output, that's a clue.
If it hangs with {"text",..} last thing, something really ain't playing nice.

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

11. Re: Can No Longer Run Phix Apps

Oh look, just found this:

MSDN said...

Remarks
If the target window is owned by the current process, GetWindowText causes a WM_GETTEXT message to be sent to the specified window or control. If the target window is owned by another process and has a caption, GetWindowText retrieves the window caption text. If the window does not have a caption, the return value is a null string. This behavior is by design. It allows applications to call GetWindowText without becoming unresponsive if the process that owns the target window is not responding. However, if the target window is not responding and it belongs to the calling application, GetWindowText will cause the calling application to become unresponsive.

To retrieve the text of a control in another process, send a WM_GETTEXT message directly instead of calling GetWindowText.

The last line does however rather seem to contradict the bit that I emboldened...

Anyway, that could be the next thing to try... but let's run that modifed #8 first.
(I assume that if some nasty PUP is running on your system, you want shot, right?)

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

12. Re: Can No Longer Run Phix Apps

petelomax said...

OK, I've edited post #8 above to add a "module:" output, see if that gives us any better clues.
If it hangs with "module:" the last thing output, that's a clue.
If it hangs with {"text",..} last thing, something really ain't playing nice.

Bad news. {"text",..} is the last thing! sad

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

13. Re: Can No Longer Run Phix Apps

euphoric said...

Bad news. {"text",..} is the last thing! sad

Well, I've now edited post #8 above to use GetWindowText, but I'm not expecting it to do any better..

Beyond that I'd be looking at things in Task Manager's Startup tab, a cold cd-boot full av scan, ...

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

14. Re: Can No Longer Run Phix Apps

petelomax said...
euphoric said...

Bad news. {"text",..} is the last thing! sad

Well, I've now edited post #8 above to use GetWindowText, but I'm not expecting it to do any better..

The last line is

Window title:NVEncCapContext 

which, I think, is related to an NVIDIA driver or app.

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

15. Re: Can No Longer Run Phix Apps

euphoric said...
petelomax said...
euphoric said...

Bad news. {"text",..} is the last thing! sad

Well, I've now edited post #8 above to use GetWindowText, but I'm not expecting it to do any better..

The last line is

Window title:NVEncCapContext 

which, I think, is related to an NVIDIA driver or app.

Oh, good-o. Have fun: https://driverrestore.com/update-nvidia-driver-windows-10-fix-issues/

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

16. Re: Can No Longer Run Phix Apps

Why do you think it's a problem with NVIDIA? You think their driver or an app of theirs is malfunctioning?

Everything works normal for me when it comes to the graphics.

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

17. Re: Can No Longer Run Phix Apps

euphoric said...

Why do you think it's a problem with NVIDIA? You think their driver or an app of theirs is malfunctioning?

Everything works normal for me when it comes to the graphics.

I think/hope we've proved that's the thing that is hanging, and it wasn't hanging like that last week.
Obviously that driver has been behaving normally for however-many-years and it's probably mostly still ok.
But now it has changed behaviour, so it must be corrupt, or some other update has damaged it somehow.
If you leave it corrupt, maybe it'll stay the same, maybe it'll get worse, no-one can say for sure.
That's my logic anyway.

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

18. Re: Can No Longer Run Phix Apps

petelomax said...

I think/hope we've proved that's the thing that is hanging, and it wasn't hanging like that last week.

I'm not sure about that, because it's been a while since I've been able to get to Phix projects.

Interestingly, I did update the NVIDIA driver today and still get that behavior. But you're thinking I need to do a total wipe of NVIDIA stuff and reinstall?

petelomax said...

Obviously that driver has been behaving normally for however-many-years and it's probably mostly still ok.
But now it has changed behaviour, so it must be corrupt, or some other update has damaged it somehow.

Yeah, this is probably true. I'm not sure when it changed behavior, but since successful runs, two things have changed: Phix and NVIDIA. However, Phix changed first.

petelomax said...

If you leave it corrupt, maybe it'll stay the same, maybe it'll get worse, no-one can say for sure.
That's my logic anyway.

So, the idea, again, is to totally reinstall NVIDIA stuff?

Unfortunately, I've been having boot issues with Windows 10, so I'm leery of going that route for now. smile

Maybe at some point... getlost

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

Search



Quick Links

User menu

Not signed in.

Misc Menu